ventana=0;
function abrirventana(arg1,arg2,arg3){
	if (ventana!=0){
		ventana.close();
	}
	ventana = window.open(arg1,arg2,arg3);
	//ventana.opener = window.self; 
	ventana.focus();
}
function PassFlash(arg1,arg2){
	//alert(arg1+','+arg2);
    window.document.movie.SetVariable(arg1, arg2);
	window.document.focus();
}
function abrirdescarga(arg1){
	top.topFrame.document.location.href=arg1;
}
//------------------------------------
anchoOriginal=994;
altoOriginal=593;
function determineSize(){
	w=screen.width;
	h=screen.height;
	t=w+"x"+h;
	var miArray = new Array(2) 
	/*
	switch(t){
		
		case "800x600":
			miArray[0] = 800-getResto();
			miArray[1] = 510;
			break;
		case "1440x900":
			miArray[0] = 1440-getResto();
			miArray[1] = 660;
			break;
		case "1360x768":
			miArray[0] = 1360-getResto();
			miArray[1] = 580;
			break;
		default:
			//miArray[0] = screen.width-getResto();
			//miArray[1] = screen.height-200;
			//if (miArray[1]>820){
				//miArray[1]=820;
			//}
			
			miArray[0] = screen.width-getResto();
			ratio=1280/screen.width;
			miArray[1]=820/ratio;
			//miArray[1] = screen.height-200;
			if (miArray[1]>820){
				miArray[1]=820;
			}
			
	}
	*/
			miArray[0] = screen.width-getResto();
			ratio=anchoOriginal/screen.width;
			miArray[1]=altoOriginal/ratio;
			//miArray[1] = screen.height-200;
			if (miArray[1]>altoOriginal){
				miArray[1]=screen.height-240;
				
				altoAdaptado=screen.height-240;
				ratio=altoOriginal/altoAdaptado;
				anchoAdaptado=anchoOriginal/ratio;
			}else{
				altoAdaptado=miArray[1];
				ratio=altoOriginal/altoAdaptado;
				anchoAdaptado=anchoOriginal/ratio;
			}
	return miArray;
}

function getResto(){
	var navegador = navigator.appName ;
	if (navegador == "Microsoft Internet Explorer"){
		resto=22;
	}else if (navegador == "Netscape"){ 
		resto=18;
	}else{ 
		resto=19; 
	}
	return resto;
}

//---
function resizeOuterTo(w,h) {
	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			top.outerWidth=w;
			top.outerHeight=h;
	}
		else top.resizeTo(w,h);
	}
}

function fullscreen() {
	window.moveTo(16,16);
	resizeOuterTo(screen.width-32,screen.height-64);
}

