//window.onload=mainTextScroller;
//window.onload=returnSize;
//window.onload=montre;
//window.onload=leftalign;
window.onload=windowCenter;
//window.onload=montre;
/////////////////////////////////////////////////////
//window.onload=loadall;
//window.onload=addLoadEvent(windowCenter);

//window.onload=addLoadEvent(mainTextScroller);



function montre(id) {

var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}





function returnSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  var result = new Array(myWidth,myHeight);
  return result;
}




function windowCenter()
{
	result=returnSize();
	var myWidth=result[0];
	var myHeight=result[1];
	for (var i = 1; i<=10; i++)
	{
	var elementWidth=document.getElementById('smenu'+i).offsetWidth;
//	var elementHeight=document.getElementById('smenu'+i).offsetHeight;
        var myScrollLeft=document.documentElement.scrollLeft;
//	var myScrollTop=document.documentElement.scrollTop;
	var posX=myScrollLeft+myWidth-myWidth/2-354;
//	var posY=myScrollTop+myHeight-myHeight/2-elementHeight/2;
	document.getElementById('smenu'+i).style.left=posX+"px";
//	document.getElementById('smenu'+i).style.top=posY+"px";
	montre();
	//Specify the slider's width (in pixels)
var sliderwidth="983px";
//Specify the slider's height
var sliderheight="80px";
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3;
//configure background color:
slidebgcolor="#EAEAEA";

//Specify the slider's images
var leftrightslide=new Array();
var finalslide='';
//Specify gap between each image (use HTML):
var imagegap=" ";

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=5


	fillup ();
	}
}


