var speed = 2;

/*
if(navigator.appName =="Microsoft Internet Explorer") {
	if(navigator.userAgent.indexOf("Mac") == -1 && navigator.appVersion.indexOf("MSIE 5.0")<0) window.onresize = function(){window.document.location.reload();}
	else if(navigator.appVersion.indexOf("MSIE 5.0")>0) window.onresize = preload;
}

function preload() {
	window.document.location.reload();
}

if ((navigator.appName=="Netscape")) reloadPage(true);
function reloadPage(init) {
  if (init==true) {
    pageW=innerWidth;
	pageH=innerHeight;
	onresize=reloadPage;
	}
  else if (innerWidth!=pageW || innerHeight!=pageH) location.reload();
}*/

function scrollH(sens,targe){
	ts = new getObj(targe).obj;
	HDiv = ts.offsetHeight;
	if ( parseInt(ts.style.top) > (HVisible-HDiv) && (sens == -1) ||  parseInt(ts.style.top) < 0 && (sens ==1))
		ts.style.top=parseInt(ts.style.top)+ sens*1;
}
function initoneScroll(){
	new getObj("fixe0").style.top = getAbsoluteTop(new getObj("p0").obj);
	new getObj("fixe0").style.left = getAbsoluteLeft(new getObj("p0").obj);
	new getObj("fixe0").style.visibility = "visible";
	if(new getObj("sc0").obj.offsetHeight>HVisible) new getObj("bscroll0").style.visibility = "visible";
	else new getObj("bscroll0").style.visibility = "hidden";
}


function getObj(name){
  if (document.getElementById){
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all){
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
}
function getTop(objectId){
	var x = (new getObj(objectId)).obj;
	xTop = x.offsetTop;
	while(x.offsetParent!=null) {
		xParent = x.offsetParent;
		xTop += xParent.offsetTop;
		x = xParent;
	}
	return xTop;
}
function getAbsoluteTop(objectId){
	var x = objectId;
	xTop = x.offsetTop;
	while(x.offsetParent!=null) {
		xParent = x.offsetParent;
		xTop += xParent.offsetTop;
		x = xParent;
	}
	return xTop;
}
function getAbsoluteLeft(objectId){
	var x = objectId;
	xLeft = x.offsetLeft;
	while(x.offsetParent!=null){
		xParent = x.offsetParent;
		xLeft += xParent.offsetLeft;
		x = xParent;
	}
	return xLeft;
}
function getWidth(objectId){
	var x = (new getObj(objectId)).obj;
	return x.offsetWidth;
}

function getHeight(objectId){
	var x = (new getObj(objectId)).obj;
	return x.offsetHeight;
}
function openPop(f,l,h,op)
{
	longueur=l;
	hauteur=h;
	haut = screen.height/2 - hauteur/2;
	dim = screen.width/2 - longueur/2;
	window.open(f,'','width='+longueur+',height='+hauteur+',left='+dim+',top='+haut+',resizable=no,'+op+'');
}

function swapImgin(obj){
	obj = obj.getElementsByTagName('img')[0];
	ch = obj.src;

	var finfin=ch.substring(ch.length-3,ch.length);
	var fin=ch.substring(ch.length-5,ch.length-4);
	ch=ch.substring(0,ch.length-5);
	
	if(fin == "0")
	   obj.src=ch+"1."+finfin;
	else if(navSelect != obj)
	   obj.src=ch+"0."+finfin;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}