// JavaScript Document
// open a popup window
function OpenPopup(filename){
   		var xMax = 800, yMax=600; // default
		var w=700, h=540; //popup size
		var myfilename=filename;
   		if (document.all || document.layers) {
			xMax = screen.availWidth;
   			yMax = screen.availHeight;
		}
    	xMid = xMax - w;
		yMid = yMax - h;
		var xOffset = xMid/2 , yOffset = yMid/2;
		window.open(myfilename, 'newWin', 'width='+w+',height='+h+', top='+yOffset+', left='+xOffset+', scrollbars=yes,resizable=yes, statusbar=yes');
}

function OpenPopup2(filename){
   		var xMax = 800, yMax=600; // default
		var w=780, h=540; //popup size
		var myfilename=filename;
   		if (document.all || document.layers) {
			xMax = screen.availWidth;
   			yMax = screen.availHeight;
		}
    	xMid = xMax - w;
		yMid = yMax - h;
		var xOffset = xMid/2 , yOffset = yMid/2;
		window.open(myfilename, 'newWin', 'width='+w+',height='+h+', top='+yOffset+', left='+xOffset+', scrollbars=yes,resizable=yes, statusbar=yes');
}
//close the window
function closeWindow() {  
			self.close();
}
// this is used to close the current window and goto a page in the parent window
function gotoPage(url){
		opener.location.href = url;
		self.close();
}
