var newwindow;
function poplite(url)
{
	newwindow=window.open(url,'lite','width=420,height=500,scrollbars=yes,resizable=yes');
	if (window.focus) {newwindow.focus()}
}
function popipix(url)
{
	newwindow=window.open(url,'ipix','width=320,height=360,resizable=yes');
	if (window.focus) {newwindow.focus()}
}
function pop575(url)
{
	newwindow=window.open(url,'575','width=575,height=450,resizable=yes');
	if (window.focus) {newwindow.focus()}
}

function printPage() { print(document); }

/**
	 * Method preventDoubleClickSubmitForm is invoked when user clicks on the Save button or any button that submits a form.
	 * The method prevents user from clicking the Save button too many times.
	 * 
	 *
	 * @author Nathan Steiner
	 * @since 2/11/2004
	 */
	 
	 var submitDone = false;
 
function preventDoubleClickSubmitForm(myForm, button) {	   	  
	      if (!submitDone) {
	         submitDone = true;
	         //button.value = 'Please Wait';
	         if (button != null) {
		         button.disabled = true;
		     }
	         myForm.submit();
	      } 
	      else {
	        alert ("Already submitted, please wait!");
	      }
	   return true;
	 }
	 
/** 
 	* Method replaceAll replaces all the isntances of a substring A 
 	* with substring B in a String. We use the JavaScript: replace
 	* function in a loop to achieve this.
 	*
 	* @author Nilesh Pusuluri/ Shanti Mangala
 	* @since 3/30/2006
 	*/
 	
 function replaceAll(inputString,A,B)
 {
	s = new String(inputString);
    while(s.indexOf(A) > -1)
   {
    	s = s.replace(A,B);
   }
   return s;
  }

/** 
 	* Method clearDefault clears the default value "Search the Site" 
 	* in the Search box when Search Box is in focus. 
 	* Method is invoked by the onFocus event.
 	*
 	* @author Gene Summers
 	* @since 4/18/2006
 	*/
  
  function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}