var timeOut;
var showTimer;
var showMessages = false;

function showAcct() { 
	window.clearTimeout(timeOut);	
	showMsg("on");
	showTimer = window.setTimeout("do_showAcct()", 100);	
}
	
function do_showAcct() {
	clearTimeout(showTimer);
	$("accountInfo").style.display = "block";
}

function hideAcct() { 
	showMsg('off');
	window.clearTimeout(showTimer);
	timeOut = window.setTimeout("do_hideAcct();", 1000);
}

function do_hideAcct() { 
	$("accountInfo").style.display = "none";		
}

function showMsg(str) { 
	if (showMessages) {
		window.status = str;
	}
	return true;

}

function showMyCart() {
	window.location = "/store/cart.php";
	return false;
}

function continueShopping() {
	window.location = "/store/index.php";
	return false;
}

function addCart(oItem, oMe) { 
	$("insert").value = "1";
	$("prodId").value = oItem;
	$("pgy").value = oMe;
	$("mainForm").action = "/store/cart.php";
	$("mainForm").submit();		
	
}

function do_logout() { 
	$("logout").value = '1';
	$("mainForm").action = "/store/product/";
	$("mainForm").submit();	
}


function removeItem() {
	document.getElementById("my_qty").value = "0";
	submitForm();	
}

function submitForm() {
	$("insert").value = "1";
	$("mainForm").submit();
		
}

function updateQTY() { 
	$("update").value = '1';
	$("mainForm").submit();
}


function removeSelected(oId) { 
	$("rem").value = oId;
	if (confirm("Are you sure you desire to remove this item?")) {
		$("mainForm").submit();
	}
}

function checkOut() {
	$("update").value = "1";
	$("upNext").value = "1";
	$("mainForm").submit();		
}

function showPublic() { 
	publicCont.style.top = (tempY-200) + "px";
	publicCont.style.left = (tempX-480) + "px";	
}

function hidePublic() { 
	publicCont.style.top = "-5000px";
	publicCont.style.left = "-5000px";	
}

function refreshCat() {
	$("p").value = 0;
	$("dropDownBar").submit();
}
function refreshToolbar() {
	$("dropDownBar").submit();
}
