function normRoll(imgname, imgsrc) {
	imgsrc = "img/" + imgsrc;
    document.images[imgname].src = imgsrc;
    return true;
}

// Email Validation -- Error Checking

function emailvalidation(entered, alertbox) {
	with (entered) {
		apos=value.indexOf("@");
		dotpos=value.lastIndexOf(".");
		lastpos=value.length-1;
		if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) {
			if (alertbox) {
				alert(alertbox);
			} 
			return false;
		} else {
			return true;
		}
	}
}

function emptyvalidation(entered, alertbox) {
	with (entered) {
		if (value==null || value=="" || value==0) {
			if (alertbox!="") {
				alert(alertbox);
			} return false;
		} else {
			return true;
		}
	}
}

// Winners -- Kooky little hardwire reset

function resetForm() {
	document.winners.agency.value = '';
	document.winners.company.value = '';
	document.winners.groupname.value = 'All Groups';
	document.winners.category.value = 'All Categories';
}

// Menus

new ypSlideOutMenu("menu1", "down", 405, 227, 180, 61)
new ypSlideOutMenu("menu2", "down", 749, 227, 180, 61)
ypSlideOutMenu.writeCSS();
