
function setStatus(message){
	self.status = message;
} 

function Go(URL){
	top.location = URL;
} 

function getMenu(){
	PAGE = "http://sotallytober.com/include/displaymenu.php";
	xmlHttp = createAjaxObject();
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4){
			document.getElementById("menuDiv").innerHTML = xmlHttp.responseText;
		}
	}	
	xmlHttp.open("GET",PAGE,true);
	xmlHttp.send(null);
}

function rateItem(TYPE,ITEM,RATING){
			alert("You must be logged on to rate items.");
		return;
		document.getElementById("currentRating_" + ITEM).style.width = (RATING * 20) + "%";
	PAGE = "http://sotallytober.com/update.php?ACTION=RATING&TYPE=" + TYPE + "&ITEM=" + ITEM + "&RATING=" + RATING;
	xmlHttp = createAjaxObject();
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4){
			alert(xmlHttp.responseText);
		}
	}	
	xmlHttp.open("GET",PAGE,true);
	xmlHttp.send(null);
}


function addFav(TYPE,ITEM){
			alert("You must be logged on to save items to your favorites.");
		return;
		PAGE = "http://sotallytober.com/update.php?ACTION=FAV-ADD&ITEM_TYPE=" + TYPE + "&ITEM_ID=" + ITEM;
	xmlHttp = createAjaxObject();
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4){
			alert(xmlHttp.responseText);
		}
	}	
	xmlHttp.open("GET",PAGE,true);
	xmlHttp.send(null);
}

function removeFav(TYPE,ITEM){
	PAGE = "http://sotallytober.com/update.php?ACTION=FAV-REMOVE&ITEM_TYPE=" + TYPE + "&ITEM_ID=" + ITEM;
	xmlHttp = createAjaxObject();
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4){
			alert(xmlHttp.responseText);
		}
	}	
	xmlHttp.open("GET",PAGE,true);
	xmlHttp.send(null);
}


function loginUser(LOGIN_FORM){
	document.getElementById("loginMessage").innerHTML = "";
	//LOGIN_FORM.loginButton.disabled = true;
	UPDATE_VALUES = getFormValues(LOGIN_FORM); 
	document.getElementById("loginMessage").innerHTML="<I>Logging In...</I>";
	xmlHttp = createAjaxObject();
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4){
			if(xmlHttp.responseText.replace(/^\s+|\s+$/g,"") == "true"){
				//window.location.reload();
				top.location = 'http://sotallytober.com/';
			} else {
				document.getElementById("loginMessage").innerHTML=xmlHttp.responseText;
			}
		}
	}
	xmlHttp.open("POST","http://sotallytober.com/user/login.php",true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
    xmlHttp.setRequestHeader("Content-length", UPDATE_VALUES.length);
    xmlHttp.send(UPDATE_VALUES);
	//document.getElementById("searchMessage").innerHTML="";
	return;
}
