window.onload = function() {
      // detect Opera
      if(navigator.appName == 'Opera'){
         $('dv_sr_pr').setStyle({top: '19px'});
      }
}
//---
function showandcenter(obj,rel) {
	obj.style.position = "absolute";
	obj.style.display = "block";

	width = parseInt(obj.clientWidth);
	height = parseInt(obj.clientHeight);

	var w, ycorrection;
	var h = document.documentElement.clientHeight;
	if (rel) {
		w = rel.clientWidth;
		ycorrection = rel.clientTop;
		if (!ycorrection)
			ycorrection = rel.offsetTop;
		if (!ycorrection)
			ycorrection = 0;
	} else {
		rel = document.documentElement;
		w = document.documentElement.clientWidth;
		ycorrection = 0;
	}
	obj.style.left = (parseInt(w)/2 - parseInt(width)/2 + parseInt(document.documentElement.scrollLeft))+"px";
	obj.style.top = (parseInt(h)/2 - parseInt(height)/2 + parseInt(document.documentElement.scrollTop) - ycorrection)+"px";
}



function dropElement(e) {
	if (!e)
		return;
	if (!e.parentNode)
		return;
	if (e.id)
		gebicache[e.id] = null;
	e.parentNode.removeChild(e);
}

function prallToggle(){
    $("pr_ms_p_all").toggle();
}


function MydropAllElements(e) {
	if (!e)
		return;
	var l = e.childNodes;
	while (l.length) {
		MydropAllElements(l[0]);
		dropElement(l[0]);
	}
}

//====================================================================//
function showISE(flashFile){

  window.location='/produits/search';
  return true; 
  var width = document.body.clientWidth;
  var height = document.body.clientHeight;
  var footerHeight = $("footer1").getHeight();
  var elt = $('iseHolder');
  var params = "type=";
  var file, mapLinkParams, tempHeight;

  if(flashFile == 0){
     file = "rdt.swf";
     //mapLinkParams = "?params=" + params;
     mapLinkParams = "?params=";
     tempHeight = "1200px";
  }else
    if(flashFile == 1){
       file = "acheter.swf";
       mapLinkParams = "";
       tempHeight = "947px";
       
    }

  var fo = new FlashObject("/swf/" + file, "index", "100%", tempHeight, "7", "#ffffff", false, "high");

  fo.addParam("scale", "noscale");
  fo.addParam("wmode", "transparent");
  fo.addVariable("maplink", "/produits/mapXml" + mapLinkParams);
  fo.addVariable("resultlink", "/produits?");
  fo.addVariable("paramslink", params + ",xml=1");
  fo.addVariable("alertlink", "/acheter?");
  fo.addVariable("alertparams", "z=1");
  fo.addVariable("nodistrictlink", "/produits?");
  fo.addVariable("nodistrictparam", params);
  fo.addParam("allowFullScreen", "true");
  fo.addParam("allowscriptaccess", "always");
  fo.write("flash");
  elt.show();

  if(flashFile == 0){
     var ftrOffset = parseInt($('footer1').offsetTop);
     $('flash').setStyle({height: ftrOffset-55 + 'px'});
     var body = {
         __1: document.getElementById('body1'),
         __2: document.getElementById('body2'),
         __3: document.getElementById('body3')
     };

     $('all').setStyle({height:ftrOffset+450 + 'px'});

     if(body.__1 != null && body.__1 != undefined){
         $('body1').setStyle({height:ftrOffset+450 + 'px'});
     }
     if(body.__2 != null && body.__2 != undefined){
         $('body2').setStyle({height:ftrOffset+450 + 'px'});
     }
     if(body.__3 != null && body.__3 != undefined){
         $('body3').setStyle({height:ftrOffset+450 + 'px'});
     }
     // hide youtube container
     if($('dv_y_cont') != null && $('dv_y_cont') != undefined){
        $('dv_y_cont').setStyle({visibility: 'hidden'});
     }
  }
}

function closeISE(){
     var bdy = {
         __1: document.getElementById('body1'),
         __2: document.getElementById('body2'),
         __3: document.getElementById('body3')
     };
     //---
     if(bdy['__1'] != null && bdy['__1'] != undefined){
         document.getElementById('body1').removeAttribute('style');
     }
     if(bdy['__2'] != null && bdy['__2'] != undefined){
         document.getElementById('body2').removeAttribute('style');
     }
     if(bdy['__3'] != null && bdy['__3'] != undefined){
         document.getElementById('body3').removeAttribute('style');
     }
     //---
     $('iseHolder').hide();
     var divAll = document.getElementById('all');
     divAll.className = 'divAllHeight';
     // hide youtube container
     if($('dv_y_cont') != null && $('dv_y_cont') != undefined){
        $('dv_y_cont').setStyle({visibility: 'visible'});
     }
     document.getElementById('all').removeAttribute('style');
}


