function getWindowData(){
    var widthViewport,heightViewport,xScroll,yScroll,widthTotal,heightTotal;
    if (typeof window.innerWidth != 'undefined'){
        widthViewport= window.innerWidth-17;
        heightViewport= window.innerHeight-17;
    }else if(typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth !='undefined' && document.documentElement.clientWidth != 0){
        widthViewport=document.documentElement.clientWidth;
        heightViewport=document.documentElement.clientHeight;
    }else{
        widthViewport= document.getElementsByTagName('body')[0].clientWidth;
        heightViewport=document.getElementsByTagName('body')[0].clientHeight;
    }
    xScroll=self.pageXOffset || (document.documentElement.scrollLeft+document.body.scrollLeft);
    yScroll=self.pageYOffset || (document.documentElement.scrollTop+document.body.scrollTop);
    widthTotal=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,widthViewport);
    heightTotal=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,heightViewport);
    return [widthViewport,heightViewport,xScroll,yScroll,widthTotal,heightTotal];
}

function mover(nombreCapa){ 
	
	var h = getWindowData()[1];
	var altoWeb = 500;
	mitadh = h / 2;
	posicion = mitadh - (altoWeb / 2);
	if (document.getElementById) document.getElementById(nombreCapa).style.top=posicion+'px';
	else if (document.all) document.all.nombreCapa.style.top=posicion+'px';
	else if (document.layers) document.layers[nombreCapa].top=posicion+'px'; 
	
	var w = getWindowData()[0];
	var anchoWeb = 650;
	mitadw = w / 2;
	posicion = mitadw - (anchoWeb / 2);
	if (document.getElementById) document.getElementById(nombreCapa).style.left=posicion+'px';
	else if (document.all) document.all.nombreCapa.style.left=posicion+'px';
	else if (document.layers) document.layers[nombreCapa].left=posicion+'px';
	
} 