function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}


function ajust(){

	var windowHeight = getWindowHeight();
	var windowWidth = getWindowWidth();
	/*var navleft = document.getElementById('navleft');
	var contents = document.getElementById('contents');*/
	
	if(windowWidth > 900){
		document.getElementById('container2').style.width = 900+'px';		
	}else{
		document.getElementById('container2').style.width = 900+'px';		
	}
}
/*function navleft(){
		var main = getWindowHeight();
		if(main < 600){main = 600;}
		var container = document.getElementById('container').offsetHeight;
		var top  = document.getElementById('top').offsetHeight;
		var navleft = document.getElementById('navleft').offsetHeight;
		var dif = (container - top) - navleft;
		//alert(navigator.appName);
		if (document.all) dif += 5;
		document.getElementById('navleft').style.height = (navleft+dif) + 'px';		
		//alert(navleft);		
}*/

/**/
window.onload = function() {
	ajust();
}
window.onresize = function() {
	ajust();
}

/* imagen */
function ampliar(imagen){
	var url = "ampliar.php?img="+imagen;
	window.open(url,"Eventos","WIdTH=540, HEIGHT=420, scrollbars=YES,resizable=yes");
} 