//******************************************************//
//		popup_utils.js				//
//	contains javascript to handle popups		//
//******************************************************//
//Change Log:						//
//******************************************************//
//20051201tz - initial write				//
//20051221tz - added some constants for certain common	// 
//             pop up attributes			//
//******************************************************//	

//CONSTANTS FOR THE ATTRIBUTES FOR VARIOUS COMMON POPUPS
defaultATTRIBUTES="location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=650,height=400";
contactusATTRIBUTES = "location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=800,height=550,left=300"


function open_popup(URL,LOCATION,ATTRIBUTES)
{
	//if no URL is given do nothing
	if(URL == null || URL == "") return;

	var defaultLOCATION = "mysask_popup";

	//if no attributes given use default
	if(ATTRIBUTES == null || ATTRIBUTES == "") ATTRIBUTES = defaultATTRIBUTES;
	//if no location name is given use default
	if(LOCATION == null || LOCATION == "") LOCATION = defaultLOCATION;

	//open the pop up window	
	var myPopUp = window.open(URL,LOCATION,ATTRIBUTES);
	//make sure popup get focus in case this window was already open
	if(myPopUp != null) myPopUp.focus();
}

