// make sure that something has been put in the mailing list sign up before allowing the form to submit
function checkML () {
	if (document.mailingList.join.value == "" || document.mailingList.join.value == "Join Our Emailing List") {
		alert ('Please enter your email address to sign up.');
		return false;
	}
	else {
		return true;
	}
}

function openRefer () {
	window.open('refer.php','refer','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=400,height=400,top=50,left=50');
}

function openNewsletter () {
	window.open('newsletter.php','newsletter','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=400,height=400,top=50,left=50');
}		

function rollSetup() {
	var img, hover, norm, down
	for (var i = 0; (img = document.images[i]); i++) {
		if (img.getAttribute) {

			norm = img.getAttribute("src");
			hover = img.getAttribute("hsrc");
			down = img.getAttribute("dsrc");

			if (norm != "" && norm != null) {
				img.n = new Image();
				img.n.src = img.src;
			
				if (hover != "" && hover != null) {
					img.h = new Image();
					img.h.src = hover;
					img.onmouseover = rollSwapOn
					img.onmouseout  = rollSwapOff
				}

				if (down != "" && down != null) {
					img.d = new Image();
					img.d.src = down;
					img.onmousedown = rollSwapDown
				}
			}
		}
	}
}

function rollSwapOn() {
	this.src = this.h.src;
}

function rollSwapOff() {
	this.src  = this.n.src;
}

function rollSwapDown() {
	this.src  = this.d.src;
	this.temp = typeof(document.onmouseup) != 'undefined' && typeof(document.onmouseup) != 'unknown' ? document.onmouseup : "";
	rollSwapUp.img = this;
	document.onmouseup = rollSwapUp;
}

function rollSwapUp() {
	var ths = rollSwapUp.img;
	ths.src = ths.norm.src;
	if (ths.temp) document.onmouseup = ths.temp;
}
