// DO NOT EDIT THIS FILE
function sortColumn(pSortField,pSortOrder){document.catalogue.sortfield.value=pSortField;document.catalogue.sortorder.value=pSortOrder;document.catalogue.submit();};
function pageTo(pPageNumber){document.catalogue.pagenumber.value=pPageNumber;document.catalogue.submit();};

function addToCart(pProductID, price, on0, os0, v0, on1, os1, v1)
{
var url = "";
var amount = parseFloat(price)+parseFloat(v0)+parseFloat(v1);
amount=''+amount+'';
if (amount.indexOf(".")>0)
{
	if (amount.length < amount.indexOf(".")+3)
		amount=''+amount+'0';
	if (amount.length > amount.indexOf(".")+3)
	{
		amount=amount.substring(0,amount.indexOf(".")+3);
	}
}
if((on0!="")&&(on1!=""))
{
	url = on0+': '+os0 +'<br>'+on1+': '+os1;
}
else if(on0!="")
{
	url = on0+': '+os0;
}
else if(on1!="")
{
	url = on1+': '+os1;
}
document.catalogue.pid.value = pProductID;
document.catalogue.options.value = url;
document.catalogue.price.value = amount;
document.catalogue.submit();
}

var win = null;
function viewCart(w,h,scroll)
{
	LeftPosition = (screen.width)?(screen.width - w)/2 : 0;	
	TopPosition = (screen.height)?(screen.height - h)/2 : 0;
	settings = 'height = ' + h + ',width=' + w + ',top = ' + TopPosition + ',left = ' + LeftPosition + ',scrollbars = ' + scroll + ',resizable, location, status';
	win = window.open("viewcart.php","ViewCart",settings);
}
function newWindow(mypage,myname,w,h,scroll,st,res){LeftPosition=(screen.width)?(screen.width-w)/2:0;TopPosition=(screen.height)?(screen.height-h)/2:0;settings='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars'+scroll+',status'+st+',resizable'+res+'';win=window.open(mypage,myname,settings);};
function clearfield(){if(document.search.keyword.value=="Keyword Search")document.search.keyword.value="";};
