



var JS_SEARCH_MISSING_ERROR  = "Please enter your search criteria.";
var JS_SEARCH_FORMAT_ERROR  = "Please enter valid search criteria.";
var JS_YOUR_NAME_MISSING_ERROR = "Please enter your name.";
var JS_FRIEND_NAME_MISSING_ERROR = "Please enter your friend's name.";
var JS_YOUR_EMAIL_MISSING_ERROR = "Please enter your e-mail address.";
var JS_FRIEND_EMAIL_MISSING_ERROR = "Please enter your friend's e-mail address.";
var JS_YOUR_NAME_FORMAT_ERROR = "Please use only letters and/or numerals.";
var JS_FRIEND_NAME_FORMAT_ERROR = "Please use only letters and/or numerals.";
var JS_EMAILADDRESS_MISSING_ERROR = "Please enter your e-mail address.";
var JS_EMAILADDRESS_FORMAT_ERROR  = "Please enter a valid e-mail address.";
var JS_COMMENTS_MESSAGE_TOO_LONG = "Please enter maximum of 500 characters.";
var JS_FIRSTNAME_MISSING_ERROR = "";
var JS_FIRSTNAME_FORMAT_ERROR = "";
var JS_LASTNAME_MISSING_ERROR = "";
var JS_LASTNAME_FORMAT_ERROR = "";
var JS_ADDRESS_MISSING_ERROR = "";
var JS_ADDRESS_FORMAT_ERROR = "";
var JS_CITY_MISSING_ERROR = "";
var JS_CITY_FORMAT_ERROR = "";
var JS_STATE_MISSING_ERROR = "";
var JS_ZIP_MISSING_ERROR = "";
var JS_ZIP_FORMAT_ERROR = "";
var JS_AREACODE_MISSING_ERROR = "";
var JS_PREFIX_PHONE_MISSING_ERROR = "";
var JS_SUFFIX_PHONE_MISSING_ERROR = "";
var JS_PHONE_FORMAT_ERROR = "";
var JS_METHOD_MIN_ERROR = "";
var JS_METHOD_MAX_ERROR = "";
var JS_POSTALCODE_MISSING_ERROR = "";
var JS_POSTALCODE_FORMAT_ERROR = "";
var JS_PROVINCE_MISSING_ERROR = "";
var JS_PROVINCE_FORMAT_ERROR = "";



var JS_SEARCH_MISSING_ERROR  = "Please enter your search criteria.";
var JS_SEARCH_FORMAT_ERROR  = "Please enter valid search criteria.";
var JS_YOUR_NAME_MISSING_ERROR = "Please enter your name.";
var JS_FRIEND_NAME_MISSING_ERROR = "Please enter your friend's name.";
var JS_YOUR_EMAIL_MISSING_ERROR = "Please enter your e-mail address.";
var JS_FRIEND_EMAIL_MISSING_ERROR = "Please enter your friend's e-mail address.";
var JS_YOUR_NAME_FORMAT_ERROR = "Please use only letters and/or numerals.";
var JS_FRIEND_NAME_FORMAT_ERROR = "Please use only letters and/or numerals.";
var JS_EMAILADDRESS_MISSING_ERROR = "Please enter your e-mail address.";
var JS_EMAILADDRESS_FORMAT_ERROR  = "Please enter a valid e-mail address.";
var JS_COMMENTS_MESSAGE_TOO_LONG = "Please enter maximum of 500 characters.";
var JS_FIRSTNAME_MISSING_ERROR = "Please enter your first name.";
var JS_LASTNAME_MISSING_ERROR = "Please enter your last name.";
var JS_FIRSTNAME_FORMAT_ERROR = "Please use only letters and/or numerals.";
var JS_LASTNAME_FORMAT_ERROR = "Please use only letters and/or numerals.";



