self.focus();

function testnav() {
isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;
isIENS6 = (document.all || document.getElementById) ? true : false;
}

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",10)
}

function pullV(){
if (window.drawit)
clearInterval(drawit)
pullit=setInterval("pullengineV()",15)
}
function drawV(){
clearInterval(pullit)
drawit=setInterval("drawengineV()",15)
}
function pullengineV()
	{
	if ((isIE4||isIE5)&&themenu.pixelTop<bottomboundary)
		{
		themenu.pixelTop+=5;
		}
	else if (isNS4&&themenu.top<bottomboundary)
		{
		themenu.top+=5;
		}
	else if (isNS6&&parseInt(themenu.top)<bottomboundary)
		{
		themenu.top = parseInt(themenu.top) + 5 + "px";
		}
	else if (window.pullit)
		{
		clearInterval(pullit);
		}
	}
function drawengineV()
	{
	if ((isIE4||isIE5)&&themenu.pixelTop>topboundary)
		{
		themenu.pixelTop-=5;
		}
	else if (isNS4&&themenu.top>topboundary)
		{
		themenu.top-=5;
		 }
	else if (isNS6&&parseInt(themenu.top)>topboundary)
		{
		themenu.top = parseInt(themenu.top) - 5 + "px";
		}
	else if (window.pullit)
		{
		clearInterval(pullit);
		}
	}
	
function calque(calque_nav)
	{
	// Rechargement pour NS4
	window.onload=regenerate2;
	
	/* Construction des calques */
	
	// IE 4 à 5
	if (isIE4||isIE5)
		{
		document.write('<div id="slidemenubarIE" style="top:-400" onMouseover="pullV()" onMouseout="drawV()">');
		}
	// NS 6
	if (isNS6)
		{
		document.write('<div id="slidemenubarIE" style="top:-400" onMouseover="pullV()" onMouseout="drawV()">');
		}
	// NS 4
	if (isNS4)
		{
		document.write('<layer id="slidemenubarNS" onMouseover="pullV()" onMouseout="drawV()">');
		}
	
	// Construction du contenu de la nav
	document.write(calque_nav);
	
	// IE 4 à 6 et NS 6
	if (isIENS6)
		{
		document.write('</div>');
		}
	// NS 4
	if (isNS4)
		{
		document.write('</layer>');
		}
	/* Fin de la construction des calques */
	}

function open_w(url)
	{
	var ah = screen.availHeight;
	var aw = screen.availWidth;
	
	
	var width  = 550;	
	var height = 400;		
	
	var str = "scrollbars=yes,resizable=no,menubar=no,status=no," + "height=" + height + ",innerHeight=" + height;
	str += ",width=" + width + ",innerWidth=" + width;
	
	var xc = ((aw - width) / 2);
	var yc = ((ah - height) / 2);
	
	str += ",left=" + xc + ",screenX=" + xc;
	str += ",top=" + yc + ",screenY=" + yc;
	
	window.open(url, 'paco', str);
	}
