function sortPage(currSort,sortVal,type) {
	
	
	document.saveFields.page.value = 1;
	
	if (typeof(type) != 'undefined' && type == 'desc') {
		if (currSort != sortVal+" desc") sortVal = sortVal+" desc";
	} else {
		if (currSort == sortVal) sortVal = sortVal+" desc";	
		
	}

	document.saveFields.sort.value= sortVal;
	document.saveFields.submit();
	
}

function navigate(page,numResults) {
	
	document.saveFields.page.value = page;
	document.saveFields.numResults.value = numResults;
	document.saveFields.submit();
	
}

function submitToUrl(url) {
	document.saveFields.action= url;
	document.saveFields.submit();
	
}

function addToCart(bookID) {
	alert("This item has been added to your cart.\nClick the Shopping Cart Button to view contents\n\nThank You");
	document.saveFields.msg.value= 'addToCart';
	document.saveFields.bookID.value= bookID;
	document.saveFields.submit();
	
}
function submitToUrl(url) {
	document.saveFields.action= url;
	document.saveFields.submit();
	
}

function removeFromCart(bookID){

	document.saveFields.msg.value= 'remove';
	document.saveFields.bookID.value= bookID;
	document.saveFields.action= 'cart.php';
	document.saveFields.submit();

}

function popUp(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