<!-- Start of component template output -->
<!--
//THIS FILE HOLDS THE VARIOUS FORM FIELD VALIDATION
//ALL REQUIRED FIELDS THAT ARE USED ON THE SITE
//ARE INCLUDED IN THIS FILE. EACH FIELD IS CHECKED TO
//SEE IF IT BELONGS ON THE FORM. IF IT IS THEN THE FIELD
//WILL BE CHECKED
//

//Declare variables
blanks = " \t\n\r"; 
phoneNumberDelimiters = "()- ";
invalidChar="`!@#$%^&*||~?<>:;\"{}()[]\\/,";
period =".";
underscore="_";
dash ="-";
empty='';
open_bracket="(";
close_bracket=")";
slash="/";
space=" ";
apostrophe ="'";
intCharSet = "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ"

function validateForm(theForm){

			//check if the form has an email address field (used in newsletter registration)
			if(theForm.emailaddress){	
			
				if(theForm.emailaddress.value == ""){
					alert(JS_EMAILADDRESS_MISSING_ERROR);
					theForm.emailaddress.focus();
					return false;				
				}else{
					if(!isValidEmail(theForm.emailaddress.value)){
						alert(JS_EMAILADDRESS_FORMAT_ERROR);
						theForm.emailaddress.focus();
						return false;
					}
					theForm.emailaddress.value = trim(theForm.emailaddress.value);
				}
			}			

			//check if the form has a firstname field
			if(theForm.textFirstName){
				if(trim(theForm.textFirstName.value) == ""){
					alert(JS_FIRSTNAME_MISSING_ERROR);
					theForm.textFirstName.focus();
					return false;
				}else{
					if(!isAlphaNumeric(theForm.textFirstName.value)){
						alert(JS_FIRSTNAME_FORMAT_ERROR);
						theForm.textFirstName.focus();
						return false;
					}
				theForm.textFirstName.value = trim(theForm.textFirstName.value);
						
				}
			}
			
			//check if the form has a last name field
			if(theForm.textLastName){
				if(trim(theForm.textLastName.value) == ""){
					alert(JS_LASTNAME_MISSING_ERROR);
					theForm.textLastName.focus();
					return false;
				}else{
					if(!isAlphaNumeric(theForm.textLastName.value)){
						alert(JS_LASTNAME_FORMAT_ERROR);
						theForm.textLastName.focus();
						return false;
					}	
				theForm.textLastName.value = trim(theForm.textLastName.value);
				}
			}
			
			
			//validate the address field
			if(theForm.textAddress){
				if(trim(theForm.textAddress.value) == ""){
					alert(JS_ADDRESS_MISSING_ERROR);
					theForm.textAddress.focus();
					return false;
				}else{
					if(!isValidAddress(theForm.textAddress.value)){
						alert(JS_ADDRESS_FORMAT_ERROR);
						theForm.textAddress.focus();
						return false;
					}
				theForm.textAddress.value = trim(theForm.textAddress.value)
				}
			}
			
			if(theForm.textAptNo){	
				if(trim(theForm.textAptNo.value) != ""){
					if(!isWhateverDoesNotFitInAnother(theForm.textAptNo.value)){
						alert(JS_ADDRESS_FORMAT_ERROR);
						theForm.textAptNo.focus();
						return false;
					}
				theForm.textAptNo.value = trim(theForm.textAptNo.value);
				}
			}
			
			//validate the city field
			if(theForm.textCity){
				if(trim(theForm.textCity.value) == ""){
					alert(JS_CITY_MISSING_ERROR);
					theForm.textCity.focus();
					return false;
				}else{
					if(theForm.textCity.value == "-"){
						alert(JS_CITY_FORMAT_ERROR);
						theForm.textCity.focus();
						return false;
					}else if(!isAlphaNumeric(theForm.textCity.value)){
						alert(JS_CITY_FORMAT_ERROR);
						theForm.textCity.focus();
						return false;
					}
				theForm.textCity.value = trim(theForm.textCity.value);
				}
			}
			
			
			if(theForm.selectState){
				//validate the sate
				if(theForm.selectState.selectedIndex=="0"){
					alert(JS_STATE_MISSING_ERROR);
					theForm.selectState.focus();
					return false;
				}
			}
			
			//validate the zip code
			if(theForm.textZip){
				if(trim(theForm.textZip.value) == ""){
					alert(JS_ZIP_MISSING_ERROR);
					theForm.textZip.focus();
					return false;
				}else {
					if(!isZipCode(theForm.textZip.value)){
						alert(JS_ZIP_FORMAT_ERROR);
						theForm.textZip.focus();
						return false;
					}
				theForm.textZip.value = trim(theForm.textZip.value);
				}	
			}
						
			
			//validate phone number
			if((theForm.textAreaCode) && (theForm.textPhone) && (theForm.textSuffix)){
				var phoneNumber = theForm.textAreaCode.value + "" + theForm.textPhone.value + "" + theForm.textSuffix.value;
				if(theForm.textAreaCode.value.length < 3){
						alert(JS_AREACODE_MISSING_ERROR);
						theForm.textAreaCode.focus();
						return false;				
				}else if(theForm.textPhone.value.length < 3){
					alert(JS_PREFIX_PHONE_MISSING_ERROR);
					theForm.textPhone.focus();
					return false;
				}else if(theForm.textSuffix.value.length < 4){
					alert(JS_SUFFIX_PHONE_MISSING_ERROR);
					theForm.textSuffix.focus();
					return false;
				}else{
					if(!isPhone(phoneNumber)){
						alert(JS_PHONE_FORMAT_ERROR);
						theForm.textAreaCode.focus();
						return false;
					}
				theForm.textAreaCode.value = trim(theForm.textAreaCode.value);
				theForm.textPhone.value = trim(theForm.textPhone.value);
				theForm.textSuffix.value = trim(theForm.textSuffix.value);
				}
			}		
				
			//check if the form has an email address field
			if(theForm.textEmailAddress){	
			
				if(theForm.textEmailAddress.value == ""){
					alert(JS_EMAILADDRESS_MISSING_ERROR);
					theForm.textEmailAddress.focus();
					return false;				
				}else{
					if(!isValidEmail(trim(theForm.textEmailAddress.value))){
						alert(JS_EMAILADDRESS_FORMAT_ERROR);
						theForm.textEmailAddress.focus();
						return false;
					}
					theForm.textEmailAddress.value = trim(theForm.textEmailAddress.value);
				}
			}
			
			//check if the form has an email address field- for Unity Email
			if(theForm.EmailAddress){	
			
				if(theForm.EmailAddress.value == ""){
					alert(JS_EMAILADDRESS_MISSING_ERROR);
					theForm.EmailAddress.focus();
					return false;				
				}else{
					if(!isValidEmail(theForm.EmailAddress.value)){
						alert(JS_EMAILADDRESS_FORMAT_ERROR);
						theForm.EmailAddress.focus();
						return false;
					}
					theForm.EmailAddress.value = trim(theForm.EmailAddress.value);
				}
			}			
		
				
		//check sending page - friend name		
		if(theForm.textFriendName){
				if(trim(theForm.textFriendName.value) == ""){
					alert(JS_FRIEND_NAME_MISSING_ERROR);
					theForm.textFriendName.focus();
					return false;
				}				
				else{
				if(!isAlphaNumeric(trim(theForm.textFriendName.value))){
					alert(JS_YOUR_NAME_FORMAT_ERROR);
					theForm.textFriendName.focus();
					return false;
				}
				theForm.textFriendName.value = trim(theForm.textFriendName.value);
			}
		}				

			//check sending page - your email
		if(theForm.textFriendEmail){	
			
				if(trim(theForm.textFriendEmail.value) == ""){
					alert(JS_FRIEND_EMAIL_MISSING_ERROR);
					theForm.textFriendEmail.focus();
					return false;				
				}else{
					if(!isValidEmail(trim(theForm.textFriendEmail.value))){
						alert(JS_EMAILADDRESS_FORMAT_ERROR);
						theForm.textFriendEmail.focus();
						return false;
					}
					theForm.textFriendEmail.value = trim(theForm.textFriendEmail.value);
				}
			}
		//check sending page - your name					
		if(theForm.textYourName){
			if(trim(theForm.textYourName.value) == ""){
				alert(JS_YOUR_NAME_MISSING_ERROR);
				theForm.textYourName.focus();
				return false;
				}				
				else{
				if(!isAlphaNumeric(trim(theForm.textYourName.value))){
					alert(JS_YOUR_NAME_FORMAT_ERROR);
					theForm.textYourName.focus();
					return false;
				}
				theForm.textYourName.value = trim(theForm.textYourName.value);
			}
		}		
		
		//check sending page - your email
		if(theForm.textYourEmail){	
			
				if(trim(theForm.textYourEmail.value) == ""){
					alert(JS_YOUR_EMAIL_MISSING_ERROR);
					theForm.textYourEmail.focus();
					return false;				
				}else{
					if(!isValidEmail(trim(theForm.textYourEmail.value))){
						alert(JS_EMAILADDRESS_FORMAT_ERROR);
						theForm.textYourEmail.focus();
						return false;
					}
					theForm.textYourEmail.value = trim(theForm.textYourEmail.value);
				}
			}
		
		if(theForm.textMessage){	
			
				if (!isMessageCommentLengthOK(trim(theForm.textMessage.value),500)){
					alert(JS_COMMENTS_MESSAGE_TOO_LONG);
					theForm.textMessage.focus();
					return false;				
				}
			}
			
		//checks search string input
		if(theForm.qu){
			if(trim(theForm.qu.value)==""){
				alert(JS_SEARCH_MISSING_ERROR);
				theForm.qu.focus();
				return false;
			}else{
				if(!isAlphaNumeric(trim(theForm.qu.value))){
					alert(JS_SEARCH_FORMAT_ERROR);
					theForm.qu.focus();
					return false;
				}
			}
		}
		return true;
}
	
	
//Declare variables
blanks = " \t\n\r"; 

