function clearImage(){
document.Trav_eAgent.zip.style.background='';
}

function isEmpty(s)
{
	return ((s == null) || (s.length == 0))
}

function isInteger (s)
{
	var i;
	if (isEmpty(s))
		if (isInteger.arguments.length == 1) return false;
		else return (isInteger.arguments[1] == true);
	for (i = 0; i < s.length; i++)
	{
		var c = s.charAt(i);
		if (!isDigit(c)) return false;
	}
	return true;
}

function isDigit (c)
{
	return ((c >= '0') && (c <= '9'))
}

function validateEntry(){
if (document.Trav_eAgent.zip.value == ''){
	alert('A zip code is required to process your quote!');
	return false;
	}
if((document.Trav_eAgent.zip.value.length != 5) || (!isInteger(document.Trav_eAgent.zip.value))){
	alert('The zip code entered is not valid!');
	document.Trav_eAgent.zip.focus();
	document.Trav_eAgent.zip.select();
	return false;
	}
}

function LaunchWindow(){
	if(validateEntry()!=false){
var zipCode = document.Trav_eAgent.zip.value;
var URL_String="https://jas.travelers.com/get-a-quote-now/entry.html?sponsor=" + eAgentCode() + "&path=request&PROFILE_ARRIVAL_METHOD=Direct&lob=AUTO&PROFILE_SPONSOR_NAME=" + eAgentCode() + "&zipCode=" + zipCode;
window.open(URL_String);
	}
}

function LaunchMyTravelers(){
	window.open("http://mytravelers.com");
}
//////Code maintained by Michael J Stokes