var contenedor = "container";
var alto = 876;
var ancho = 1642;

function getHeight(){
	var myHeight=0;
	if( typeof( window.innerWidth ) == 'number' ) {
	myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
 	myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    	myHeight = document.body.clientHeight;
	}
	return(myHeight);
}

function getWidth(){
	var myWidth=0;
	if( typeof( window.innerWidth ) == 'number' ) {
    	myWidth = window.innerWidth;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	myWidth = document.documentElement.clientWidth;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    	myWidth = document.body.clientWidth;
  	}
	return(myWidth);
}
 

	var myWidth=getWidth();
	var myHeight=getHeight();
	var caja=document.getElementById(contenedor);

	//caja.style.width = ancho+"px";
	//caja.style.height = alto+"px";

	//if (myWidth < ancho){caja.style.left=(ancho/2)+"px";}
	//else{caja.style.left=((myWidth-ancho)/2+(ancho/2))+"px";}

	caja.style.marginLeft = -((ancho-myWidth)/2)+"px";
	//if(!(!document.layers && !document.all)){
		caja.style.width = myWidth+((ancho-myWidth)/2)+"px";
	//}
	if(alto<myHeight){
	caja.style.height = myHeight+"px";
	} else {
		caja.style.height = alto+"px";
	}