function Menu(){
	//ok
}
Menu.prototype.execute = function(){
	//get the value
	var val = document.getElementById("type").options[document.getElementById("type").selectedIndex].value;
	switch(val){
		case "1":
		case "3":
			//show mail
			this.showMail();
		break;
		case "5":
			//show review
			this.showReview();
		break;
		default: 
			this.def();
		break;
	}
}
Menu.prototype.showMail = function(){
	document.getElementById("mail_div").style.display = "inline";
	document.getElementById("rev_div").style.display = "none";
}
Menu.prototype.showReview = function(){
	document.getElementById("rev_div").style.display = "inline";
	document.getElementById("mail_div").style.display = "none";
}
Menu.prototype.def = function(){
	document.getElementById("rev_div").style.display = "none";
	document.getElementById("mail_div").style.display = "none";
}

//the download redirect function

function DownloadRedirect(loc) {
	//set the value
	loc += "&code="+document.getElementById("code").value;
	
	//insert loading gif
	var body = document.getElementById("code_field");
	body.style.position="absolute";
	body.style.height="80px";
	body.style.width="145px";
	body.style.zIndex="100";
	body.style.backgroundImage="url(../img/loading.gif)";
	body.style.backgroundRepeat="no-repeat";
	body.style.backgroundPosition="center";

	//set sleep mode
	setTimeout("window.location='"+loc+"'",3000);
	return true;
}
