// JavaScript Document
IE = (document.all);
NS = (document.layers);
DOM = (document.getElementById && !IE);
Mac = (navigator.appVersion.indexOf("Mac") != -1);
function getWindowWidth()
{
     if (NS || DOM)
           return(window.innerWidth-14);
     if (NS && Mac)
           return(window.innerWidth-10);
     else if (IE)
           return(document.body.clientWidth);
     else
           return(-1);
}
function ReloadIT()
{
     if (NS || DOM)
           init;
     // For IE, reload on a timer in case the Windows 'Show window contents while
     // dragging' display option is on.
     if (IE)
           setTimeout('init()', 2000);
     else
           init();
}
function getLeft(){
	windowWidth = getWindowWidth();// get the window width
     if(windowWidth < 600)
           windowWidth = 600; // fake this so if window < 600 things are displayed well
     windowCenter = windowWidth/2; // window center
	 return windowCenter -160;
}

function init()//executed on load and after reload
{
     windowWidth = getWindowWidth();// get the window width
     if(windowWidth < 600)
           windowWidth = 600; // fake this so if window < 600 things are displayed well
     windowCenter = windowWidth/2; // window center
     mylayers = new Array();
     // name your layers here
     mylayers[0] = new Array();
     mylayers[0]['name'] = 'Layer1';
     mylayers[0]['fromcenter'] = -59; // position from center

     for(i=0; i<mylayers.length; i++)
     {
         tempname = (NS)? document.layers[mylayers[i]['name']] : (IE)?document.all(mylayers[i]['name']).style : document.getElementById(mylayers[i]['name']).style;
         //hide the layer and remember original state
         var oldstate = tempname.visibility;

                        tempname.visibility = "hidden";

                        // position the layer

                        tempname.left = windowCenter + mylayers[i]['fromcenter']

                        // show layer

                        tempname.visibility = oldstate;

        }

}

if(NS)

{

window.onResize = ReloadIT;

}