// Funciones para redimencionar el navegador.
var b = h = null;
var oldData = '';
var resizeCount = 0;
var intWAnt = 0;
var intHAnt = 0;


top.window.moveTo(0,0);
if(document.all){top.window.resizeTo(screen.availWidth,screen.availHeight);}
else if(document.layers||document.getElementById){if(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){top.window.outerHeight=screen.availHeight;top.window.outerWidth=screen.availWidth;}}

/*Funcion para mover el Iframe dentro del swf*/
function moveIFrame(x,y,w,h) {	

	var valX = (document.documentElement.clientWidth/2)-(w/2);
	var valY = (document.documentElement.clientHeight/2)-(h/2) + 8;
	
    	var frameRef=document.getElementById("myFrame");
    	frameRef.style.left=valX+"px";
   	frameRef.style.top=valY+"px";

	intWAnt = w;
	intHAnt = h;

    	var iFrameRef=document.getElementById("myIFrame");	
	iFrameRef.width=w+"px";
	iFrameRef.height=h+"px";
}

/*Funcion para ocultar el Iframe dentro del swf*/
function hideIFrame(){
	
	document.getElementById("myFrame").focus();

	var iFrameRef=document.getElementById("myIFrame");	
	iFrameRef.width=0;
	iFrameRef.height=0;
	
	document.getElementById("myIFrame").style.visibility="hidden";
    	document.getElementById("myFrame").style.visibility="hidden";	
}

/*Funcion para presentar el Iframe deltro del swf*/	
function showIFrame(){

    	document.getElementById("myFrame").style.visibility="visible";
	document.getElementById("myIFrame").style.visibility="visible";
}

/*Funcion para leer el Iframe dentro del swf*/
function loadIFrame(url){
	document.getElementById("myFrame").innerHTML = "<iframe id='myIFrame' class='clientArea' src='" + url + "'frameborder='0' style='z-index: 10001;'></iframe>";
}

//

onload = function() {
	h = document.getElementsByTagName('html')[0];
	b = document.getElementsByTagName('body')[0];	    
	onresize();
	window.focus();
}

/*Funcion para activar el auto-resize*/
onresize = function() {
	if(intWAnt!=0)
		moveIFrame(0,0,intWAnt,intHAnt);	
};	