// Removes leading blank chars (as defined by blanks) from s

function stripLeadingBlanks(s)
  { 
  var i = 0;
  while ((i < s.length) && (blanks.indexOf(s.charAt(i)) != -1))
     i++;
  return s.substring(i, s.length);
  }


// Removes trailing blank chars (as defined by blanks) from s

function stripTrailingBlanks(s)
  { 
  var i = s.length - 1;
  while ((i >= 0) && (blanks.indexOf(s.charAt(i)) != -1))
     i--;
  return s.substring(0, i+1);
  }


// Removes leading+trailing blank chars (as defined by blanks) from s

function stripLeadingTrailingBlanks(s)
  { 
  s = stripLeadingBlanks(s);
  s = stripTrailingBlanks(s);
  return s;
  }



// This function checks the postive integer entry
function isPositiveInteger(inte2){
	 inte=stripLeadingTrailingBlanks(inte2)
	 ok=true;
	 if (inte.length==0)
	 { ok=false;
	 }
	  for (i=0;i<inte.length;i++ )
	  { 
		   theChar=inte.charAt(i);
		   if ((theChar<"0")||(theChar>"9"))
		   {
			   ok=false;
			   break;
		   } 
		   if (eval(inte)<=0)
		   {
			   ok=false;
			   break;
		   }
	  }
	  return ok;
}


