<!--

w=window;
window.onbeforeunload=close_popUp
window.onbeforeunload=close_popUps

WindowObjectArray=new Array()
function newWindowObject(obj){
	WindowObjectArray[WindowObjectArray.length]=obj	
	//alert(WindowObjectArray.length)	

}

function close_popUps(){
	for(i=0;i<WindowObjectArray.length;i++){
		WindowObjectArray[i].close()
	} 
}


function close_popUp(){ if(w.ventana){w.ventana.close();w.ventana=null}  }

function popup_win(URL,WinName,Features) {
	Features=Features.toLowerCase()			
	if(w.ventana){w.ventana.close();w.ventana=null}; 
	
	
	w.ventana=w.open(URL,WinName,Features)
//	w.top.newWindowObject(w.ventana);

	FeaturesArray=Features.split(",")
	for(i=0;i<FeaturesArray.length;i++){
		if(FeaturesArray[i].indexOf("width=")>-1){VentanaWidth=FeaturesArray[i].substring(6,FeaturesArray[i].length) };
		if(FeaturesArray[i].indexOf("height=")>-1){VentanaHeight=FeaturesArray[i].substring(7,FeaturesArray[i].length) };		
	}
	var ScreenWidth=screen.width-10; var ScreenHeight=screen.height-70;
	w.ventana.moveTo((ScreenWidth/2)-(VentanaWidth/2),(ScreenHeight/2)-(VentanaHeight/2))			
	w.ventana=null;
}


-->