function MM_displayStatusMsg(msgStr) {
  status=msgStr;
  document.MM_returnValue = true;
}

function showCatList(){

document.getElementById("catlist").style.display = "block";
document.getElementById("catup").style.display = "block";
document.getElementById("catdown").style.display = "none";
}
function hideCatList(){

document.getElementById("catlist").style.display = "none";
document.getElementById("catdown").style.display = "block";
document.getElementById("catup").style.display = "none";
}

function showBrandList(){

document.getElementById("brandlist").style.display = "block";
document.getElementById("brandup").style.display = "block";
document.getElementById("branddown").style.display = "none";
}
function hideBrandList(){

document.getElementById("brandlist").style.display = "none";
document.getElementById("branddown").style.display = "block";
document.getElementById("brandup").style.display = "none";
}

function showInfo(){

document.getElementById("infolist").style.display = "block";
document.getElementById("infoup").style.display = "block";
document.getElementById("infodown").style.display = "none";
}
function hideInfo(){

document.getElementById("infolist").style.display = "none";
document.getElementById("infodown").style.display = "block";
document.getElementById("infoup").style.display = "none";
}


function showCart(){

document.getElementById("cartlist").style.display = "block";
document.getElementById("cartup").style.display = "block";
document.getElementById("cartdown").style.display = "none";
document.getElementById("cartlink").style.display = "block";
}
function hideCart(){

document.getElementById("cartlist").style.display = "none";
document.getElementById("cartdown").style.display = "block";
document.getElementById("cartup").style.display = "none";
document.getElementById("cartlink").style.display = "none";
}
function addCart(id,value){

if(value.value >='1'){
	document.getElementById("check"+id).checked = true
} else {
	document.getElementById('check'+id).checked = false;
}

}

function checkBox(id,value){

if(value.checked == true){
	document.getElementById("qty"+id).selectedIndex = '1';	
}
if(value.checked == false){
	document.getElementById("qty"+id).selectedIndex = '0';	
} 

}

function newWindow(thepage,thename,width,height,scroll){
LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
settings = 'height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
window = window.open(thepage,thename,settings)
}

function updateCart(id,product,value){

if(value.value >='1'){
	window.location="cart.php?action=add&product="+product+"&option="+id+"&qty="+value.value;
} else {
	window.location="cart.php?action=delete&product="+product+"&option="+id;
}

}