var isOpera = (navigator.userAgent.indexOf('Opera') != -1);
var isIE = (!isOpera && navigator.userAgent.indexOf('MSIE') != -1);
var isNN=(navigator.appName=="Netscape")?1:0;
var minWidth=800;
var minHeight=600;
var maxWidth=1000;
var maxHeight=700;


function redim_gallery(){
	var iframe = findObject('iframecontainer');
	var tamano = Cget_win_size();
	return;
	
	Worig = wW = tamano[0];
	Horig = wH = tamano[1];
	if (wW <minWidth){
		wW =minWidth;
	}
	else if (wW > maxWidth){
		wW = maxWidth;
	}
	wH = wH*0.96;
	wW = wW*0.96;
	
	
	if (iframe){
	iframedoc = isIE ? iframe.document:iframe.contentDocument;
		if (iframedoc){
			var scrollholder = findObject('scrollholder',iframedoc);
			
			scrollholder.style.height=parseInt(wH-77)+'px';
			
		}
	}
	
}
function redim_noticias(){
	
}

function redim_window(){
	var tamano = Cget_win_size();
	
	Worig = wW = tamano[0];
	Horig = wH = tamano[1];
	
	if (wW <minWidth){
		wW =minWidth;
	}
	else if (wW > maxWidth){
		wW = maxWidth;
	}

	var tabla_top = findObject('tablageneral_top');
	var tabla_top_movil = findObject('tabla_general_top_movil');
	var tabla_middle = findObject('tablageneral');
	
	var tabla_bottom = findObject('tablageneral_bottom');
	var tabla_bottom_movil = findObject('tabla_general_bottom_movil');
	//Width
	ancho=wW;
	tabla_top.style.width=ancho+"px";
	tabla_top_movil.style.width=(ancho-156)+"px";
	tabla_middle.style.width=ancho+"px";
	tabla_bottom.style.width=ancho+"px";
	tabla_bottom_movil.style.width=(ancho-156)+"px";
	//Height
	var divcenter=findObject('divcenter');
	if (!isIE){
		divcenter.style.width=Worig+'px';
		divcenter.style.height=Horig+'px';
	}
	
	return;
	
	var menu_redim = findObject('menu_redim');
	var container_redim = findObject('container');
	
	if (wH <minHeight){
		wH =minHeight;
	}
	else if (wH > maxHeight){
		wH = maxHeight;
	}
	wH = wH*0.96;
	wW = wW*0.96;
	menu_redim.style.height=wH-80+'px';
	container_redim.style.height=wH-77+'px';
	
	//iframecontainer
	var iframecontainer = findObject('iframecontainer');
	
	if (iframecontainer!==null){
		try{
			iframecontainer.height=(wH-77)+'px';
			if (iframecontainer.document) iframecontainer.document.body.height=(wH-77)+'px';
			if (iframecontainer.contentDocument){
				iframecontainer.contentDocument.body.height=(wH-77-20)+'px';
				var scrollholder = findObject('scrollholder',iframecontainer.contentDocument);
				
			}
			
				
		}
		catch(err){
			alert(err.message);
		}
		
		
		
	}
	
}
window.onresize=redim_window;