// -----------------------------------------
// Scripts para Abrir Ventanas de idiomas
// -----------------------------------------

function bNavegador() {
  if( navigator.appName )
  {
    if( navigator.appName == "Microsoft Internet Explorer")  return 1;
    if( navigator.appName == "Netscape")  return 2;
  }
  return 0;
}
	
var contador = 1;

function AbreVentana(ventana){
  var w=640, h=480;
  var windowName = new String( contador );
  windowName = "v" + windowName;
  var x = bNavegador();	
  if (window.screen && window.screen.availHeight) {
    h = window.screen.availHeight - 50; // 63
    if( x==2 ) h = h - 11;
    w = window.screen.availWidth - 8; //4
  }

if (ventana==1)
  window.open("italiano/index.html", windowName, "status=yes,resizable=yes,toolbar=no,scrollbars=yes,top=0,left=0,width=" + w + ",height=" + h, 1 );

if (ventana==2)
  window.open("espanol/index.html", windowName, "status=yes,resizable=yes,toolbar=no,scrollbars=yes,top=0,left=0,width=" + w + ",height=" + h, 1 );

if (ventana==3)
  window.open("english/index.html", windowName, "status=yes,resizable=yes,toolbar=no,scrollbars=yes,top=0,left=0,width=" + w + ",height=" + h, 1 );

if (ventana==4)
  window.open("francais/index.html", windowName, "status=yes,resizable=yes,toolbar=no,scrollbars=yes,top=0,left=0,width=" + w + ",height=" + h, 1 );

if (ventana==5)
window.open("cumpleanios/ind_inscrip.html",windowName,"top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=760,screenX=25,screenY=30,height=540");

if (ventana==6)
  window.open("cumpleanios/ind_inscrip.html",windowName,
"status=yes,toolbar=no,scrollbars=yes,resizable=yes,width=790,height=520,top=0,left=0");

if (ventana==7) window.open("cumpleanios/ind_inscrip.html",windowName,"scrollbars=yes,resizable=yes,width=780,height=540,left=0,top=0");

if (ventana==8)
window.open("cumpleanios/ind_inscrip.html",windowName,"scrollbars=yes,resizable=yes,width=780,height=540,left=0,top=0");

if (ventana==9)
  window.open("cumpleanios/ind_inscrip.html", windowName, "status=yes,resizable=yes,scrollbars=yes,top=0,left=0,width=" + w + ",height=" + h, 1);

if (ventana==10)
window.open("cumpleanios/ind_inscrip.html",windowName,"toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=630,height=400");

if (ventana==11)
window.open("cumpleanios/ind_inscrip.html", windowName, "status=yes,resizable=yes,scrollbars=yes,top=0,left=0,width=" + w + ",height=" + h, 1);

if (ventana==12)
  window.open("cumpleanios/ind_inscrip.html", windowName, "scrollbars=yes,resizable=yes,width=780,height=540,left=0,top=0");

if (ventana==13)
window.open("cumpleanios/ind_inscrip.html",windowName,"scrollbars=yes,resizable=yes,width=780,height=540,left=0,top=0");

contador = contador + 1;
}

// -----------
// fin scripts 
// -----------

// -----------------------------------------
// Script para abrir ventanas de coleccion
// -----------------------------------------
function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

// -----------
// fin scripts
// -----------

esjs = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
bVer = parseInt(navigator.appVersion);

var newWin=null;

function popupwp(URL) {
day = new Date();
id = day.getTime();
//ancho=511
// alto 580
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=320,height=240,left=50,top=55');");
}

function popup(loc, name, width, height) {
	var _params = "width="+width+",height="+height+",resizable=no,status=no,scrollbars=no";

	// CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
	if (bVer >= 4) {
		 _left = ( (screen.width-width) >>1 );
		 _top = ( (screen.height-height) >>1 );
	} else {
		 _left = ( (800-width) >>1 );
		 _top = ( (600-height) >>1 );
	}

	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

	newWin = window.open(loc, name, _params);
	if ( newWin!=null && !(IE && bVer<5) )
		newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

function popupsc(loc, name, width, height) {
	var _params = "width="+width+",height="+height+",resizable=no,status=yes,scrollbars=yes";

	// CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
	if (bVer >= 4) {
		 _left = ( (screen.width-width) >>1 );
		 _top = ( (screen.height-height) >>1 );
	} else {
		 _left = ( (800-width) >>1 );
		 _top = ( (600-height) >>1 );
	}

	if (IE) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

	newWin = window.open(loc, name, _params);
	if ( newWin!=null && !(IE && bVer<5) )
		newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

function popup0(URL) {
day = new Date();
id = day.getTime();
//ancho=511
// alto 580
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=670,height=459,left=25,top=25');");
}

function imprime(URL) {
day = new Date();
id = day.getTime();
//ancho=511
// alto 580
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=400,height=459,left=25,top=25');");
}

function download(ruta,areaid,paginaid) {
window.open(ruta,'Downloads','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=260,screenX=220,screenY=220,height=100');
}

function cerrar() {
window.close();
}
/*function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}*/

