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*4;
}
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";
}


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 = objectId;
	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+'');
}