

function OnUnsubscribeClicked()
{
	var f = document.frmSubscribe;
	f.action.value = "unsubscribe";
	f.submit();
}

function popUp(url)
{
	window.open(url, "win", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=425,height=500');

}

function popBoard(url)
{
	window.open(url, "winn", 'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0,width=630,height=540');

}


function popUp2(url)
{
	window.open(url, "win", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=750,height=645');

}

function sendStory(url)
{
	window.open(url, "win", 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=640,height=400');

}

function ToggleRank(frmDoc)
{
	if (frmDoc.orderby[0].disabled)
	{
		frmDoc.orderby[0].disabled = false;
		frmDoc.orderby[0].checked = true;
	}
}

function DisableRank(frmDoc)
{
	frmDoc.orderby[0].disabled = true;
	frmDoc.orderby[1].checked = true;
}

function SelectDate(frmDoc,dateIndex)
{
	frmDoc.date[dateIndex].checked = true;
}


//***********************************************************************************************
// Strictly for the ORGANIZATION FINDER 
// Purpose: To redirect to the appropriate search page based on what radio button is selected
// Modified: Jan 8, 2009. By: Keith Valley
//***********************************************************************************************
function VerifyKeyword(myForm)
{
	var myString, strKeyword;
	
	strKeyword = myForm.keywords.value + "";
	
	if (myForm.elements["searchtype"] == null) {
		if (strKeyword == "")
		{
			alert ("Please enter a keyword before search");
			myForm.keywords.select();
			return false;
		}
		
		if (myForm.elements["homesearchtype"] != null) {
			if (myForm.homesearchtype[3].checked == true) {
			
				myForm.action = "111o.asp";
				
			} else if (myForm.homesearchtype[2].checked == true) {

				myForm.action = "111id.asp";
				
			} else if (myForm.homesearchtype[1].checked == true) {
		
				myForm.action = "111fn.asp";
			}
		}
	}	
return true;
}
//****************************************************************************************************
// Strictly for the ORGANIZATION FINDER located in the Member Surveys and  Statistics (up a level).  
// Purpose: To redirect to the appropriate search page based on what radio button is selected
// Modified: Jan 8, 2009. By: Keith Valley
//*****************************************************************************************************
function VerifyKeywordMember(myForm)
{
	var myString, strKeyword;
	
	strKeyword = myForm.keywords.value + "";
	
	if (myForm.elements["searchtype"] == null) {
		if (strKeyword == "")
		{
			alert ("Please enter a keyword before search");
			myForm.keywords.select();
			return false;
		}
		
		if (myForm.elements["homesearchtype"] != null) {
			if (myForm.homesearchtype[3].checked == true) {
			
				myForm.action = "../111o.asp";
				
			} else if (myForm.homesearchtype[2].checked == true) {

				myForm.action = "../111id.asp";
				
			} else if (myForm.homesearchtype[1].checked == true) {

				myForm.action = "../111fn.asp";
			}
		}
	}	
return true;
}


//*******************************************************************************
// This is form the new Newsletter Subscribe feature.  
// Created by: Keith Valley Date: June 4, 2009.
//*******************************************************************************
function VerifyEmail(myForm)
{
	var myString, strKeyword;
	
	strKeyword = myForm.emailaddress.value + "";
	strKeyword = strKeyword.replace(/^\s+|\s+$/g, '') ;
	
		if (strKeyword == "")
		{
			alert ("Please enter an email address before submitting.");
			myForm.emailaddress.select();
			return false;
		} else {
		  return true;
		}
}


//********************************************************************************
function VerifyQeyword(myForm)
{
	var myString, strKeyword;
	
	strKeyword = myForm.q.value + "";
	
	
	if (myForm.elements["searchtype"] == null) {
		if (strKeyword == "")
		{
			alert ("Please enter a keyword before search");
			myForm.q.select();
			return false;
		}
		
		
		
	}	
return true;
}


function SetFocus()
{
document.frmUnsubscribe.email.focus();

}

function SetNewsLocation()
{
	window.location="30.asp";
}

function SetEventLocation()
{
	window.location="30.asp?showlocation=yes";
}




