// Rumpke-WTG Custom JavaScript Code
function launchCenter(url, name, height, width, opt) {
var str = "height=" + height + ",innerHeight=" + height;
str += ",width=" + width + ",innerWidth=" + width;
if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;

var xc = (aw - width) / 2;
var yc = (ah - height) / 2;

str += ",left=" + xc + ",screenX=" + xc;
str += ",top=" + yc + ",screenY=" + yc;
}
window.open(url, name, str + opt);
}

function setCookie(myname, myvalue) {
	var mycookie = myname + "=" + escape(myvalue);
	var myexpires = new Date();
	var mydomain = "william-thomasgroup.com";
	myexpires.setTime(myexpires.getTime() + 365*24*60*60*1000);
	mycookie = mycookie + "; myexpires=" + myexpires.toGMTString() + "; domain=" + mydomain;
	document.cookie = mycookie;
}

function getCookie(myname) {
	var mycookie = document.cookie;
	var myname = myname + "=";
	var mystart = mycookie.indexOf(myname);
	if (mystart < 0) {return null;}
	var myend = document.cookie.indexOf(";", mystart);
	if (myend < 0){myend = mycookie.length;}
	return unescape(mycookie.substring(mystart + myname.length, myend));
}

function checkEntry(nameentry) {
	var nmString = nameentry.value;
	chkEntry = nmString.indexOf( "@" );
	if (chkEntry == -1) {
		alert( "You must enter a valid email address" );
		nameentry.focus();
		return false;
	} else {
		return true;
	}
}