//var y1 = 200;   // change the # on the left to adjuct the Y co-ordinate
//var x1 = 105;   // change the # on the left to adjuct the X co-ordinate
var ExistsLayer=true;
(document.getElementById) ? dom = true : dom = false;

function existsLayer(layer)
{
	if(document.getElementById(layer)==null)
		return(false)
	else
		return(true)	
}

function LayerIsEmpty(layer)
{
    if(existsLayer(layer))
    {
        html=document.getElementById(layer).innerHTML;
        i=html.indexOf('<!--Debut-->');
        j=html.indexOf('<!--Fin-->');
        if(i+'<!--Debut-->'.length==j)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
    else
    {
        return(true);
    }
}

function hideIt(layer) 
{
	if(!existsLayer(layer))
	{
		return;
	}	
	
	if (dom) {document.getElementById(layer).style.display="none";}//.visibility='hidden';}
	if (document.layers) {document.layers[layer].display="none";}//.visibility='hide';} 
}

function showIt(layer) 
{
	if(!existsLayer(layer))
	{
		return;
	}	
	
 	if (dom) {document.getElementById(layer).style.display="block";}//visibility='visible';}
	if (document.layers) {document.layers[layer].display="block";}//.visibility='show';} 
}

function placeIt(layer,x1,y1) 
{	
    
	if(!existsLayer(layer))
	{
        return;
	}	
	
    
    //hideIt(layer);
	if (dom && !document.all) 
    {    
   
        document.getElementById(layer).style.top =(window.pageYOffset + (window.innerHeight - (window.innerHeight-y1)))+'px';        
        document.getElementById(layer).style.left =(1090+(document.body.clientWidth-1090)/2-155)+'px';
    }
    
    
    
	if (document.layers) 
    {           
        document.layers[layer].top = (window.pageYOffset + (window.innerHeight - (window.innerHeight-y1)))+'px';
    }
     
	if (document.all)
	{           
        if(document.all[layer]!=null)
        {
        
        if(document.documentElement && document.documentElement.scrollTop)
        {
            ScrollTop=document.documentElement.scrollTop;
        }
        else
        {
            ScrollTop=document.body.scrollTop;
        }
                     
		document.all[layer].style.top = (ScrollTop + (document.body.clientHeight - (document.body.clientHeight-y1)))+'px';
		//document.all[layer].style.left=document.body.clientWidth-getWidth(document.getElementById(layer))-x1;
        //if(document.body.clientWidth<1090)
        //{
            //document.all[layer].style.left=document.body.clientWidth-getWidth(document.getElementById(layer))-x1;
        //}
        //else
        //{
            document.all[layer].style.left=(1090+(document.body.clientWidth-1090)/2-155)+'px';//getWidth(document.getElementById(layer));
        //}
        }
	}
    
    if(!LayerIsEmpty(layer))
    {
        showIt(layer);
    }       
    
	window.setTimeout("placeIt('"+layer+"',"+x1+","+y1+");", 1000); 	    
}

//window.onload=placeIt();
window.onResize="window.location.href = window.location.href"
