function jumptoCat(item) {
	
	catID = item.options[item.selectedIndex].value;
	parent.location.href = catID + ".html";
	parent.focus();
}

function jumptoPage(item) {
	page = item.options[item.selectedIndex].value;
	parent.location.href = page + ".html";
	parent.focus();
}

function bookMark() {
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {

		var url="http://www.bestbuybattery.com";
		var title="Bookmark BestBuyBattery.com";

		window.external.AddFavorite(url,title);;
	} else {
		return alert("Please Bookmark us using: CTRL+D");
	}
}

function UpdateQty(item)
{
	itemId = item.name;
	newQty = item.options[item.selectedIndex].text;
	document.location.href = 'index.php?actie=update&itemId=' +itemId+ '&qty=' +newQty;
}

function validateCustomerService() {
	var message ="";
	
	if (document.contactusform.name.value.length==0) {
		message = message + "Fill in your name.\n";
	}
	
	if (document.contactusform.email.value.length==0) {
		message = message + "Incorrect email.\n";
	}
	if (document.contactusform.messagec.value.length==0) {
		message = message + "Your message is empty.\n";
	}
	
	if (message=="") {
		return true;
	} else {
		alert(message);
		return false;
	}	
}	

function validateSearchAssistant() {
	var message ="";
	
	if (document.searchassistantform.name.value.length==0) {
		message = message + "Please fill in your name.\n";
	}
	
	if (document.searchassistantform.email.value.length==0) {
		message = message + "Please fill in your email address.\n";
	}
	if (document.searchassistantform.comment.value.length==0) {
		message = message + "Please fill in what your looking for.\n";
	}
	
	if (message=="") {
		return true;
	} else {
		alert(message);
		return false;
	}	
}

function validateTellafriend() {
	var message = "";
	
	if(document.tellafriendform.femail.value.length==0) {
		message = message + "Please give the email address of the recipient\n";
	} 
	if(document.tellafriendform.comment.value.length==0) {
		message = message + "Give your friend a comment about our site\n";
	}

	if (message == "") {
		return true;
	} else {
		alert(message);
		return false;
	}
}	