//check if the passed string is vaid email address characters
function isEmailChars(str){
	var theText = /^[\@\.a-z0-9_-]+$/gi;
		var result = str.match(theText);
		if(result != null){
			return true;			
		}else{
			return false;
		}

}

// check if the passed string is vaid email address 
function isValidEmail(strEmail){
   if (trim(strEmail)=='')
	{
	return false;
	}

   if (!isEmailChars(strEmail))
	{  
	return false;
	}
   var emailPattern = /^[a-z0-9]+([_.-][a-z0-9]+)*@[a-z0-9]+([-.][a-z0-9]+)*[.]{1}[a-z]{2,}$/gi;
   var result = strEmail.match(emailPattern);
   if(result != null)
	{
	return true;
	} else 
	{
	return false; 
	}		
}



//This function checks leap year
function isLeapYear(intYear) {
	if (intYear % 100 == 0){
		if (intYear % 400 == 0) {
			return true; 
		}
    }  else {
		if ((intYear % 4) == 0) { 
			return true; 
		}
    } //end if
	return false;
} //end function


//This checks that if valid date range checked
function isValidDate(smonth,sday,syear){
	if ((smonth=='')||(sday=='')||(syear==''))
	{
		return false;
	}
    if (((smonth==4)||(smonth==6)||(smonth==9)||(smonth==11))&&(sday>30)){
	return false;
	}
	
	//check leap year and Feb. entry
	if (smonth==2){
	  if ((isLeapYear(syear))&&(sday>29)){
	    return false;
	   } 
	    if ((!isLeapYear(syear))&&(sday>28)){
	    return false;
	   } 
	}	
   return true;
}

