var DivPopup = {
	  /* 
  * Main open popup function
  * 
  * @param id string id to register popup and destroy it if on screen when called
  * @param width width of the popup
  * @param height height of the popup
  * @param content_div reference to a dom element to be displayed in popup
  * @param url url of page to be displayed in popup 
  */
  
  //window.js
  //DivPopup.openPopup('rates_sales_policies', 500, 400, null, "/"+originViewBean.codeLangDirectory+"/reservation/internet-sales-conditions.html");
  openPopup: function(id, width, height, content_div, url, the_title, title_height)
  {
   
    var popup = this[id];
    if(popup)
      popup.destroy();
    popup = new Window(
    {
      className: 'accor', 
      width: width, 
      height: height, 
      minimizable: false, 
      maximizable: false,
      url: url,
      showEffect:  Element.show,
      hideEffect:  Element.hide,
      title:the_title,
      title_height: title_height
    }
    );
    if(content_div)
    {
      popup.getContent().update(content_div.innerHTML);
    }
    popup.showCenter();
    this.addWindowCloseLabel(popup);
    return popup;
  },
  
  addWindowCloseLabel: function(win) 
  {
    var close_id = win.getId() + "_close";
    /* add caption to close button */
    if($(close_id))
      $(close_id).innerHTML = I18N._('popup','Close');
  }
	
	
}
