<!--
function setTopic()
{
var topicIndex = 0;
var pages = new Array ('acctmgmt.shtml','benefits.shtml','callcenter.shtml','claimsproc.shtml','clinical.shtml','custcomm.shtml','implementation.shtml','mbraccess.shtml','pharmacynetworks.shtml','physsystems.shtml','rebateadministration.shtml','rebatecontracting.shtml','reporting.shtml','training.shtml','argusrx.shtml','hipaa.shtml','news_events.shtml','faq.shtml' );
for (var i = 0; i<(pages.length-1); i++)
{
if (document.referrer=='http://www.argushealth.com/' +pages[i] )
	{topicIndex=1;}
if ( (document.referrer=='http://www.argushealth.com/' +pages[pages.length-1] ) || (document.referrer=='http://www.argushealth.com/' +pages[pages.length-2]) )
	{topicIndex=2;}
if (document.referrer=='http://www.argushealth.com/' +pages[pages.length-3] )
	{topicIndex=3;}
if (document.referrer=='http://www.argushealth.com/' +pages[pages.length-4] )
	{topicIndex=4;}
}
	//alert('hello from: ' + document.referrer);
	document.contactUs.QuestionTopicArea.options[topicIndex].selected = true;
}
function checkData()
{
	var output1= " Please enter your: ";
	var result= 0;
	if (document.contactUs.QuestionTopicArea.selectedIndex == 1)
		{
			document.contactUs.argRecipient.value="Marketing@argushealth.com,denise.crossen@argushealth.com";
			document.contactUs.argSubject.value="Sales Inquiries";
			document.contactUs.argRedirect.value=history.previous;
			}
	else if (document.contactUs.QuestionTopicArea.selectedIndex == 2)
		{
			document.contactUs.argRecipient.value="Marketing@argushealth.com,denise.crossen@argushealth.com";
			document.contactUs.argSubject.value="Media Relations Inquiries";
			document.contactUs.argRedirect.value=history.previous;
			}
	else if (document.contactUs.QuestionTopicArea.selectedIndex == 3)
		{
			document.contactUs.argRecipient.value="HIPAA@argushealth.com";
			document.contactUs.argSubject.value="HIPAA Inquiries";
			document.contactUs.argRedirect.value=history.previous;
			}
	else if (document.contactUs.QuestionTopicArea.selectedIndex == 4)
		{
			document.contactUs.argRecipient.value="contracts.pharmacy@argushealth.com";
			document.contactUs.argSubject.value="Pharmacy Network Contracting";
			document.contactUs.argRedirect.value=history.previous;
			}
	else if (document.contactUs.QuestionTopicArea.selectedIndex == 5)
		{
			document.contactUs.argRecipient.value="WebMaster@argushealth.com";
			document.contactUs.argSubject.value="Website Questions or Comments";
			document.contactUs.argRedirect.value=history.previous;
			}
	else if (document.contactUs.QuestionTopicArea.selectIndex == "" ||  document.contactUs.QuestionTopicArea.selectIndex == 0  ||  document.contactUs.QuestionTopicArea.selectIndex == null )
		{alert ("              Oops!  \nPlease choose a topic area.  \n          Thank you!" );
		document.contactUs.QuestionTopicArea.focus();
		 return false;				
		}
	if (document.contactUs.Name.value == "" || document.contactUs.Name.value == null)
		{
	    output1+= "\n"  + "\n" + "       - name";
	    document.contactUs.Name.focus();
		 document.contactUs.Name.select();
		 result = 1;
		}
	if (document.contactUs.Title.value == "" || document.contactUs.Title.value == null)
		{
	    output1+= "\n" + "\n"+  "       - title";
	    document.contactUs.Title.focus();
		 document.contactUs.Title.select();
		 result = 1;
		}
	if (document.contactUs.Company.value == "" || document.contactUs.Company.value == null)
 		{
	    output1 += "\n" + "\n"+ "       - company" ;
	    document.contactUs.Company.focus();
		 document.contactUs.Company.select();
		 result = 1;
		}
	if (document.contactUs.Email.value == "" || document.contactUs.Email.value == null || checkField()==false)
 		{
	    output1 += "\n"  + "\n"+ "       - email address";
	    document.contactUs.Email.focus();
		 document.contactUs.Email.select();
		 result = 1;
		}
	if (result == 1)
		{
		alert (output1);
		return false;
		}
	if (result == 0)
		{
		output1 = "Thank you!  ";
		alert (output1);
		}
}
/*
Check the following in the respective order:
1) field is not null
2) that @ or . Is not in first position
3) for a blank space or a special character
4) for more than one @
5) for missing domain name between @ and .
6) for a valid domain
*/


function checkField()
{
	var eResult = 0
	if (document.contactUs.Email.value != "")
		{
	   // Check for invalid characters
		invalidChars = " /:,;";
		for (i=0; i<invalidChars.length; i++)
		{
		badChar = invalidChars.charAt(i);
		if (document.contactUs.Email.value.indexOf(badChar,0) >-1)
		{
		eResult=1;
		}
		}
		//Make sure there is an @ sign in the e-mail address
		atPos = document.contactUs.Email.value.indexOf("@",0);
		if (atPos == -1)
		{
		eResult=1;
		}
		//Make sure the @ symbol is not the first character in the e-mail address
		if (document.contactUs.Email.value.charAt(0) == "@")
		{
		eResult=1;
		}
		//Make sure that there is only one @ sign in the address
		if (document.contactUs.Email.value.indexOf("@",atPos+1) > -1)
		{
		eResult=1;
		}
		//Make sure there is a period after the @ sign
		periodPos = document.contactUs.Email.value.indexOf(".",atPos)
		if (periodPos == -1)
		{
		eResult=1;
		}
		//Make sure that there are at least two characters after the period
		if (periodPos+2 > document.contactUs.Email.value.length)
		{
		eResult=1;
		}
		}
		if (eResult==1)
		{
		alert ("Oops! You have entered an invalid email!");
		return false;
		}
}
//-->
