function getBrowserWidth () {
	if (window.innerWidth) return window.innerWidth;
	else if (document.documentElement && document.documentElement.clientWidth != 0) return document.documentElement.clientWidth;
	else if (document.body) return document.body.clientWidth;
	else return 0;
}

function getBrowserHeight () {
	if (window.innerHeight) return window.innerHeight;
	else if (document.documentElement && document.documentElement.clientHeight != 0) return document.documentElement.clientHeight;
	else if (document.body) return document.body.clientHeight;
	return 0;
}

var height=0;
var width=0;
var margen=0;

width = getBrowserWidth();
height = getBrowserHeight();
margen = (height - 1024)/2;

document.write('<style type="text/css" media="screen">#contenedor{margin-top:' + margen + 'px;}');

//document.getElementById('contenedor').style.height=='15px';

if (width <1024){
	document.write('html[xmlns] body{overflow-x:scroll;}');
	document.write('*:first-child+html{overflow-x:scroll;}'); //hack IE7
	document.write('html{_overflow-x:scroll;}'); //hack IE6
	document.write('#izquierda,#derecha{display:none;}');
} 

if (height < 650){
	document.write('html[xmlns] body{overflow-y:scroll;}');
	document.write('*:first-child+html{overflow-y:scroll;}');
	document.write('html{_overflow-y:scroll;}');
	document.write('#contenedor{margin-top:-200px;}');
} 

document.write('</style>')


