$(document).ready(function(){
	
});

function classPopupWindow() {
	
	this.type		=	'alert';
	this.content	=	"";
	this.w 			= 	400;
	this.h 			= 	200;
	this.myWidth 	= 	0;
	this.myHeight 	= 	0;
	this.myLeft		=	0;
	this.myTop		=	0;
	
	document.getElementById("popupWindowContainer").style.display='block';
	document.getElementById("popupLoading").style.display='none';
		
	this.display = function() {	
			
		if( typeof( window.innerWidth ) == 'number' ) {
		    //Non-IE
		    this.myWidth = window.innerWidth;
		    this.myHeight = window.innerHeight;
		  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		    	//IE 6+ in 'standards compliant mode'
		    	this.myWidth = document.documentElement.clientWidth;
		    	this.myHeight = document.documentElement.clientHeight;		    	
			    
		  	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			    //IE 4 compatible
			    this.myWidth = document.body.clientWidth;
			    this.myHeight = document.body.clientHeight;			    
			  }	
			
		this.myTop = ((this.myHeight/2)-(this.h/2));
		this.myLeft = ((this.myWidth/2)-(this.w/2));
						
		document.getElementById("blackgroundDiv").style.display='block';
								
		document.getElementById("popupWindow").style.display='block';
		document.getElementById("subPopupWindow").style.height=this.h-23+"px";
			
		document.getElementById("popupWindow").style.left=this.myLeft+"px";
		
		
		if( typeof( window.innerWidth ) == 'number' ) {
			document.getElementById("popupWindow").style.top = this.myTop+"px";
		} else {
			document.getElementById("popupWindow").style.top = document.documentElement.scrollTop + this.myTop+"px";
			}
		
		document.getElementById("popupWindow").style.width = this.w+"px";
		document.getElementById("popupWindow").style.height = this.h+"px";
		
		if (this.type!='info') {
			document.getElementById("popupWindowIcon").innerHTML = '<img src="lib/popup/img/popup_'+this.type+'.jpg">';
		} else document.getElementById("popupWindowIcon").style.display='none';
		
		document.getElementById("popupWindowContent").innerHTML = this.content;
		
	}
}


function closePopupDiv(){
	
	document.getElementById("blackgroundDiv").style.display='none';
	document.getElementById("popupWindow").style.display='none';
	
	
	
}