function isDigit(str){
	var theText = /^[0-9]+$/;
		var result = str.match(theText);
		if(result != null){
			//isValid=true;
			return true;
			
		}else{
			return false;
		}
}

//check alpha only
function isAlpha(str){
	var theText = /^[\'\sa-zA-Z_-]+$/;
		var result = str.match(theText);
		if(result != null){
			//isValid=true;
			return true;
			
		}else{
			return false;
		}

}



function isValidAddress(str){

	var theText =  /^([ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿa-zA-Z0-9]+[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ\'\#\,\'\s\.a-zA-Z0-9_-]*)$/;
	var result = str.match(theText);
		if(result != null){
			return true;
			
		}else{
			return false;
		}

}



//check alphanumeric 
function isAlphaNumeric(str){
	var theText = /^([ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿa-zA-Z0-9]+[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ\'\s\.a-zA-Z0-9_-]*)$/;
		var result = str.match(theText);
		if(result != null){
			return true;
			
		}else{
			return false;
		}

}

//check length of a field
function isFieldLengthOK (strField,min, max){
	if ((trim(strField).length<=max) && (trim(strField).length>=min))
	{
		return true;
	} else {
		return false;
	}
}


//check alphanumeric 
function isWhateverDoesNotFitInAnother(str){
	var theText = /^[\'\s\.#a-zA-Z0-9_-]+$/;
		var result = str.match(theText);
		if(result != null){
			//isValid=true;
			return true;
			
		}else{
			return false;
		}

}

//check valid password entry
function isPassword(str){
	var theText = /^[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ!@#\$%^&*\(\)a-zA-Z0-9_-]+$/;
		var result = str.match(theText);
		if(result != null){
			
			return true;
			
		}else{
			return false;
		}

}

function isZipCode(str){

	if(str.length == 5){
		var theDigit = /\d{5}/;
	}else if(str.length == 9){
		var theDigit = /\d{9}/;
	}else if(str.length == 10){
		var theDigit = /\d{5}-\d{4}/;
	}else{
		return false
	}
		var result = str.match(theDigit);
		if(result != null){
			//isValid=true;
			return true;
			
		}else{
			return false;
		}
}

function isPhone(str){
	if(str.length == 10){
		var theFormat = /\d{10}/;
		var result = str.match(theFormat);
		if(result != null){
			return true;
		}else{
			return false;
		}
	}
}

// This function check if the string is a valid search input
function isValidInternationlSearch(strName){
	strName=stripLeadingTrailingBlanks(strName);
	if ((strName==empty)||(strName==dash)||(strName==underscore)||(strName==apostrophe))
	{
		return false;
	} else {
		for (i=0;i<strName.length;i++ )
		{ 
			badChar=strName.charAt(i);
			invalidChar2=invalidChar+period;
			if (invalidChar2.indexOf(badChar)!=-1)
			{
            return false;
			break;
			}
		}
		return true;
	}
}

// This function check the comments/message length
function isMessageCommentLengthOK(strComment,len){
	if ((trim(strComment)).length>len){
		return false;
	}
	return true;
}


function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also
   // removes consetrimive spaces and replaces it with one space.
   
   var returnValues = inputString;
   var ch = returnValues.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      returnValues = returnValues.substring(1, returnValues.length);
      ch = returnValues.substring(0, 1);
   }
   ch = returnValues.substring(returnValues.length-1, returnValues.length);
   while (ch == " ") { // Check for spaces at the end of the string
      returnValues = returnValues.substring(0, returnValues.length-1);
      ch = returnValues.substring(returnValues.length-1, returnValues.length);
   }
   while (returnValues.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      returnValues = returnValues.substring(0, returnValues.indexOf("  ")) + returnValues.substring(returnValues.indexOf("  ")+1, returnValues.length); // Again, there are two spaces in each of the strings
   		
   }
   
   
   return returnValues; // Return the trimmed string back to the user
} // Ends the "trim" function



//print from javascript
function printWindow(){
	if (window.print){
		window.print()		
	}else{
		alert("You will need to use File->Print from the menu bar.")
	}
}


// cbeck contact us form entry
function checkContactUsFormEntry(form){
	if (trim(form.textFirstName.value)=='')
	{	
		alert (JS_FIRSTNAME_MISSING_ERROR);
		form.textFirstName.focus();
		return false;
	}
	if (trim(form.textLastName.value)=='')
	{	
		alert (JS_LASTNAME_MISSING_ERROR);
		form.textLastName.focus();
		return false;
	}	
	
	if (trim(form.textEmail.value)=='')
	{
		alert (JS_EMAILADDRESS_MISSING_ERROR);
		form.textEmail.focus();
		return false;
	}
	
	if (!isValidEmail(form.textEmail.value))
	{
		alert (JS_EMAILADDRESS_FORMAT_ERROR);
		form.textEmail.focus();
		return false;
	}
	if (trim(form.textareaMessage.value)=='')
	{	
		alert (JS_SMS_CONTACT_US_MESSAGE_MISSING);
		form.textareaMessage.focus();
		return false;
	}else if (!isMessageCommentLengthOK(form.textareaMessage.value,500)){
		alert (JS_COMMENTS_MESSAGE_TOO_LONG);
		form.textareaMessage.focus();
		return false;
	}

}

// Function for segment navigation
function changeUrl(url){

	window.location.href=url;
}


// Start code for sendToFriend
function sendToFriend(objLink) {
	// get the url of the document being sent
	var strCurrentUrl = escape ( parent.document.URL ) ;
	// get the page <title> of the document being sent
	var strPageTitle = escape( parent.document.title );

	var strURLParams = '?pageToSend=' + strCurrentUrl + '&pageTitle=' + strPageTitle + '&mode=submitted'
	var strURL = objLink.href + strURLParams
	var strWindowProperties = 'width=409,height=460,scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'
	
	// open the window
	openWindow(strURL ,'send_to_a_friend', strWindowProperties);
	
	// prevent any further code from executing
	return false;
}

// End code for sendToFriend

var popupWin;
function openWindow(URL, Name, Args) {
	popupWin = window.open(URL, Name, Args) ;
	popupWin.focus() ;
}

//This function will apply a background color 
//of white to two selected elements.
//The elements must be called by id.
//This will work in IE 4+ and Netscape 6, not in Netscape 4.

function changeBgColor(elem1ID,elem2ID) {

if (document.all) {
	docObj = 'document.all.';
	styleObj = '.style';
	obj1 = eval(docObj + elem1ID + styleObj);
	obj2 = eval(docObj + elem2ID + styleObj);
	
	obj1.backgroundColor = '#FFFFFF';
	obj2.backgroundColor = '#FFFFFF';
	}
	
else if (document.getElementById) {
	docObj = 'document.getElementById';
	styleObj = '.style';
	obj1 = eval(docObj + "('" + elem1ID + "')" + styleObj);
	obj2 = eval(docObj + "('" + elem2ID + "')" + styleObj);
	
	obj1.backgroundColor = '#FFFFFF';
	obj2.backgroundColor = '#FFFFFF';
	}
	
}

//This function will remove the background color 
//from two selected elements. Called restore because 
//it's being used to reverse the previous function.

function restoreBgColor(elem1ID,elem2ID) {

var strBackgroundColor = '#D7E3BB';

if (window.location.href.indexOf('/antagonBasics/') != -1) {
	strBackgroundColor = '#D7E3BB';
}

if (document.all) {
	docObj = 'document.all.';
	styleObj = '.style';
	obj1 = eval(docObj + elem1ID + styleObj);
	obj2 = eval(docObj + elem2ID + styleObj);
	
	obj1.backgroundColor = strBackgroundColor;
	obj2.backgroundColor = strBackgroundColor;
	}
	
else if (document.getElementById) {
	docObj = 'document.getElementById';
	styleObj = '.style';
	obj1 = eval(docObj + "('" + elem1ID + "')" + styleObj);
	obj2 = eval(docObj + "('" + elem2ID + "')" + styleObj);
	
	obj1.backgroundColor = strBackgroundColor;
	obj2.backgroundColor = strBackgroundColor;
	}
	
}

//This function will remove the background color 
//from two selected elements. Called restore because 
//it's being used to reverse the previous function.

function restoreBgColorSub(elem1ID,elem2ID) {

var strBackgroundColor = '#E9EFD9';

if (document.all) {
	docObj = 'document.all.';
	styleObj = '.style';
	obj1 = eval(docObj + elem1ID + styleObj);
	obj2 = eval(docObj + elem2ID + styleObj);
	
	obj1.backgroundColor = strBackgroundColor;
	obj2.backgroundColor = strBackgroundColor;
	}
	
else if (document.getElementById) {
	docObj = 'document.getElementById';
	styleObj = '.style';
	obj1 = eval(docObj + "('" + elem1ID + "')" + styleObj);
	obj2 = eval(docObj + "('" + elem2ID + "')" + styleObj);
	
	obj1.backgroundColor = strBackgroundColor;
	obj2.backgroundColor = strBackgroundColor;
	}
	
}

//This changes a single element

function changeBgColorS(elem1ID) {

if (document.all) {
	docObj = 'document.all.';
	styleObj = '.style';
	obj1 = eval(docObj + elem1ID + styleObj);
	
	obj1.backgroundColor = '#FFFFFF';
	}
	
else if (document.getElementById) {
	docObj = 'document.getElementById';
	styleObj = '.style';
	obj1 = eval(docObj + "('" + elem1ID + "')" + styleObj);
	
	obj1.backgroundColor = '#FFFFFF';
	}
	
}

//Single Element

function restoreBgColorS(elem1ID) {

if (document.all) {
	docObj = 'document.all.';
	styleObj = '.style';
	obj1 = eval(docObj + elem1ID + styleObj);
	
	obj1.backgroundColor = '#009A67';
	}
	
else if (document.getElementById) {
	docObj = 'document.getElementById';
	styleObj = '.style';
	obj1 = eval(docObj + "('" + elem1ID + "')" + styleObj);
	
	obj1.backgroundColor = '#009A67';
	}
	
}
//-->

<!-- End of component template output -->


