function loginTO() {
	setCookie('bid3','');
	alert('1-800HOMEOWNER, your session has timed out');
	window.location = (".");
}

//cookie function
function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) + "; path=/" +
((expires == null) ? "" : "; expires=" + expires.toGMTString());
}

var exp = new Date();          // make new date object
var now = new Date();
exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 7)); // set it 7 days ahead

// Validate zip code entry

function validateZIP(field,formName) {
var valid = "0123456789";
if (field.length!=5) {
	alert("Please enter your 5 digit zip code.");
	return false;
}

for (var i=0; i < field.length; i++) {
	temp = "" + field.substring(i, i+1);
	if (valid.indexOf(temp) == "-1") {
		alert("Invalid characters in your zip code.  Please try again.");
		return false;
	}
}
window.location=(formName.action+formName.zip.value+'/');
return false;
}

// Page select function
function pageSelect(dis){
	window.location = ('/'+dis.state.value);
}

function zipSelect(dis){
	window.location = ('/'+dis.zip.value+'/');
}
