// class modalWindow ////////////////////

	function modalWindow(){
		// fields
		this.modal  = 'false';
		this.win;
		
		// methods
		this.openWindow  = openWindow;
		this.closeWindow = closeWindow;
		this.checkWindow = checkWindow;		
	}
	
// class methods ////////////////////
	
		function openWindow(_modal, _file, _name, _x, _y, _width, _height){
			this.win = window.open(_file, _name,"width=" + _width + ",height=" + _height + ",left=" +_x +",top=" +_y);
			this.win.focus();
			this.modal = _modal;
		}
		
		function closeWindow(){
			if(this.modal == 'true'){
				this.modal = false;
				this.win.close();				
			}
		}
		
		function checkWindow(){
			if(this.modal == 'true'){
				this.win.focus()
			}
		}
