function isHtmlInjection(value)
{
    var htmlList = new Array();
    htmlList[0] = "onbluf";
    htmlList[1] = "onchange";
    htmlList[2] = "onclick";
    htmlList[3] = "onmouse";
    htmlList[4] = "onfocus";
    htmlList[5] = "onreset";
    htmlList[6] = "onerror";
    htmlList[7] = "onsubmit";
    htmlList[8] = "onselect";
    htmlList[9] = "onabort";
    htmlList[10] = "onload";
    htmlList[11] = "onunload";
    htmlList[12] = "onevent";
    htmlList[13] = "alert(";
    htmlList[14] = "<script";
    
    for (i=0;i<htmlList.length;i++)
    {
        if (value && value.toLowerCase().indexOf(htmlList[i]) >= 0)
        { 
            return true;
            break;
        }
    }
       
    return false;
}

function allDigits(str)
{
	return inValidCharSet(str,"0123456789");
}

function allCharacters(str)
{
	return inValidCharSet(str,"abcdefghijklmnopqrstuvwxvyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
}

function phoneDigits(str)
{
	return inValidCharSet(str, "0123456789-");
}

function inValidCharSet(str,charset)
{
	var result = true;

	for (var i=0;i<str.length;i++)
	{
		if (charset.indexOf(str.substr(i,1))<0)
		{
			result = false;
			break;
		}
	}
	return result;
}
	
function isEmailAddress(email)
{
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function validateTrackNumSearchInj()
{
	var track_number=document.track_number.track_number.value;
	
	if(isHtmlInjection(track_number))
	{
        alert('Please fill in the Tracking Number.');
		
        document.track_number.track_number.value = '';
        document.track_number.track_number.focus();
		document.track_number.track_number.select();
	
		return false;
	}
}

function validateTrackNumSearch()
{
	var track_number=document.track_number.track_number.value;
	
	if((track_number==null)||(track_number==""))
	{
		alert('Please fill in the Tracking Number.');
		
		document.track_number.track_number.focus();
		document.track_number.track_number.select();
	
		return false;
	}
	else if(isHtmlInjection(track_number))
	{
        alert('Please fill in the Tracking Number.');
		
        document.track_number.track_number.value = '';
        document.track_number.track_number.focus();
		document.track_number.track_number.select();
	
		return false;
	}
	else if(false == allDigits(track_number))
	{
		alert('The Tracking Number field can only consist of numbers.');
		
		document.track_number.track_number.focus();
		document.track_number.track_number.select();
	
		return false;
	}
	else if(track_number.length > 10)
	{
		alert('The Tracking Number field can only contain between 1 and 10 numbers.');
		
		document.track_number.track_number.focus();
		document.track_number.track_number.select();
	
		return false;	
	}	
}

function validateTrackReferenceNumberSearch()
{
	var refnumber=document.track_refnumber.refnumber.value;
			
	if((refnumber==null)||(refnumber==""))
	{
		alert('Please fill in the Reference Number.');
					
		return false;
	}
	else if(isHtmlInjection(refnumber))
	{
		document.track_refnumber.refnumber.value = '';
		alert('Please fill in the Reference Number.');
					
		return false;
	}
}

function validateTrackNameSearchInj()
{
	var first_name = document.track_name.first_name.value;
	var last_name = document.track_name.last_name.value;
	var zip_code = document.track_name.zip_code.value;
	var email = document.track_name.email.value;
	var phone = document.track_name.phone.value;
	
	if(isHtmlInjection(first_name))
	{
		alert('Please fill in your first name.');
		
		document.track_name.first_name.value = '';
		document.track_name.first_name.focus();
		document.track_name.first_name.select();
	
		return false;
	}	
	else if(isHtmlInjection(last_name))
	{
		alert('Please fill in your Last name.');
		
		document.track_name.last_name.value = '';
		document.track_name.last_name.focus();
		document.track_name.last_name.select();
	
		return false;
	}
	else if(isHtmlInjection(zip_code))
	{
		alert('Please fill in your zip code.');
		
		document.track_name.zip_code.value = '';
		document.track_name.zip_code.focus();
		document.track_name.zip_code.select();
	
		return false;
	}
    else if(isHtmlInjection(email))
	{
		alert('The E-mail address is not valid.');

		document.track_name.email.value = '';
		document.track_name.email.focus();
		document.track_name.email.select();
	
		return false;			
	}
    else if(isHtmlInjection(phone))
	{
		alert('The Phone Number is not valid.');

		document.track_name.phone.value = '';
		document.track_name.phone.focus();
		document.track_name.phone.select();
	
		return false;					
	}
}

function validateTrackNameSearch()
{
	var first_name = document.track_name.first_name.value;
	var last_name = document.track_name.last_name.value;
	var zip_code = document.track_name.zip_code.value;
	var email = document.track_name.email.value;
	var phone = document.track_name.phone.value;
	
	if((first_name==null)||(first_name==""))
	{
		alert('Please fill in your first name.');
		
		document.track_name.first_name.focus();
		document.track_name.first_name.select();
	
		return false;
	}
	else if(isHtmlInjection(first_name))
	{
		alert('Please fill in your first name.');
		
		document.track_name.first_name.value = '';
		document.track_name.first_name.focus();
		document.track_name.first_name.select();
	
		return false;
	}	
	else if(false == allCharacters(first_name))
	{
		alert('First Name cannot have digits.');
		
		document.track_name.first_name.focus();
		document.track_name.first_name.select();
	
		return false;	
	}		
	else if(first_name.length > 35)
	{
		alert('The First Name field can only contain between 1 and 35 letters.');

		document.track_name.first_name.focus();
		document.track_name.first_name.select();
	
		return false;			
	}

	if((last_name==null)||(last_name==""))
	{
		alert('Please fill in your Last name.');
		
		document.track_name.last_name.focus();
		document.track_name.last_name.select();
	
		return false;
	}
	else if(isHtmlInjection(last_name))
	{
		alert('Please fill in your Last name.');
		
		document.track_name.last_name.value = '';
		document.track_name.last_name.focus();
		document.track_name.last_name.select();
	
		return false;
	}	
	else if(false == allCharacters(last_name))
	{
		alert('Last Name cannot have digits.');
		
		document.track_name.last_name.focus();
		document.track_name.last_name.select();
	
		return false;	
	}		
	else if(last_name.length > 35)
	{
		alert('The Last Name field can only contain between 1 and 35 letters.');

		document.track_name.last_name.focus();
		document.track_name.last_name.select();
	
		return false;			
	}

	if((zip_code==null)||(zip_code==""))
	{
		alert('Please fill in your zip code.');
		
		document.track_name.zip_code.focus();
		document.track_name.zip_code.select();
	
		return false;
	}
	else if(isHtmlInjection(zip_code))
	{
		alert('Please fill in your zip code.');
		
		document.track_name.zip_code.value = '';
		document.track_name.zip_code.focus();
		document.track_name.zip_code.select();
	
		return false;
	}
	else if(zip_code.length < 5)
	{
		alert('The Zip Code field is not valid.');

		document.track_name.zip_code.focus();
		document.track_name.zip_code.select();
	
		return false;			
	}
	else if(zip_code.length > 10)
	{
		alert('The Zip Code field is not valid.');

		document.track_name.zip_code.focus();
		document.track_name.zip_code.select();
	
		return false;			
	}

	if(email.length > 0)
	{
		if(isHtmlInjection(email))
		{
			alert('The E-mail address is not valid.');
	
			document.track_name.email.value = '';
			document.track_name.email.focus();
			document.track_name.email.select();
		
			return false;			
		}
	    else if(email.length > 50)
		{
			alert('The E-mail field can only contain between 1 and 50 characters.');
	
			document.track_name.email.focus();
			document.track_name.email.select();
		
			return false;			
		}
		else if(false == isEmailAddress(email))
		{
			alert('The E-mail address is not valid.');
			
			document.track_name.email.focus();
			document.track_name.email.select();
		
			return false;					
		}
	}
	
	if(phone.length > 0)
	{
		if(isHtmlInjection(phone))
		{
			alert('The Phone Number is not valid.');
	
			document.track_name.phone.value = '';
			document.track_name.phone.focus();
			document.track_name.phone.select();
		
			return false;					
		}	
		else if(phone.length < 10 || phone.length > 12)
		{
			alert('The Phone Number field can only contain between 1 and 12 characters.');
	
			document.track_name.phone.focus();
			document.track_name.phone.select();
		
			return false;					
		}
		else if(false == phoneDigits(phone))
		{
			alert('The Phone Number is not valid.');
			
			document.track_name.phone.focus();
			document.track_name.phone.select();
		
			return false;							
		}
	}
}

function validateTrackCompanySearchInj()
{
	var company = document.track_company.company.value;
	var co_zip_code = document.track_company.co_zip_code.value;
	var co_phone = document.track_company.co_phone.value;
	var co_email = document.track_company.co_email.value;
	
	if(isHtmlInjection(company))
	{
		alert('Please fill in your company name.');
		
		document.track_company.company.value = '';
		document.track_company.company.focus();
		document.track_company.company.select();
	
		return false;
	}
	else if(isHtmlInjection(co_zip_code))
	{
		alert('Please fill in your Company zip code.');
		
		document.track_company.co_zip_code.value = '';
		document.track_company.co_zip_code.focus();
		document.track_company.co_zip_code.select();
	
		return false;
	}
	else if(isHtmlInjection(co_email))
	{
		alert('The company email address is not valid.');
		
		document.track_company.co_email.value = '';
		document.track_company.co_email.focus();
		document.track_company.co_email.select();
	
		return false;					
	}
	else if(isHtmlInjection(co_phone))
	{
		alert('The company phone number is not valid.');
		
		document.track_company.co_phone.value = '';
		document.track_company.co_phone.focus();
		document.track_company.co_phone.select();
	
		return false;							
	}	
}

function validateTrackCompanySearch()
{
	var company = document.track_company.company.value;
	var co_zip_code = document.track_company.co_zip_code.value;
	var co_phone = document.track_company.co_phone.value;
	var co_email = document.track_company.co_email.value;
	
	if((company==null)||(company==""))
	{
		alert('Please fill in your company name.');
		
		document.track_company.company.focus();
		document.track_company.company.select();
	
		return false;
	}
	else if(isHtmlInjection(company))
	{
		alert('Please fill in your company name.');
		
		document.track_company.company.value = '';
		document.track_company.company.focus();
		document.track_company.company.select();
	
		return false;
	}
	else if(company.length > 50)
	{
		alert('The Company Name field can only contain between 1 and 50 characters.');

		document.track_company.co_email.focus();
		document.track_company.co_email.select();
	
		return false;					
	}

	if((co_zip_code==null)||(co_zip_code==""))
	{
		alert('Please fill in your Company zip code.');
		
		document.track_company.co_zip_code.focus();
		document.track_company.co_zip_code.select();
	
		return false;
	}
	else if(isHtmlInjection(co_zip_code))
	{
		alert('Please fill in your Company zip code.');
		
		document.track_company.co_zip_code.value = '';
		document.track_company.co_zip_code.focus();
		document.track_company.co_zip_code.select();
	
		return false;
	}
	else if(co_zip_code.length < 5)
	{
		alert('The Company Zip Code field is not valid.');

		document.track_company.co_zip_code.focus();
		document.track_company.co_zip_code.select();
	
		return false;			
	}
	else if(co_zip_code.length > 10)
	{
		alert('The Company Zip Code field is not valid.');

		document.track_company.co_zip_code.focus();
		document.track_company.co_zip_code.select();
	
		return false;			
	}
	else if(co_email.length > 0)
	{
		if(isHtmlInjection(co_email))
		{
			alert('The company email address is not valid.');
			
			document.track_company.co_email.value = '';
			document.track_company.co_email.focus();
			document.track_company.co_email.select();
		
			return false;					
		}
		else if(co_email.length > 50)
		{
			alert('The company email field can only contain between 1 and 50 characters.');
	
			document.track_company.co_email.focus();
			document.track_company.co_email.select();
		
			return false;			
		}
		else if(false == isEmailAddress(co_email))
		{
			alert('The company email address is not valid.');
			
			document.track_company.co_email.focus();
			document.track_company.co_email.select();
		
			return false;					
		}
	}
	else if(co_phone.length > 0)
	{
		if(isHtmlInjection(co_phone))
		{
			alert('The company phone number is not valid.');
			
			document.track_company.co_phone.value = '';
			document.track_company.co_phone.focus();
			document.track_company.co_phone.select();
		
			return false;							
		}	
		else if(co_phone.length < 10 || co_phone.length > 12)
		{
			alert('The Company Phone Number field can only contain between 1 and 12 characters.');
	
			document.track_company.co_phone.focus();
			document.track_company.co_phone.select();
		
			return false;					
		}
		else if(false == phoneDigits(co_phone))
		{
			alert('The company phone number is not valid.');
			
			document.track_company.co_phone.focus();
			document.track_company.co_phone.select();
		
			return false;							
		}
	}
}

function validateCareSearch()
{
	var track_number = document.search.track_number.value;
	var phone = document.search.phone.value;
	var company = document.search.company.value;
	var last_name = document.search.last_name.value;
	var zip_code = document.search.zip_code.value;
	var email = document.search.email.value;
	
	if(last_name.length > 0)
	{
		if(isHtmlInjection(last_name))
		{
			alert('Please enter a last name.');
			
			document.search.last_name.value = '';
			document.search.last_name.focus();
			document.search.last_name.select();
		
			return false;	
		}
		else if(false == allCharacters(last_name))
		{
			alert('Last Name cannot have digits.');
			
			document.search.last_name.focus();
			document.search.last_name.select();
		
			return false;	
		}		
		else if(last_name.length > 35)
		{
			alert('The Last Name field can only contain between 1 and 35 letters.');
	
			document.search.last_name.focus();
			document.search.last_name.select();
		
			return false;			
		}
	}
	
	if(zip_code.length > 0)
	{
		if(isHtmlInjection(zip_code))
		{
			alert('The Zip Code field is not valid.');
	
			document.search.zip_code.value = '';
			document.search.zip_code.focus();
			document.search.zip_code.select();
		
			return false;			
		}
		else if(zip_code.length < 5)
		{
			alert('The Zip Code field is not valid.');
	
			document.search.zip_code.focus();
			document.search.zip_code.select();
		
			return false;			
		}
		else if(zip_code.length > 10)
		{
			alert('The Zip Code field is not valid.');
	
			document.search.zip_code.focus();
			document.search.zip_code.select();
		
			return false;			
		}
	}
	
	if(email.length > 0)
	{
		if(isHtmlInjection(email))
		{
			alert('The Email address is not valid.');
			
			document.search.email.value = '';
			document.search.email.focus();
			document.search.email.select();
		
			return false;					
		}
		else if(email.length > 50)
		{
			alert('The Email field can only contain between 1 and 50 characters.');
	
			document.search.email.focus();
			document.search.email.select();
		
			return false;			
		}
		else if(false == isEmailAddress(email))
		{
			alert('The Email address is not valid.');
			
			document.search.email.focus();
			document.search.email.select();
		
			return false;					
		}
	}
		
	if(phone.length > 0)
	{
		if(isHtmlInjection(phone))
		{
			alert('The Phone Number is not valid.');
			
			document.search.phone.value = '';
			document.search.phone.focus();
			document.search.phone.select();
		
			return false;							
		}
		else if((phone.length < 10) || (phone.length > 12))
		{
			alert('The Phone Number field can only contain between 1 and 12 characters.');
	
			document.search.phone.focus();
			document.search.phone.select();
		
			return false;					
		}
		else if(false == phoneDigits(phone))
		{
			alert('The Phone Number is not valid.');
			
			document.search.phone.focus();
			document.search.phone.select();
		
			return false;							
		}
	}
}

//detect browser type and version
browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

	
// for Rewards popup window
var myWind
function upsellWindow(url)
{
	if (!myWind || myWind.closed)
	{
		myWind = window.open(url,"popUp","toolbar=no,directories=no,location=0,width=550,height=480,resizable=yes,scrollbars=yes,top=20,left=20");
	} 
	else
	{
		myWind.focus();
		myWind = window.open(url,"popUp","toolbar=no,directories=no,location=0,width=550,height=480,resizable=yes,scrollbars=yes,top=20,left=20");
	}
}
	
	
	
//function to handle "Need Help?" popup window	 
var myWind
function popupWin(url) 
{
	if (!myWind || myWind.closed)
	{
		myWind = window.open(url,"popUp","toolbar=no,directories=no,location=0,width=500,height=380,resizable=no,scrollbars=yes,top=20,left=20");
	} 
	else
	{
		myWind.focus();
		myWind = window.open(url,"popUp","toolbar=no,directories=no,location=0,width=500,height=380,resizable=no,scrollbars=yes,top=20,left=20");
	}
}


function openProductDescriptionWindow(url)
{
	window.open(url,"Description","toolbar=no,directories=no,resizable=yes,width=500,height=350,scrollbars=yes");
}
	
function openForgotPasswordWindow(url)
{
	window.open(url,"Description","toolbar=no,directories=no,resizable=yes,width=500,height=350,scrollbars=yes");
}

function validateEmailUs()
{
	var first_name = document.email_us.first_name.value;
	var last_name = document.email_us.last_name.value;
	var company_name = document.email_us.company_name.value;
	var streetaddr1 = document.email_us.street_address1.value;
	var streetaddr2 = document.email_us.street_address2.value;
	var city = document.email_us.city.value;
	var state = document.email_us.state.value;
	var email1 = document.email_us.email1.value;
	var email2 = document.email_us.email2.value;
	var zip_code = document.email_us.zip_code.value;
	var phone = document.email_us.phone.value;
	var promo_code = document.email_us.promo_code.value;
	var track_number = document.email_us.track_number.value;
	var CanWeHelp1 = "";
	var CanWeHelp2TA = document.email_us.CanWeHelp2TA.value;
	var CanWeHelp3TA = document.email_us.CanWeHelp3TA.value;
	
	
	if((first_name==null)||(first_name==""))
	{
		alert('Please fill in your first name.');
		
		document.email_us.first_name.focus();
		document.email_us.first_name.select();
	
		return false;
	}
	else if(isHtmlInjection(first_name))
	{
		alert('Please fill in your first name.');
		
		document.email_us.first_name.value = '';
		document.email_us.first_name.focus();
		document.email_us.first_name.select();
	
		return false;
	}	
	else if(first_name.length > 35)
	{
		alert('The First Name field can only contain between 1 and 35 letters.');

		document.email_us.first_name.focus();
		document.email_us.first_name.select();
	
		return false;			
	}

	if((last_name==null)||(last_name==""))
	{
		alert('Please fill in your last name.');
		
		document.email_us.last_name.focus();
		document.email_us.last_name.select();
	
		return false;
	}
	else if(isHtmlInjection(last_name))
	{
		alert('Please fill in your last name.');
		
		document.email_us.last_name.focus();
		document.email_us.last_name.select();
	
		return false;
	}	
	else if(last_name.length > 35)
	{
		alert('The Last Name field can only contain between 1 and 35 letters.');

		document.email_us.last_name.focus();
		document.email_us.last_name.select();
	
		return false;			
	}
	
	if(isHtmlInjection(company_name))
	{
		alert('The Company Name field can only contain between 1 and 50 letters.');

		document.email_us.company_name.value = '';
		document.email_us.company_name.focus();
		document.email_us.company_name.select();
	
		return false;			
	}
	else if(company_name.length > 50)
	{
		alert('The Company Name field can only contain between 1 and 50 letters.');

		document.email_us.company_name.focus();
		document.email_us.company_name.select();
	
		return false;			
	}
	
	if((streetaddr1==null)||(streetaddr1==""))
	{
		alert('Please fill in your street address.');
		
		document.email_us.street_address1.focus();
		document.email_us.street_address1.select();
	
		return false;
	}
	else if(isHtmlInjection(street_address1))
	{
		alert('Please fill in your street address.');
		
		document.email_us.street_address1.value = '';
		document.email_us.street_address1.focus();
		document.email_us.street_address1.select();
	
		return false;
	}
	else if(streetaddr1.length > 64)
	{
		alert('The Street Address field can only contain between 1 and 64 characters.');

		document.email_us.street_address1.focus();
		document.email_us.street_address1.select();
	
		return false;			
	}
		
	if(isHtmlInjection(street_address2))
	{
		alert('The Street Address field can only contain between 1 and 64 characters.');

		document.email_us.street_address2.value = '';
		document.email_us.street_address2.focus();
		document.email_us.street_address2.select();
	
		return false;			
	}
	else if(streetaddr2.length > 64)
	{
		alert('The Street Address field can only contain between 1 and 64 characters.');

		document.email_us.street_address2.focus();
		document.email_us.street_address2.select();
	
		return false;			
	}
	
	if((city==null)||(city==""))
	{
		alert('Please fill in your city.');
		
		document.email_us.city.focus();
		document.email_us.city.select();
	
		return false;
	}
	else if(isHtmlInjection(city))
	{
		alert('Please fill in your city.');
		
		document.email_us.city.value = '';
		document.email_us.city.focus();
		document.email_us.city.select();
	
		return false;
	}
	else if(city.length > 64)
	{
		alert('The City field can only contain between 1 and 64 letters.');

		document.email_us.city.focus();
		document.email_us.city.select();
	
		return false;			
	}
	
	if((state==null)||(state==""))
	{
		alert('Please select your state or province.');
				
		return false;
	}
	else if(isHtmlInjection(state))
	{
		alert('Please select your state or province.');
		
		document.state.city.value = '';
		
		return false;
	}
	
	if((email1==null)||(email1==""))
	{
		alert('Please fill in your e-mail address.');
		
		document.email_us.email1.focus();
		document.email_us.email1.select();
	
		return false;
	}
	else if(isHtmlInjection(email1))
	{
		alert('Please fill in your e-mail address.');
		
		document.email_us.email1.value = '';
		document.email_us.email1.focus();
		document.email_us.email1.select();
	
		return false;
	}
	else if(email1.length > 50)
	{
		alert('The E-mail field can only contain between 1 and 50 characters.');
	
		document.email_us.email1.focus();
		document.email_us.email1.select();
		
		return false;			
	}
	else if(false == isEmailAddress(email1))
	{
		alert('The E-mail address is not valid.');
	
		document.email_us.email1.focus();
		document.email_us.email1.select();
		
		return false;					
	}
	
	if(isHtmlInjection(email2))
	{
		alert('Your first email address does not match the second email address.');
	
		document.email_us.email2.value = '';
		document.email_us.email2.focus();
		document.email_us.email2.select();
		
		return false;			
	}
	else if(email1 != email2)
	{
		alert('Your first email address does not match the second email address.');
	
		document.email_us.email2.focus();
		document.email_us.email2.select();
		
		return false;			
	}
	
	if((zip_code==null)||(zip_code==""))
	{
		alert('Please fill in your zip code.');
		
		document.email_us.zip_code.focus();
		document.email_us.zip_code.select();
	
		return false;
	}
	else if(isHtmlInjection(zip_code))
	{
		alert('Please fill in your zip code.');
		
		document.email_us.zip_code.value = '';
		document.email_us.zip_code.focus();
		document.email_us.zip_code.select();
	
		return false;
	}
	else if(zip_code.length < 5)
	{
		alert('The Zip Code field is not valid.');

		document.email_us.zip_code.focus();
		document.email_us.zip_code.select();
	
		return false;			
	}
	else if(zip_code.length > 10)
	{
		alert('The Zip Code field is not valid.');

		document.email_us.zip_code.focus();
		document.email_us.zip_code.select();
	
		return false;			
	}
	
	if((phone==null)||(phone==""))
	{
		alert('Please fill in your phone number.');
		
		document.email_us.phone.focus();
		document.email_us.phone.select();
	
		return false;
	}
	else if(isHtmlInjection(phone))
	{
		alert('Please fill in your phone number.');
		
		document.email_us.phone.value = '';
		document.email_us.phone.focus();
		document.email_us.phone.select();
	
		return false;
	}
	else if(phone.length < 10 || phone.length > 12)
	{
		alert('The Phone Number field can only contain between 1 and 12 characters.');
	
		document.email_us.phone.focus();
		document.email_us.phone.select();
		
		return false;					
	}
	else if(false == phoneDigits(phone))
	{
		alert('The Phone Number is not Valid.');
			
		document.email_us.phone.focus();
		document.email_us.phone.select();
		
		return false;							
	}
		
	if(isHtmlInjection(promo_code))
	{
		alert('The Promotion Name field can only contain between 1 and 15 characters.');

		document.email_us.promo_code.value = '';
		document.email_us.promo_code.focus();
		document.email_us.promo_code.select();
	
		return false;			
	}
	else if(promo_code.length > 15)
	{
		alert('The Promotion Name field can only contain between 1 and 15 characters.');

		document.email_us.promo_code.focus();
		document.email_us.promo_code.select();
	
		return false;			
	}
	
	if(isHtmlInjection(track_number))
	{
		alert('The Tracking Number field can only contain between 1 and 10 numbers.');

		document.email_us.track_number.value = '';
		document.email_us.track_number.focus();
		document.email_us.track_number.select();
	
		return false;			
	}
	else if(track_number.length > 10)
	{
		alert('The Tracking Number field can only contain between 1 and 10 numbers.');

		document.email_us.track_number.focus();
		document.email_us.track_number.select();
	
		return false;			
	}
	else if(false == allDigits(track_number))
	{
		alert('The Tracking Number field can only consist of numbers.');
		
		document.email_us.track_number.focus();
		document.email_us.track_number.select();
	
		return false;
	}
	
	if(document.email_us.CanWeHelp1[0].checked)
	{
	    CanWeHelp1 = "1";
	}
	else if(document.email_us.CanWeHelp1[1].checked)
	{
	    CanWeHelp1 = "2";
	}
	else if(document.email_us.CanWeHelp1[2].checked)
	{
	    CanWeHelp1 = "3";
	}
	else if(document.email_us.CanWeHelp1[3].checked)
	{
	    CanWeHelp1 = "4";
	    document.email_us.CanWeHelp3TA.value = "";
	}
	else if(document.email_us.CanWeHelp1[4].checked)
	{
	    CanWeHelp1 = "5";
	    document.email_us.CanWeHelp2TA.value = "";
	}
	else
	{
	    alert('Please select how we can help you.');
	    
	    return false;
	}
	
	if(CanWeHelp1 == "4")
	{
		if((CanWeHelp2TA==null)||(CanWeHelp2TA==""))
		{
		    alert('Please fill in the Question box regarding this offer.');
		    
		    return false;
		}
		else if(isHtmlInjection(CanWeHelp2TA))
		{
		    alert('Please fill in the Question box regarding this offer.');
		    
		    document.email_us.CanWeHelp2TA.value = '';
		    
		    return false;
		}
	}
	else if(CanWeHelp1 == "5")
	{
		if((CanWeHelp3TA==null)||(CanWeHelp3TA==""))
		{
		    alert('Please fill in the Other/Comments box.');
		    
		    return false;
		}
		else if(isHtmlInjection(CanWeHelp3TA))
		{
		    alert('Please fill in the Other/Comments box.');
		    
		    document.email_us.CanWeHelp3TA.value = '';
		    
		    return false;
		}
	}
	
}