/* 
* Pop Window ==================================
* Function to open popup window;
* mypage = URL Link;
* myname = Name of popup window;
* width = Width of popup window;
* height  = Height of popup window;
* settings = Settings of popup window;
*/
function openNewWindow( mypage, myname, width, height, settings){
	myname = (myname=="") ? "newWindow" : myname;	
	width = (width=="") ? screen.width-200 : width;
	height = (height=="") ? screen.height-200 : height;
	LeftPosition = (screen.width) ? (screen.width - width)/2 : 0;
	TopPosition = (screen.height) ? (screen.height - height-25)/2 : 0;
	if (settings==""){
		settings = 'height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition;
		settings +=',scrollbars=1,resizable=0,status=1,menubar=0';
	}else{
		settings += ',height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition;
	}
	win=window.open(mypage,myname,settings);
	win.focus();
 	return win;
}
function openNewWindowNoReturn( mypage, myname, width, height, settings){
	myname = (myname=="") ? "newWindow" : myname;	
	width = (width=="") ? screen.width-200 : width;
	height = (height=="") ? screen.height-200 : height;
	LeftPosition = (screen.width) ? (screen.width - width)/2 : 0;
	TopPosition = (screen.height) ? (screen.height - height-25)/2 : 0;
	if (settings==""){
		settings = 'height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition;
		settings +=',scrollbars=1,resizable=0,status=1,menubar=0';
	}else{
		settings += ',height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition;
	}
	win = window.open(mypage,myname,settings);
	win.focus();
}
