validarCokie = document.cookie != null && document.cookie != "" ? 1 : 0;
function getFlashMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}
activado = 0;
function ajusteScroll(pasHeig, dedone, param3){
	
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	var anchoFree = !isIE ? window.innerWidth : document.body.clientWidth;
	var altoFree = !isIE ? window.innerHeight : document.body.clientHeight;
	
	if(activado == 1 || param3 == 1){
		div_y = $('divFla').getStyle('height');
		
		if(altoFree>690 && anchoFree>1109){	
			if(isIE){
				document.getElementById('divFla').style.width = '100%'; 
				document.getElementById('divFla').style.height = '100%';
			}else{
				//alert("Se ha dado la opcion3");
				divFla.style.width = '100%';
				divFla.style.height = '100%';
			}
		}else if(anchoFree>1109){	
			if(isIE){
				document.getElementById('divFla').style.width = '100%'; 
				document.getElementById('divFla').style.height = '100%';
			}else{
				//alert("Se ha dado la opcion1");
				divFla.style.width = '100%';
				divFla.style.height = '100%';
			}
		}else if(altoFree>690){	
			if(isIE){
				document.getElementById('divFla').style.width = '100%'; 
				document.getElementById('divFla').style.height = '100%';
			}else{
				//alert("Se ha dado la opcion2");
				divFla.style.width = '100%';
				divFla.style.height = '100%';
			}
		}
		else{
			//alert("Ocurrio un error con la deteccion");	
			if(isIE){
			document.getElementById('divFla').style.width = '100%'; 
			document.getElementById('divFla').style.height = '100%';
			}else{
			divFla.style.width = '100%';
			divFla.style.height = '100%';
			}
		}
		
		activado = 0;
	}
	//getFlashMovie("base").sendTextToFlash(medidas);
}
//
function pasbusqueda(){
	var varBusc1 = new String(varBusc);
	var medidas = "1,"+ varBusc1;
	getFlashMovie("base").sendTextToFlash(medidas);	
}

function miFuncion(param1){
	//alert("Sonic Resize Activado=1");
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	var anchoFree = !isIE ? window.innerWidth : document.body.clientWidth;
	var altoFree = !isIE ? window.innerHeight : document.body.clientHeight;
	var newAltoDiv = 690;
	var newAnchoDiv = 1109;

	if(param1==1){
		if(isIE){
			document.getElementById('divFla').style.width = newAnchoDiv; 
		}else{
			divFla.style.width = newAnchoDiv;
		}
	}else if(param1==2){
		if(isIE){
			document.getElementById('divFla').style.height = newAltoDiv;
		}else{
			divFla.style.height = newAltoDiv;
		}
	}else if(param1==3){
		if(isIE){
			document.getElementById('divFla').style.width = newAnchoDiv; 
			document.getElementById('divFla').style.height = newAltoDiv;
		}else{
			
			divFla.style.width = newAnchoDiv;
			divFla.style.height = newAltoDiv;
		}
	}	
	activado = 1;
}
//
if(validarCokie){
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	moveTo(0,0);
	anchoClient = screen.availWidth;
	altoClient = screen.availHeight-20;
	resizeTo(anchoClient, altoClient);
	var anchoFree = !isIE ? window.innerWidth : document.body.clientWidth;
	var altoFree = !isIE ? window.innerHeight : document.body.clientHeight;
	document.write("<div align='center' name='divFla' id='divFla' style='height:"+100+"%;width:"+100+"%;margin:0px;background-color:#FFFFFF;vertical-align:middle;'>");
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='100%' height='100%' id='base' align='middle'><param name='allowScriptAccess' value='sameDomain' />"
	+ "<param name='movie' value='main2.swf'/><param name='allowFullScreen' value='true' /><param name='quality' value='high' /><param name='scale' value='noscale' /><param name='salign' value='m' /><param name='bgcolor' value='#FFFFFF'/>"
	+ "<embed src='main2.swf' quality='high' scale='noscale' salign='m' bgcolor='#FFFFFF' width='100%' height='100%' id='base' name='base' align='middle' allowFullScreen='true' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/></object></div>");
	document.cookie="hechojs = askkd993885ks;path=/";
}else{
	document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr><td align='center' valign='middle'>");
	document.write("Tu navegador no acepta cookies");
	document.write("</td></tr></table>");
}