// <![CDATA[

function checkForm(f) {
	if (f.toName.value=='') {
		alert('You must provide a Recipient Name');
		f.toName.focus();
		return false;
	}
	if (f.toMail.value=='') {
		alert('You must provide a Recipient Email');
		f.toMail.focus();
		return false;
	}
	if (f.fromName.value=='') {
		alert('You must provide an Sender Name');
		f.fromName.focus();
		return false;
	}
	if (f.fromMail.value=='') {
		alert('You must provide an Sender Email');
		f.fromMail.focus();
		return false;
	}
	return true;
}

function newWin(url){
	newWindow = window.open (url, "newWin","width=640,height=480,scrollbars=yes,toolbar=yes,location=yes,menubar=yes,resizable=yes,status=yes");
}

function emailPop() {
	newWindow = window.open ('email/mailform.php?product_ID='+document.emailInfo.product_ID.value, "emailPop","width=570,height=560,scrollbars=no,toolbar=no,location=no,menubar=no,resizable=no,status=no");
}

function infOver(which) { document[which].src = '/images/footer/' + which + '_on.gif'; }
function infOut(which) { document[which].src = '/images/footer/' + which + '.gif'; }

//sub nav rollover function
function doSubRoll(type, name) {
	if (document.all) {
		if (type == 'on') document.all[name].style.visibility = 'visible';
		else if (type == 'off') document.all[name].style.visibility = 'hidden';
	}
	if (document.getElementById) {
		if (type == 'on') document.getElementById(name).style.visibility = 'visible';
		else if (type == 'off') document.getElementById(name).style.visibility = 'hidden';
	}
	if (document.layers) {
		if (type == 'on') document.layers[name].visibility = 'show';
		else if (type == 'off') document.layers[name].visibility = 'hide';
	}
}

//main nav rollover function
function doRoll(type, name) {
	var swap1 = eval(name + '_' + type + '.src');
	document.images[name].src = swap1;
	if (document.all) {
		if (type == "on") document.all[name + 'a'].style.visibility = "visible";
		else if (type == "off") document.all[name + 'a'].style.visibility = "hidden";
	}
	if (document.getElementById) {
		if (type == "on") document.getElementById(name + 'a').style.visibility = "visible";
		else if (type == "off") document.getElementById(name + 'a').style.visibility = "hidden";
	}
	if (document.layers) {
		if (type == "on") document.layers[name + 'a'].visibility = "show";
		else if (type == "off") document.layers[name + 'a'].visibility = "hide";
	}
}
// ]]>