//the form for VIEW CART - this is submitted from an icon in HEADER.JS, via below function showCart
document.write('<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" name="viewcart" method="post">')
document.write('<input type="hidden" name="cmd" value="_cart">')
document.write('<input type="hidden" name="business" value="email@tincanmodels.com">')
document.write('<input type="hidden" name="display" value="1">')
document.write('</form>')

function showCart() {
	viewcart.submit()
}

function quickSearch() {
	if (document.addtobasket.quickmodfind.selectedIndex == 0) {
		alert ("You need to choose the model you wish to view from the selection box")
	}
	else {
			loadURL = document.addtobasket.quickmodfind[document.addtobasket.quickmodfind.selectedIndex].value + ".html"
			document.location.href=loadURL
	}
}
//need to declare the form in all pages as this is referenced by quicksearch...
document.write('<form target="paypal" onSubmit="return chkChoice()" name="addtobasket" action="https://www.paypal.com/cgi-bin/webscr" method="post">')
//for testing:
//document.write('<form target="paypal" onSubmit="return chkChoice(this)" name="addtobasket" action="testform.asp" method="post">')
//...the rest of this gumph is only required by paypal buy nows...
document.write('<input type="hidden" name="cmd" value="_cart">')
document.write('<input type="hidden" name="business" value="email@tincanmodels.com">')
document.write('<input type="hidden" name="no_note" value="1">')
document.write('<input type="hidden" name="currency_code" value="GBP">')
document.write('<input type="hidden" name="lc" value="GB">')
document.write('<input type="hidden" name="add" value="1">')
//the next ones are set dynamically by each product page once buy now is hit...
document.write('<input type="hidden" name="item_name" value="">')
document.write('<input type="hidden" name="item_number" value="">')
document.write('<input type="hidden" name="amount" value="">')
//REMOVED AS THIS GENERATES SECURE/INSECURE ITEMS MSG...
//document.write('<input type="hidden" name="image_url" value="http://www.fullerlove.com/tincanmodels/paypalcustlogo.gif">')
document.write('<input type="hidden" name="return" value="http://www.tincanmodels.com/thanks.html">')
document.write('<input type="hidden" name="cn" value="Special Instructions">')