 
   // Create Modal Window using DHTMLX FRAMEWORK;
   // IPV International SRL;
   
   var admin_theme_url = cp_url+'app-themes/theme-cp/media/';
   
   function Window() {
	   
   
	   
	   this.id          = 'mywin'          ;
	   this.title       = 'my Title'       ;
	   this.width;
	   this.height;
	   this.useModal    = true             ;
	   this.resizable   = true             ;
	   this.closable    = true             ;
	   this.skin        = 'modern_black'   ;
	   this.imgPath     = admin_theme_url+'js/codebase/imgs/' ;
	   this.url         = 'http://www.google.ro';
	   this.defaultpos  = false;
	   this.posx        = 0;
	   this.posy        = 0;
	   this.addButton   = addButton;
	   this.mofo        = "";

	   this.open        =  function() {
		
	   this.modal = new dhtmlXWindows();
       this.modal.setImagePath(this.imgPath);
	   this.modal.setSkin(this.skin);		
	   


		   this.win =  this.modal.createWindow(this.id , 10 , 10 , this.width , this.height);	  
   if (this.closable == false) {
				this.modal.window(this.id).button("close").hide();  
			  }		   
		   
		      this.win.setText(this.title);
			
			  
			  if (this.resizable == true) {
				  this.win.allowResize();
			  } else {
				  this.win.denyResize();  
			  }
			  
			  this.win.setModal(this.useModal);
			  
			  if (this.defaultpos == true) {
				 this.win.setPosition(this.posx , this.posy); 
			  } else {
			  this.win.center();
			  }  

           
			  this.win.attachURL(this.url); 
			  
	   }  
   }
   
     function addButton() {
		  this.win.addUserButton('test1', 0, 'refresh', 'refresh');
	 }
   
        
	   
	   
	   
	   
   
   
   

   /*
   <script>
		    function attachURL(url,title) {
			document.getElementById("bodyman").className='load';
	  var dhxWins = new dhtmlXWindows();

	  dhxWins.setSkin("modern_black");
      dhxWins.setImagePath("../media/js/codebase/imgs/");
	  var w1 = dhxWins.createWindow("w1", 10, 10, 550, 200);
	  w1.setPosition(200,155); 
	  w1.setText(title);
	  w1.addUserButton('test', 1, 'aa', 'help'); 
	  w1.addUserButton('test1', 0, 'refresh', 'refresh'); 
	  w1.setModal(true);
	
	  
	dhxWins.window('w1').button('test1').attachEvent("onClick", function () { w1.attachURL(url); } ); 
	
	  
	  w1.attachURL(url);
	  dhxWins.window('w1').attachEvent("onClose", function () { document.getElementById("bodyman").className='unload';w1.hide(); } );  
	  
}

</script>*/

