if (document.all){

	windowWidth = document.body.clientWidth;
	elWidth = document.all['Mdiv'].offsetWidth;
	cx = Math.floor((windowWidth - elWidth) / 2);
	if (cx<0)cx = 0;
	if (navigator.appVersion.substring(22,25)=="4.0") {//ie4
		document.all.Mdiv.style.left = cx;
		document.all.Mdiv.style.visibility ="visible";
	}
	else{
		document.getElementById("Mdiv").style.left = cx;
		document.getElementById("Mdiv").style.visibility ="visible";
	}
	

}
else{
	if (navigator.appVersion.substring(0,3)>="5.0")	{
	
		//windowWidth = document.body.clientWidth;
		windowWidth = window.innerWidth;
		//alert (windowWidth);
		elWidth = document.getElementById("Mdiv").offsetWidth;
		//alert (elWidth);
		cx = Math.floor((windowWidth - elWidth) / 2);		
		//alert (cx);
		if (cx>=0) { cx=cx } else { cx=0}; // por culpa NaN
		if (cx<0)cx = 0;
		//alert (cx);
		document.getElementById("Mdiv").style.left = cx;
		document.getElementById("Mdiv").style.visibility ="visible";
		
	}
	else{
	
		windowWidth = window.innerWidth;
		elWidth = document.layers['Mdiv'].document.width;
		cx = Math.floor((windowWidth - elWidth) / 2);
		if (cx<0)cx = 0;
		document.layers['Mdiv'].left = cx;
		document.layers['Mdiv'].visibility ="show";
		
	}
}
