var contentWin;
function b(dir,nombre,alto){
if (contentWin != null) {
contentWin.destroy();
contentWin = new Window(nombre, {className:'alphacube',resizable: true,url:dir, hideEffectOptions: {duration:1}, top:0, left:0,width:390, height:alto,showEffectOptions: {duration:1}, minWidth: 10}) 
contentWin.toFront(); 
contentWin.setDestroyOnClose(); 
contentWin.showCenter();

myObserver = { 
onDestroy: function(eventName, win) { 
if (win.getId() == contentWin.getId()) { 
contentWin=null
Windows.removeObserver(this); 
} 
} 
} 
Windows.addObserver(myObserver); 
} 


else if(nombre=='ventana1'){ 
contentWin = new Window(nombre, {className:'alphacube',resizable: true,url:dir, hideEffectOptions: {duration:1}, top:0, left:0,width:390, height:alto,showEffectOptions: {duration:1}, minWidth: 10}) 
contentWin.toFront(); 
contentWin.setDestroyOnClose(); 
contentWin.showCenter();
myObserver = { 
onDestroy: function(eventName, win) { 
if (win.getId() == contentWin.getId()) { 
contentWin=null
Windows.removeObserver(this); 
} 
} 
} 
Windows.addObserver(myObserver); 
}


}
