// note that this script will only work with .gif images,
// and only if their id is the same as the image name, and
// elements have the name "roll" and are in the /images folder ex:
// <img src="images/blah.gif" id="blah" name="roll" />
var imgArray = new Array();

function initPreload() {
	imgArray = document.getElementsByName("roll");
	if (document.getElementsByName) {
		var i, img;
		for (i = 0; i < imgArray.length; i++) {
			img = imgArray[i];
			img.onmouseout = imgSwap;
			img.onmouseover = imgSwap;
		}
	}
	preloadObject = new Image();
	for (i=0; i<imgArray.length; i++) {
		preloadObject.src = "images/" + imgArray[i] + ".gif";
		preloadObject.src = "images/" + imgArray[i] + "_roll.gif";
	}
}

// image swapping event handling
function imgSwap(evt) {
	evt = (evt) ? evt : event;
	var elem = (evt.target) ? evt.target : evt.srcElement;

	switch (evt.type) {
		case "mouseout" :
			elem.src = "images/" + elem.id + ".gif";
			break;
		case "mouseover" :
			elem.src = "images/" + elem.id + "_roll.gif";
			break;
	}
	evt.cancelBubble = true;
	return false;
}

function popContent(desturl, wintitle, w, h) {
	var newWind = window.open(desturl, wintitle, 'width=' + w + ',height=' + h + ',left=0,top=0,toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=yes,resizable=yes');
	newWind.opener = self;
}
function signup() {
	var exturl = "login/checkbrowser.aspx?caller=9&coursetype=online&coursestate=tx";
	try {
		popContent(popurl + exturl, "TxLeadFoot", 700, 500);
	} catch(ex) {
		//alert(ex.description);
	}
}
function login() {
	var exturl = "login/login.aspx?caller=9&coursetype=online&coursestate=tx";
	popContent(popurl + exturl, "TxLeadFoot", 700, 500);
}
function testdrive() {
	var newWind = window.open("/demo.asp", "Demo", 'width=600,height=400,left=0,top=0,toolbar=no,status=no,location=no,menubar=no,directories=no,scrollbars=no,resizable=no');
}
function openmapi(prefix, domain) {
	window.location.href = 'mai' + 'lto:' + prefix + '@' + domain + '.' + 'com';
}