<!--
	// Campaign types.
	var CAMPAIGN_INFO = 'Information Only'; 
	var CAMPAIGN_INFO_AND_RESPONSE = 'Info with Response';
	var CAMPAIGN_PETITION = 'Petition Sending Campaign';

	var IFrameObj; // our IFrame object

	function callToServer(URL, blnDebug) {
//alert(URL);
		if (!document.createElement) {return true};
		
		var IFrameDoc;
		var strFrameWidth = '0px';
		var strFrameHeight = '0px';

		//if (blnDebug) {
			strFrameWidth = '850px';
			strFrameHeight = '600px';
		//}

		if (!IFrameObj && document.createElement) {
			// create the IFrame and assign a reference to the
			// object to our global variable IFrameObj.
			// this will only happen the first time 
			// callToServer() is called
		try {
			var tempIFrame=document.createElement('iframe');
			tempIFrame.setAttribute('id','RSIFrame');
			tempIFrame.style.border='0px';
			tempIFrame.style.width=strFrameWidth;
			tempIFrame.style.height=strFrameHeight;
			IFrameObj = document.body.appendChild(tempIFrame);
				
			if (document.frames) {
				// this is for IE5 Mac, because it will only
				// allow access to the document object
				// of the IFrame if we access it through
				// the document.frames array
				IFrameObj = document.frames['RSIFrame'];
			}
			} catch(exception) {
			// This is for IE5 PC, which does not allow dynamic creation
			// and manipulation of an iframe object. Instead, we'll fake
			// it up by creating our own objects.
			iframeHTML='\<iframe id="RSIFrame" style="';
			iframeHTML+='border:0px;';
			iframeHTML+='width:' + strFrameWidth + ';';
			iframeHTML+='height:' + strFrameHeight + ';';
			iframeHTML+='"><\/iframe>';
			document.body.innerHTML+=iframeHTML;
			IFrameObj = new Object();
			IFrameObj.document = new Object();
			IFrameObj.document.location = new Object();
			IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
			IFrameObj.document.location.replace = function(location) {
				this.iframe.src = location;
			}
			}
		}
			
		if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
			// we have to give NS6 a fraction of a second
			// to recognize the new IFrame
			setTimeout('callToServer()',10);
			return false;
		}
			
		if (IFrameObj.contentDocument) {
			// For NS6
			IFrameDoc = IFrameObj.contentDocument; 
		} else if (IFrameObj.contentWindow) {
			// For IE5.5 and IE6
			IFrameDoc = IFrameObj.contentWindow.document;
		} else if (IFrameObj.document) {
			// For IE5
			IFrameDoc = IFrameObj.document;
		} else {
			return true;
		}

		IFrameDoc.location.replace(URL);
		return false;
	}


  /*
  ***********************************************************************
  *
  *  Function:		NavigateEBlastPages()
  *  Author:		Sean Dorsett
  *  Date:			02/28/2005
  *  Parameters:	strProcessPage - Remaining text for label text. 
  *  				blnDebug - Enable or disable debugging.
  *  				strLoadPage - Page to load after request has been made.
  *  				frmProcessPage - Name of the form containing element to process. 
  *					intPageDirection - Move forward or backward.   
  *  Return:		N/A
  *
  *  Purpose:	 	Turn on or off checkboxes based on state request.		
  *
  ***********************************************************************
  */  
	function NavigateEBlastPages(strProcessPage, blnDebug, strLoadPage, frmProcessPage, intPageDirection) {

		// Process the checked items if a page is passed.
		if (strProcessPage != '') {
			callToServer(strProcessPage + buildQueryString(frmProcessPage), blnDebug);
		}
		else {
			// Adjust the page number.
			frmProcessPage.txtPageNumber.value = parseInt(frmProcessPage.txtPageNumber.value) + parseInt(intPageDirection); 
			
			frmProcessPage.action = strLoadPage; 
			
			// Submit the form to move to the next page.
			frmProcessPage.submit();
		}
		
		return false;
	}

 
	/*
	***********************************************************************
	*
	*  Function:	SetCheckBoxesState()
	*  Author:		Sean Dorsett
	*  Date:		12/03/2001
	*  Parameters:	objCheckboxes - Remaining text for label text. 
	*  				blnState - Boolean value to define state.
	*						* true - Turn checkboxes on.
	*						* false - Turn checkboxes off.
	*  Return:		N/A
	*
	*  Purpose:	 	Turn on or off checkboxes based on state request.		
	*
	***********************************************************************
	*/   	
	function SetCheckBoxesState(objCheckboxes, blnState) {
		var intCounter;	// Counter used to iterate through checkbox collection.
			
		// Loop through checkboxes if visible and check or uncheck.
		for (intCounter = 0; intCounter < objCheckboxes.length; intCounter++) {
			objCheckboxes(intCounter).checked = blnState;	
		}
			
		return;
	}
  
	/*
	***********************************************************************
	*
	*  Function:	GetSelectedIDs()
	*  Author:		Sean Dorsett
	*  Date:		12/10/2001
	*  Parameters:	objCheckboxes - Reference to a check box collection. 
	*  Return:		N/A
	*
	*  Purpose:	 	Obtain the contact IDs associated with the checkboxes. 
	*
	***********************************************************************
	*/   	
	function GetSelectedIDs(objCheckboxes) {
		var intCounter;	// Counter used to iterate through checkbox collection.
		var strIDList;	// Comma delimited list of form IDs selected.
			
		// Initialize variables.
		strIDList = '';

		if (objCheckboxes.length != undefined) {
			// Loop through checkbox collection if defined and check or uncheck.
			for (intCounter = 0; intCounter < objCheckboxes.length; intCounter++)

				// If boxes checked then extract the hidden ID value associated with it.
				// Build a comma delimited list.
				if (objCheckboxes(intCounter).checked == true)
	  				strIDList += objCheckboxes(intCounter).value + ',';
	  				
				// Remove the last comma if exists.	
				strIDList = strIDList.slice(0, strIDList.lastIndexOf(','))	  				
	  	} else {
	  		// Extract the value from the single checkbox.
			strIDList = objCheckboxes.value;	  				
	  	}
	
		return strIDList;		
	}
	
	
	/*
	***********************************************************************
	*
	*  Function:	buildQueryString()
	*  Author:		Sean Dorsett
	*  Date:		02/28/2005
	*  Parameters:	objCheckboxes - Reference to a check box collection. 
	*  Return:		N/A
	*
	*  Purpose:	 	Obtain the contact IDs associated with the checkboxes. 
	*
	***********************************************************************
	*/  	
	function buildQueryString(theFormName) {
		theForm = theFormName;
		var qs = '';
		for (e=0;e<theForm.elements.length;e++) {
			// Temporary fix added to only include the txtSelectedContactIDs element because of the 2048 querystring limitation.
			// We were limited to ~50 contacts per page when all the elements were included.
			if ((theForm.elements[e].name!='') && (theForm.elements[e].name=='txtSelectedContactIDs')) {
				qs+=(qs=='')?'?':'&';
				qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value);
			}
		}
		return qs;
	}
	
	
	/*
	***********************************************************************
	*
	*  Function:	IsUserPrefDataValid()
	*  Author:		Sean Dorsett
	*  Date:		04/26/2005
	*  Parameters:	objForm - The form to validate. 
	*  Return:		N/A
	*
	*  Purpose:	 	Determine if the data provided is valid. 
	*
	***********************************************************************
	*/  	
	function IsUserPrefDataValid(objForm) {
		var strNewPassword = objForm.txtNewPassword.value;
		var strNewConfirmPassword = objForm.txtNewConfirmPassword.value;
		var strEmailAddress = objForm.txtEmailAddress.value;
		
		if (strNewPassword != strNewConfirmPassword) {
			alert("The new passwords do not match. Please re-enter.");
			return false;
		}
		
		// Check the email format.
		if (!IsEmail(strEmailAddress))
			return false;
			
		return;
	}	
	
		
	/*
	***********************************************************************
	*
	*  Function:	CheckForm()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	objForm - The form to validate. 
	*  Return:		N/A
	*
	*  Purpose:	 	Determine if the data provided is valid. 
	*
	***********************************************************************
	*/  	
	function CheckForm(objForm)	{
		var arClass, bValid, strMessage;
		var objField = objForm.getElementsByTagName('*');
		
		for (var iFieldCounter=0; iFieldCounter<objField.length; iFieldCounter++) {
			if (objField[iFieldCounter].name != undefined) {
				// Allow for multiple values being assigned to the class attribute
				arClass = objField[iFieldCounter].className.split(' ');
				for (var iClassCounter=0; iClassCounter<arClass.length; iClassCounter++) {
					switch (arClass[iClassCounter]) {
						case 'required':
							bValid = ValidateNotEmpty(objField[iFieldCounter].value);
							strMessage = 'A required field was not completed.';
							break;				
						case 'string':
							if (ValidateNotEmpty(objField[iFieldCounter].value)) { 
								bValid = IsString(objField[iFieldCounter].value.replace(/^\s*|\s*$/g, ''));
								strMessage = 'The value entered does not contain all alphabetic characters.';
								break;
							}
						case 'number':
							if (ValidateNotEmpty(objField[iFieldCounter].value)) { 
								bValid = IsNumber(objField[iFieldCounter].value);
								strMessage = 'The value entered is not a valid number.';
								break;
							}
						case 'alphanumeric':
							if (ValidateNotEmpty(objField[iFieldCounter].value)) { 
								bValid = IsAlphaNumeric(objField[iFieldCounter].value.replace(/^\s*|\s*$/g, ''));
								strMessage = 'The value entered does not contain all alphabetic characters and/or numbers.';
								break;
							}							
						case 'email':
							if (ValidateNotEmpty(objField[iFieldCounter].value)) { 
								bValid = IsEmail(objField[iFieldCounter].value);
								strMessage = 'The value entered is not a valid email address.';
								break;
							}
						case 'phone':
							if (ValidateNotEmpty(objField[iFieldCounter].value)) { 
								bValid = IsPhoneNumber(objField[iFieldCounter].value);
								strMessage = 'The value entered is not a valid phone number.';
								break;	
							}						
						default:
							bValid = true;
					}

					if (bValid == false) {				
						// If this field is invalid, leave the testing early,
						// and alert the visitor to this error
						alert('Please review the value you provided. ' + strMessage);
						objField[iFieldCounter].focus();
						return false;
					}
				}
			}
		}
		
		return true;
	}	
	
		/*
	***********************************************************************
	*
	*  Function:	FormSubmit()
	*  Author:		Mike Sipes
	*  Date:		03/03/2006
	*  Parameters:	requiredFields - Comma delimited list of field ID's to validate against. 
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Multi browser replacement of Checkform
	*
	***********************************************************************
	*/  
	function FormSubmit(requiredFields)
	{
		var arrFields = requiredFields.split(",");
		var returnValue = true;
		for(i = 0; i < arrFields.length; i++)
		{
			var objField = document.getElementById(arrFields[i]);
			arClass = objField.className.split(' ');
				for (var iClassCounter=0; iClassCounter<arClass.length; iClassCounter++) {
					switch (arClass[iClassCounter]) {
						case 'required':
							bValid = ValidateNotEmpty(objField.value);
							strMessage = 'A required field was not completed.';
							break;				
						case 'string':
							if (ValidateNotEmpty(objField.value)) { 
								bValid = IsString(objField.value.replace(/^\s*|\s*$/g, ''));
								strMessage = 'The value entered does not contain all alphabetic characters.';
								break;
							}
						case 'number':
							if (ValidateNotEmpty(objField.value)) { 
								bValid = IsNumber(objField.value);
								strMessage = 'The value entered is not a valid number.';
								break;
							}
						case 'alphanumeric':
							if (ValidateNotEmpty(objField.value)) { 
								bValid = IsAlphaNumeric(objField.value.replace(/^\s*|\s*$/g, ''));
								strMessage = 'The value entered does not contain all alphabetic characters and/or numbers.';
								break;
							}							
						case 'email':
							if (ValidateNotEmpty(objField.value)) { 
								bValid = IsEmail(objField.value);
								strMessage = 'The value entered is not a valid email address.';
								break;
							}
						case 'phone':
							if (ValidateNotEmpty(objField.value)) { 
								bValid = IsPhoneNumber(objField.value);
								strMessage = 'The value entered is not a valid phone number.';
								break;	
							}						
						default:
							bValid = true;
					}
					if (bValid == false) {				
						// If this field is invalid, leave the testing early,
						// and alert the visitor to this error
						alert('Please review the value you provided. ' + strMessage);
						objField.focus();
						return false;
					}
				}			
		}
	}
	
	
	/*
	***********************************************************************
	*
	*  Function:	IsString()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - The string to validate. 
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Determine if the data provided is valid. 
	*
	***********************************************************************
	*/  	
	function IsString(strValue)	{
		return (typeof strValue == 'string' && strValue != '' && isNaN(strValue));
	}


	/*
	***********************************************************************
	*
	*  Function:	IsNumber()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - The number to validate. 
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Determine if the number provided is valid. 
	*
	***********************************************************************
	*/ 
	function IsNumber(strValue)	{
		var objRE = /(^-?\d\d*$)/;

		return (strValue != '' && objRE.test(strValue));
	}


	/*
	***********************************************************************
	*
	*  Function:	IsEmail()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - The email to validate. 
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Determine if the email provided is valid. 
	*
	***********************************************************************
	*/ 
	function IsEmail(strValue)	{
		var objRE = /^[\w-\.\']{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,}$/;

		return (strValue != '' && objRE.test(strValue));
	}
	
	
	/*
	***********************************************************************
	*
	*  Function:	IsPhoneNumber()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - The phone number to validate. 
	*			              (999) 999-9999 or (999)999-9999
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Determine if the email provided is valid. 
	*
	***********************************************************************
	*/ 
	function IsPhoneNumber(strValue)	{
		var objRE = /^([\(]{1}[0-9]{3}[\)]{1}[\.| |\-]{0,1}|^[0-9]{3}[\.|\-| ]?)?[0-9]{3}(\.|\-| )?[0-9]{4}$/;

		return (strValue != '' && objRE.test(strValue));
	}	
	
	
	/*
	***********************************************************************
	*
	*  Function:	IsAlphaNumeric()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - The string to validate. 
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Determine if the string provided is alpha-numeric valid. 
	*
	***********************************************************************
	*/ 
	function IsAlphaNumeric(strValue)	{
		var objRE = /^[a-zA-Z0-9\s]+$/;

		return (strValue != '' && objRE.test(strValue));
	}	
	
	
	/*
	***********************************************************************
	*
	*  Function:	IsPhoneNumber()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - String to be tested for validity
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Validates that a string is not all
	*			    blank (whitespace) characters.
	*
	***********************************************************************
	*/ 	
	function ValidateNotEmpty(strValue) {
		var strTemp = strValue;
		
		strTemp = TrimAll(strTemp);
		
		if(strTemp.length > 0){
			return true;
		} 
		 
		return false;
	}	
	
	
	/*
	***********************************************************************
	*
	*  Function:	RightTrim()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - The string to trim. 
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Trims trailing whitespace chars. 
	*
	***********************************************************************
	*/ 	
	function RightTrim(strValue) {

		var objRegExp = /^([\w\W]*)(\b\s*)$/;
		
		if(objRegExp.test(strValue)) {
			//remove trailing a whitespace characters
			strValue = strValue.replace(objRegExp, '$1');
		}
		
		return strValue;
	}


	/*
	***********************************************************************
	*
	*  Function:	LeftTrim()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - The string to trim. 
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Trims trailing whitespace chars. 
	*
	***********************************************************************
	*/ 	
	function LeftTrim( strValue ) {
		var objRegExp = /^(\s*)(\b[\w\W]*)$/;
 
		if(objRegExp.test(strValue)) {
		
			//remove leading a whitespace characters
			strValue = strValue.replace(objRegExp, '$2');
		}
  
		return strValue;
	}


	/*
	***********************************************************************
	*
	*  Function:	TrimAll()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue - string from which spaces will be removed. 
	*  Return:		Modified string.
	*
	*  Purpose:	 	Removes leading and trailing spaces. 
	*
	***********************************************************************
	*/ 	
	function TrimAll(strValue) {
		var objRegExp = /^(\s*)$/;

		//check for all spaces
		if (objRegExp.test(strValue)) {
			strValue = strValue.replace(objRegExp, '');
			if (strValue.length == 0)
				return strValue;
			}
		    
		//check for leading & trailing spaces
		objRegExp = /^(\s*)([\W\w]*)(\b\s*$)/;
		
		if(objRegExp.test(strValue)) {
			//remove leading and trailing whitespace characters
			strValue = strValue.replace(objRegExp, '$2');
		}
		
		return strValue;
	}
	
	/*
	***********************************************************************
	*
	*  Function:	HandleNoContactFound()
	*  Author:		Sean Dorsett
	*  Date:		08/16/2005
	*  Parameters:	strConfirmMessage - string containing the confirm dialog 
	*				message
	*  Return:		Modified string.
	*
	*  Purpose:	 	Handles the process flow for no contact record found in 
	*				the database. 
	*
	***********************************************************************
	*/ 	
	function HandleNoContactFound(strConfirmMessage) {
		// Prompt the user to try again or request password.
		alert(strConfirmMessage);
		
		// Go back to the previous page.
		window.history.back();
		
		return;
	}	
	
	/*
	***********************************************************************
	*
	*  Function:	IsValidPassword()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue1 - The password as a string. 
	*				strValue2 - The confirmation password as a string. 
	*  Return:		True if valid, otherwise false.
	*
	*  Purpose:	 	Determine if the strings provided match. 
	*
	***********************************************************************
	*/ 
	function IsValidPassword(strValue1, strValue2)	{

		return (strValue1 == strValue2);
	}	
	
	/*
	***********************************************************************
	*
	*  Function:	ConfirmPassword()
	*  Author:		Sean Dorsett
	*  Date:		07/16/2005
	*  Parameters:	strValue1 - The password as a string. 
	*				strValue2 - The confirmation password as a string. 
	*  Return:		True is valid, otherwise a message.
	*
	*  Purpose:	 	Determine if the strings provided match. 
	*
	***********************************************************************
	*/ 
	function ConfirmPassword(strValue1, strValue2)	{

			if (!(IsValidPassword(strValue1, strValue2))) {
				alert("The new passwords do not match. Please re-enter.");
				return false;
			}
		
		return true;
	}

		function TableResize()
		{
			var TableWidth = 965
			var winW = 0, winH = 0;
			var Header1 = document.getElementById("Header1");
			var Header2 = document.getElementById("Header2");
			var Header3 = document.getElementById("Header3");
			var Footer1 = document.getElementById("Footer1");
			if( Header1 && Header2 && Header3 && Footer1)
			{
				if (parseInt(navigator.appVersion)>3) {
					if (navigator.appName=="Netscape") {
						winW = window.innerWidth;
						winH = window.innerHeight;
					}
					if (navigator.appName.indexOf("Microsoft")!=-1) {
						winW = document.body.offsetWidth;
						winH = document.body.offsetHeight;
					}
				}
				if( winW <= TableWidth )
				{
					if(Header1) Header1.width = TableWidth;
					if(Header2) Header2.width = TableWidth;
					if(Header3) Header3.width = TableWidth;
					if(Footer1) Footer1.width = TableWidth;
				}
				else
				{
					if(Header1) Header1.width = "100%";
					if(Header2) Header2.width = "100%";
					if(Header3) Header3.width = "100%";
					if(Footer1) Footer1.width = "100%";
				}
			}
		}
		
		function modelesswin(url,mwidth,mheight){
			if (document.all&&window.print) //if ie5
			eval('window.showModelessDialog(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
			else
			eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
		}

//-->