//////////////////////
//  ABRIR UNA VENTANA	      	
//////////////////////

function abrir_ventana(theURL,winName,w,h,toolbar,location,status,menubar,scroll,resizable) { 
  window.open(theURL,winName,features);
}

////////////////////////////////////////////
//  ABRIR UNA VENTANA
//  Código generado por Dreamweaver	      	
////////////////////////////////////////////
function MM_openBrWindow(theURL,winName,features) { //v2.0
  win = window.open(theURL,winName,features);
  win.focus();
}




///////////////////////////////
//  ABRIR UNA VENTANA CENTRADA
///////////////////////////////
var win=null;

//ABRIR UNA VENTANA SITUADA EN EL CENTRO DE LA PANTALLA
// toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=400,height=400
function Open_Vtna(pagina,nombre,w,h,toolbar,location,status,menubar,scroll,resizable) {
        LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
        TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
        settings = 'top='+TopPosition+',left='+LeftPosition+',toolbar='+toolbar+',location='+location+',status='+status+',menubar='+menubar+',scrollbars='+scroll+',resizable='+resizable+',width='+w+',height='+h;
        win = window.open(pagina,nombre,settings)
        win.focus();
}

//ABRIR UNA VENTANA MAXIMIZADA
// toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=400,height=400
function Open_VtnaM(pagina,nombre,toolbar,location,status,menubar,scroll,resizable) {
        settings = 'toolbar='+toolbar+',location='+location+',status='+status+',menubar='+menubar+',scrollbars='+scroll+',resizable='+resizable;
		//alert(settings);
        win = window.open(pagina,nombre,settings)
        win.focus();
	//window.moveTo(0,0); 
	/*if (document.all) { 
		win.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; 
		} 
	}*/
} 
	

////////////////////////////////////
//  CAMBIO DE TAMAÑO DE UNA VENTANA
////////////////////////////////////
  
var NS4 = ((parseInt(navigator.appVersion) >= 4) && (navigator.appName.indexOf("Netscape") != -1));
var IE4 = ((parseInt(navigator.appVersion) >= 4) && (navigator.appName.indexOf("Explorer") != -1));

function tamanyo(x,y) {
	if (NS4) {
   		window.innerWidth=x;
    		window.innerHeight=y;
    	}
    	if (IE4) {
    		window.resizeTo(x,y);
    	}
}

