function openInfoDialog(msg, to) {
   if (typeof to == "undefined") 
        timeout = 2;
   else
   		timeout = to;
  
  Dialog.info(msg,{width:250, showProgress: false, destroyOnClose: true,className: 'alphacube'});
  setTimeout(infoTimeout, 1000)
}

function infoTimeout() {
  timeout--;
  if (timeout >0) {
    setTimeout(infoTimeout, 1000)
 }
 else
  Dialog.closeInfo()
}

function openPopup(pUrl, pTitle, pWidth, pHeight ) {
	var win = new Window('window_id', {width:pWidth, height:pHeight, className: "alphacube", title: pTitle, recenterAuto:false, resizable: false, minimizable: false, maximizable: false, url:pUrl});
	win.setDestroyOnClose();
	win.setZIndex(101);
	win.showCenter(true); 
	win.toFront();
}
function openPopupHTML(pHtml, pTitle, pWidth, pHeight ) {
	var win = new Window('window_id', {width:pWidth, height:pHeight, className: "alphacube", title: pTitle, recenterAuto:false, resizable: false, minimizable: false, maximizable: false});
	win.getContent().update(pHtml); 
	win.setDestroyOnClose();
	win.setZIndex(101);
	win.showCenter(true); 
	win.toFront();
}