//auto generated by visitvancouver.bc.ca
var savedLoad=0;
var floatQuantity=0;
var currencyUnit ='CA$';
var orderInfoFile ='info.html';
var introFile ='intro.html';
var storeName='Thank you';
var searchFile = 'search.html';
var accountID = '';
var subDirID= '';
var submitEmail= 'visit@visitvancouver.bc.ca';
var encryptEmail= '0';
var noDecimal= 0;
var storeContactAddress='<font face="verdana, arial, helvetica, times new roman" size="1" color="blue"><b>Shipping charges and (applicable) taxes within North America are included in your order.</b></font></font>';
var EMailSubject = 'New Order';
var serverURL= 'http://www.visitvancouver.bc.ca/mall/thankyou.asp';
shipMethod = new Array();shipMethod[0]='';shipMethod[1]='';shipMethod[2]='';shipMethod[3]='';shipMethod[4]='';billMethod = new Array();billMethod[0]='';billMethod[1]='';
var shipCalVer='1';
var mDCountryMinCharge='0.00';
var mDCountryPercentCharge='0.00';
var mDStateMinCharge='0.00';
var mDStatePercentCharge='0.00';
var mSStateMinCharge='0.00';
var mSStatePercentCharge='0.00';
var mCShipingTax=0;
var mSShippingTax=0;
var mCurrencyAfter =0;
var mPaymentCard=1;
var mPaymentCheck=0;
var mPaymentFax=0;
var mCartALink='#aaaa00';
var mAlignStr='<Center>';
var mCartBGColor='#ffffff';
var mCartBGImage='';
var mCartTableBodyColor='#ffffff';
var mCartTableBodyBGColor='#66CCCC';
var mCartTableHeaderBGColor='#ffffff';
var mCartTableHeaderColor='#669999';
var mCartText='#000000';
var mCartLink='#0000aa';
var mCartVLink='#0000aa';
var mServerALink='#669999';
var mServerBGColor='#ffffff';
var mServerBGImage='';
var mServerTableBodyColor='#ffffff';
var mServerTableBodyBGColor='#ffffff';
var mServerTableHeader='#669999';
var mServerTableHeaderBGColor='#669999';
var mServerCheckoutMesg='';
var mServerLink='#0000aa';
var mServerText='#000000';
var mServerThankYouMesg='<strong>Thank you.<br>Your order has been placed successfully.<br></strong>';
var mServerVLink='#0000aa';
var mServerLanguageStr='English';
var mServerEmailStyleStr='PlainText';
var MinimunInvoiceNumber='1000';
var FieldEmptyCheck='12221112200000000000000000000000000000000000000000';
var FieldShow='22222222200000000000000000000000000000000000000000';
var fHasCountryTax=0;
var countryTaxName='';
var countryTaxRate=0.00;
var storeCountry='Canada';
var fHasStateTax=0;
var stateTaxName='';
var stateTaxRate=0.00;
var storeState='';
stateName = new Array();
function SelectCatalog(pageName, formName, selectName) 
{
   var i = eval("parent.frames['"+pageName+"'].document."+formName+"."+selectName+".selectedIndex");
   var url =  eval("parent.frames['"+pageName+"'].document."+formName+"."+selectName+".options["+i+"].value");
   parent.frames['shop'].window.location.href=url;
}
function Display(buttonName, picture){	eval( buttonName+".src = \"" + picture + "\";");}
function PrintSubmitField(cWin)
{
  cWin.write("<input type=hidden name=mAlignStr value='"+mAlignStr+"'>");
  cWin.write("<input type=hidden name=mCurrencyAfter value='"+mCurrencyAfter+"'>");
}
var returnHtmlPath=introFile;
function MakeArray(n) {
      this.length = n;
      for(var i = 0; i < n; i++){
            this[i] = 0;
      }
      return this;
}
function Currency(money)
{
	money =  parseFloat(money);
	money += 0.005;
	money +=  ""; 
	var monLen = money.length;
	var digPos = money.indexOf(".");
	if (noDecimal) {
		if(digPos != -1) {
			money = money.substring(0, digPos);
		}
		return money;
	}
	if(digPos == -1) {
		if (money <=0) {
			money ="0.00";
		} else {
			money += ".00";
		}
		return money;
	} else {
		if (digPos + 3 > monLen) {
			money += "0";
		} else if (digPos + 3 != monLen) {
			money = money.substring(0, digPos+3);
		} 
		return money;
	}     
}

function RECORD(n)
{
	this.length = n;
	this.curLength = 0;
	this.itemName=new MakeArray(n);
	this.price=new MakeArray(n);
	this.quantity=new MakeArray(n);
	this.itemID=new MakeArray(n);
	this.weight=new MakeArray(n);
	this.fTaxable=new MakeArray(n);
	return this;
}
var orderRecord = new RECORD(250);
function AddRecord(itemName, unitPrice, qty, itemID, weight, fTaxable)
{
	var i;
	for (i=0;i<orderRecord.curLength;i++) {
		if (orderRecord.itemName[i] == itemName) {
			orderRecord.quantity[i] += qty;
			return;
		}
	}

	if (orderRecord.curLength < orderRecord.length) {
		orderRecord.itemName[orderRecord.curLength] =itemName;
		orderRecord.quantity[orderRecord.curLength] = qty;
		orderRecord.price[orderRecord.curLength] = unitPrice;
		orderRecord.itemID[orderRecord.curLength] = itemID;
		orderRecord.weight[orderRecord.curLength] = weight;
		orderRecord.fTaxable[orderRecord.curLength] = fTaxable;
		orderRecord.curLength++;
	} else {
		alert("This order was not placed in your shopping cart because your shopping cart has been filled up.\nPlease check out to empty it before continue with next order");
	}
}

function GetSelection(theForm, fieldNum)
{
	var ft=eval("theForm.sft"+fieldNum+".value");
	var ftmp="";
	var subField = eval("theForm.subfield"+fieldNum);
	var i;
	if (ft == 1) {
		for (i = 0; i < subField.length; i++) {
				if (subField.options[i].selected) {
					return subField.options[i].value;
				}
		}
	} else {
		var subFieldName = eval("theForm.subfield"+fieldNum+"name");
		var tmp="0::"+subFieldName.value+"("+subField.value+")";
		var n=tmp.length;
		for (i=0; i <n; i++) {
			  if (tmp.charAt(i) =='\'') {
				  ftmp=ftmp+'`';
			  } else {
				   ftmp=ftmp+tmp.charAt(i);
			  }
		}
	}
     return ftmp;
}

function CalUnitPrice(theForm)
{
	var totalPrice = parseFloat(theForm.basePrice.value);
	var totalSubField = parseInt(theForm.totalSubField.value);
	var i;
	for (i=0;i<totalSubField;i++) {
		var tmpStr = GetSelection(theForm, i);
		totalPrice += parseFloat(tmpStr);
	}
	theForm.unit.value = Currency(totalPrice) ;
}

function CheckQty(theForm)
{
	var qty;
	if (floatQuantity) {
		qty=parseFloat(theForm.Qty.value);
		if (qty<=0) qty=1.00;
		qty +="";
		theForm.Qty.value = qty;
	} else {
		qty=parseInt(theForm.Qty.value);
		if (qty<=0) qty=1;
		qty +="";
		theForm.Qty.value = qty;
	}
	
}

function ReturnPath(n1, n2)
{
	if (n1 >= 0) {
		returnHtmlPath = "catalog"+n1+"_" +n2+".html";
	} else if (n1 == -1) {
		returnHtmlPath = orderInfoFile;
	} else if (n1 == -2) {
		returnHtmlPath = introFile;
	} else if (n1 == -3) {
		returnHtmlPath = "item"+n2+".html";
	}
}

function Add(theForm)
{
	var cWin= parent.frames["shop"].document;
	var itemName = theForm.itemName.value;
	var basePrice = parseFloat(theForm.basePrice.value);
	var totalPrice = basePrice;
	var totalSubField = parseInt(theForm.totalSubField.value);
	var itemID=theForm.itemID.value;
	var weight=parseFloat(theForm.itemWeight.value);
	var fTaxable=parseInt(theForm.itemTaxable.value);
	
	var i;
	var tmpStr;
	for (i=0;i<totalSubField;i++) {
		tmpStr = GetSelection(theForm, i);
		totalPrice += parseFloat(tmpStr);
		var n= tmpStr.indexOf("::");
		n+=2;
		itemName += ", " + tmpStr.substr(n);
			
	}
	var str="Add this item?\n"+itemName + "\n";
	var unitPrice= totalPrice;
	if (mCurrencyAfter) {
		str += "Unit Price "+ Currency(totalPrice )+ currencyUnit  +"\n";
	} else {
		str += "Unit Price "+currencyUnit + Currency(totalPrice ) +"\n";
	}
	var qty;
	if (floatQuantity) {
		qty=parseFloat(theForm.Qty.value);
	} else {
		qty=parseInt(theForm.Qty.value);
	}
	str += "Quantity " + qty +"\n";
	if (mCurrencyAfter) {
		str += "Total Price:"+Currency(totalPrice*qty)+currencyUnit;	
	} else {
		str += "Total Price:"+currencyUnit+Currency(totalPrice*qty);
	}
	if (confirm(str)) {
		AddRecord(itemName, unitPrice, qty, itemID, weight, fTaxable);
	} else {
		alert("This item was not placed in your shopping cart.");
		return;
	}
	ViewCart();
	PrintCartTotal();
}

function Delete(n)
{
	if (n >= orderRecord.curLength) {
		alert("Cannot remove this item");
		return;
	}
	var i;
	var totalSum=orderRecord.price[n]*orderRecord.quantity[n];
	for (i=n; i<orderRecord.curLength-1; i++) {
		orderRecord.itemName[i]=orderRecord.itemName[i+1];
		orderRecord.price[i]=orderRecord.price[i+1];
		orderRecord.quantity[i]=orderRecord.quantity[i+1];
		orderRecord.itemID[i]=orderRecord.itemID[i+1];
		orderRecord.weight[i]=orderRecord.weight[i+1];
		orderRecord.fTaxable[i]=orderRecord.fTaxable[i+1];
	}
	orderRecord.curLength--;
	if (orderRecord.curLength==0) {
		var cWin = parent.frames["shop"].document;
		cWin.open();
		cWin.write("<HTML><HEAD><TITLE> Shopping Cart Viewer</TITLE></HEAD>");
		cWin.write("<BODY  BACKGROUND='"+mCartBGImage+"' Text='"+mCartText+"' BGCOLOR='"+mCartBGColor+"' LINK='"+mCartALink+"' VLINK='"+mCartLink+"'  ALINK='"+mCartALink+"' valign=top><form><center>");
		cWin.write("<TABLE width=630 border=0 CELLSPACING=0 CELLPADDING=0><tr><td align=center>");
		cWin.write("<font size=+3><strong>Your shopping cart is empty</strong></font><hr>");
		cWin.write("</td></tr></table></form><br><center><a href='"+returnHtmlPath+"'>Back</a>");
		cWin.write("</body></html>");
		cWin.close();
		PrintCartTotal();
		return;
	}
	ViewCart();
	PrintCartTotal();
}


function RemoveAll()
{
	if( confirm("Ready to empty your shopping cart?")){
		orderRecord.curLength=0;
		var cWin = parent.frames["shop"].document;
		cWin.open();
		cWin.write("<HTML><HEAD><TITLE> Shopping Cart Viewer</TITLE></HEAD>");
		cWin.write("<BODY  BACKGROUND='"+mCartBGImage+"' Text='"+mCartText+"' BGCOLOR='"+mCartBGColor+"' LINK='"+mCartALink+"' VLINK='"+mCartLink+"'  ALINK='"+mCartALink+"' valign=top><form><center>");
		cWin.write("<TABLE width=630 border=0 CELLSPACING=0 CELLPADDING=0>");
		cWin.write("<font size=+3><strong>Your shopping cart is empty</strong></font><hr>");
		cWin.write("</table></form><br><center><a href='"+returnHtmlPath+"'>Back</a>");
		cWin.write("</body></html>");
		cWin.close();
	} 
	PrintCartTotal();
	return;
}


function ViewCart()
{
	var cWin= parent.frames["shop"].document;
	if (orderRecord.curLength<=0) {
		alert("Your Shopping cart is empty");
		return;
	}
	cWin.open();
	cWin.write("<HTML><HEAD><TITLE> Shopping Cart Viewer</TITLE></HEAD>");
	cWin.write("<BODY BACKGROUND='"+mCartBGImage+"' Text='"+mCartText+"' BGCOLOR='"+mCartBGColor+"' LINK='"+mCartALink+"' VLINK='"+mCartLink+"'  ALINK='"+mCartALink+"' valign=top><form method=post action='"+serverURL+"'>");
	cWin.write(" "+mAlignStr+"<TABLE width=600 border=0 CELLSPACING=0 CELLPADDING=0>");
	cWin.write("<tr><td width=600 bgcolor=#669999 height=24><p align='center'><big><font color=#FFFFFF size=6><strong>"+storeName+"</strong></font></big></td></tr>");
	cWin.write("<tr><td width=600 bgcolor=#ffffff><font color=#333333 size=2><strong>SECURE SERVER PROCESSING: <font color=#FF6600>Our Guarantee.</strong><BLOCKQUOTE><font color=#333333 size=2>"+storeContactAddress+"</font></td></tr>");
	cWin.write("<tr><td width=600 bgcolor=#ffffff><p align='center'><font color=#333333 size=2><i>"+mServerCheckoutMesg+"</i></font></td></tr>");
	cWin.write("<tr><td width=600 bgcolor=#669999><center><Strong><font color=#ffffff>Your current shopping cart <div align=right>[<a href='"+returnHtmlPath+"'><b><font color=#FFFF00>Keep Shopping</font></b></a>]</div></td></tr>");
	cWin.write("<tr><td width=600>");


	
	cWin.write("<TABLE width=600 border=0 CELLSPACING=0 CELLPADDING=0>");
	cWin.write("<tr bgcolor='"+mCartTableHeaderBGColor+"'><td width=10%><b><strong><font size=2 color='"+mCartTableHeaderColor+"'><center>ItemID</center></td><td width=50%><b><strong><font size=2 color='"+mCartTableHeaderColor+"'><center>Products</center></td><td width=10%><b><strong><font size=2 color='"+mCartTableHeaderColor+"'><center>Quantity</td><td width=10%><b><strong><font size=2 color='"+mCartTableHeaderColor+"'><center>Price("+currencyUnit+")</td><td width=10%><b><strong><font size=2 color='"+mCartTableHeaderColor+"'><center>Total Price</td><td width=10%><b><strong><font size=2 color='"+mCartTableHeaderColor+"'><center>Delete</td></tr>");
	var totalPrice=0;
	cWin.write("<input type=hidden name=totalOrder value="+orderRecord.curLength+">");
	for (var i=0;i<orderRecord.curLength; i++) {
		var itemPrice=orderRecord.price[i]*orderRecord.quantity[i];
		totalPrice+=itemPrice;
		cWin.write("<tr bgcolor='"+mCartTableBodyBGColor+"'><td valign=top><font size=2 color='"+mCartTableBodyColor+"'><strong><center>"+orderRecord.itemID[i]+"</strong></td><td><font size=2 color='"+mCartTableBodyColor+"'>"+orderRecord.itemName[i]+"</td> <td><center><font size=2 color='"+mCartTableBodyColor+"'><input text=text size=4 name=qty"+i+" value='"+orderRecord.quantity[i]+"'  onBlur=parent.ModifyQty("+i+")></center></td><td align=right><font size=2 color='"+mCartTableBodyColor+"'>"+Currency(orderRecord.price[i])+"</center></td><td align=right><font size=2 color='"+mCartTableBodyColor+"'><input type=text size=7 name=itemPrice"+i+"  onBlur=parent.ModifyQty("+i+") value='"+Currency(itemPrice)+"'></td><td><font size=2 color='"+mCartTableBodyColor+"'><input type='checkbox' Name=checkbox1 onclick=parent.Delete("+i+")>Delete</td></tr>");
		cWin.write("<input type=hidden name=iname"+i+" value='"+orderRecord.itemName[i]+"'>");
		cWin.write("<input type=hidden name=p"+i+" value='"+orderRecord.price[i]+"'>");
		cWin.write("<input type=hidden name=itemID"+i+" value='"+orderRecord.itemID[i]+"'>");
		cWin.write("<input type=hidden name=itemWeight"+i+" value='"+orderRecord.weight[i]+"'>");
		cWin.write("<input type=hidden name=itemTaxable"+i+" value='"+orderRecord.fTaxable[i]+"'>");
	}
	if (mCurrencyAfter) {
		cWin.write("<tr bgcolor='"+mCartTableHeaderBGColor+"'><td colspan=4 align=right><right><font size=2 color='"+mCartTableHeaderColor+"'><b>Total</td><td align=right><center><font size=2 color='"+mCartTableHeaderColor+"'><b><input type=text size=7 name=totalPrice onBlur=parent.ModifyQty(0) value='"+Currency(totalPrice)+"'>"+currencyUnit+"</td><td></td></tr>");
	} else {
		cWin.write("<tr bgcolor='"+mCartTableHeaderBGColor+"'><td colspan=4 align=right><right><font size=2 color='"+mCartTableHeaderColor+"'><b>Total</td><td align=right><center><font size=2 color='"+mCartTableHeaderColor+"'><b>"+currencyUnit+"<input type=text size=7 name=totalPrice onBlur=parent.ModifyQty(0) value='"+Currency(totalPrice)+"'></td><td></td></tr>");
	}
	
	cWin.write("<table><tr><td width=600 bgcolor=#669999><Strong><font color=#ffffff>1. Please Enter The Following Information:</td></tr></table>");
cWin.write("<table width=600 border=0 CELLSPACING=0 CELLPADDING=0>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Name:</td><td><font size=2 color=#000000><input type=text name=name size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Address:</td><td><font size=2 color=#000000><input type=text name=address size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>&nbsp;</td><td><font size=2 color=#000000><input type=text name=address2 size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>City:</td><td><font size=2 color=#000000><input type=text name=city size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><strong>State /Prov.</td><td><font size=2 color=#000000><input type=text name=stateprov size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Zip/PostCode:</td><td><font size=2 color=#000000><input type=text name=zip size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Country:</td><td><font size=2 color=#000000><input type=text name=country size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Phone:<td><font size=2 color=#000000><input type=text name=phone size=40></td></tr><tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Fax:</td><td><font size=2 color=#000000><input type=text name=fax size=40></td></tr>");
cWin.write("<table><tr><td width=600 bgcolor=#669999><Strong><font color=#ffffff>2. Shipping Address:</td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td colspan=2><font size=2 color=#000000><strong><font size=3 color=FF6600><center>Complete this section only if different from Section 1.</center></font> </td></tr>");
cWin.write("<tr><td width=600 bgcolor=#ffffff><table width=600 border=0 CELLSPACING=0 CELLPADDING=0>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Name:</td><td><font size=2 color=#000000><input type=text name=shipname size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Address:</td><td><font size=2 color=#000000><input type=text name=shipaddress1 size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>&nbsp;</td><td><font size=2 color=#000000><input type=text name=shipaddress2 size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>City:</td><td><font size=2 color=#000000><input type=text name=shipcity size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>State / Prov:</td><td><font size=2 color=#000000><input type=text name=shipState/Prov size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80 ><font size=2 color=#000000><strong>Zip/PostCode:</td><td><font size=2 color=#000000><input type=text name=shipzip size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80 ><font size=2 color=#000000><strong>Country:</td><td><font size=2 color=#000000><input type=text name=shipcountry size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80 ><font size=2 color=#000000><strong>Phone:</td><td><font size=2 color=#000000><input type=text name=shipphone size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80 ><font size=2 color=#000000><strong>Fax:</td><td><font size=2 color=#000000><input type=text name=shipfax size=40></td></tr>");
cWin.write("<tr><td width=600 bgcolor=#669999 colspan=2><Strong><font color=#ffffff>3. Please enter your e-mail address (required).</td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80 ><font size=2 color=#000000><strong>EMail:</td><td><font size=2 color=#000000><input type=text name=email size=40></td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80><font size=2 color=#000000><strong>Payment Method:</td><td><input type=radio name=pmntVisa value=VISA>Visa &nbsp; <input type=radio name=pmntMastercard value=MASTERCARD>Mastercard &nbsp;<input type=radio name=pmntChqMoneyOrder value=Cheque/MoneyOrder>Cheque/Money Order</td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td colspan=2><font size=2 color=#000000><strong><input type='checkbox' name=sendmail checked value=1>Please email me a copy of my order.</td></tr>");
cWin.write("<tr bgcolor=#FFFFCC><td width=80 ><font size=2 color=#000000><strong>Comments:</td><td><font size=2 color=#000000>(or Where did you hear about our site)<br><input type=text name=comments size=50></td></tr></table>");
cWin.write("</table><br><center>[<a href='"+returnHtmlPath+"'>Keep Shopping</a>|<A HREF = \"javascript:parent.RemoveAll()\" onmouseover = \"window.status='Delete All items in your shopping cart.';return true;\">Empty Shopping Cart</a>|<input type=submit value='Submit The Above Order'>]</form>");
cWin.write("<hr size=1 width=50%><font size=-1 color=#444444>If you can not submit your order form via the above button, please <A HREF = \"javascript:parent.ManualSubmit()\" onmouseover = \"window.status='Submit order manually.';return true;\">click here</a>.</font><br><br>");
cWin.write("</td></tr></table></body></html>");
	cWin.close();
}


function  ModifyQty(n)
{
	if (n >= orderRecord.curLength) {
		return;
	}

	var qty = eval("parent.frames['shop'].document.forms[0].qty"+n+".value");
	if (qty<=0) qty=1;
	if (floatQuantity) {
		qty=parseFloat(qty)
		eval("parent.frames['shop'].document.forms[0].qty"+n+".value=parseFloat(qty)");
		orderRecord.quantity[n]=parseFloat(qty);
	} else {
		qty=parseInt(qty)
		eval("parent.frames['shop'].document.forms[0].qty"+n+".value=parseInt(qty)");
		orderRecord.quantity[n]=parseInt(qty);
	}
	var subTotalPrice=qty*orderRecord.price[n];
	eval("parent.frames['shop'].document.forms[0].itemPrice"+n+".value=Currency(subTotalPrice)");
	var totalPrice=0;
	for (var i=0;i<orderRecord.curLength; i++) {
		var itemPrice=orderRecord.price[i]*orderRecord.quantity[i];
		totalPrice+=itemPrice;
	}
	eval("parent.frames['shop'].document.forms[0].totalPrice.value=Currency(totalPrice)");
	PrintCartTotal();
}


function PrintCartTotal()
{
	var totalPrice=0;
	for (var i=0;i<orderRecord.curLength; i++) {
		var itemPrice=orderRecord.price[i]*orderRecord.quantity[i];
		totalPrice+=itemPrice;
	}
	parent.frames['cart'].document.forms[0].CartTotal.value=Currency(totalPrice);
}


function ManualSubmit()
{
	alert("Please use this manual order submission form only when you can not submit your order via the normal submit button.");
	var cWin= parent.frames["shop"].document;
	cWin.open();
	cWin.write("<HTML><HEAD><TITLE> Shopping Cart Viewer</TITLE></HEAD>");
	cWin.write("<BODY Text=#000000 BGCOLOR=#ffffff LINK=#ff0000 VLINK=#aaaa00 alink=#222222 valign=top>");
	cWin.write("<center><font size=+3><strong>"+parent.storeName+"<br>Manual Order Form Submission</strong></font><hr></center><left>");
	cWin.write("Please copy and paste the following order form into your email program and send it to us.  Our email address is <strong><a href='mailto:"+parent.submitEmail+"'>"+parent.submitEmail+"</a></strong><br><a href='"+returnHtmlPath+"'>Keep Shopping</a><hr>");
	var totalPrice=0;
	for (var i=0;i<orderRecord.curLength; i++) {
		var itemPrice=orderRecord.price[i]*orderRecord.quantity[i];
		totalPrice+=itemPrice;
		cWin.write("====================<br>Item number:"+i+"<br>");
		cWin.write("<strong>"+orderRecord.itemName[i]+"</strong><br>");
		cWin.write("Qty:"+orderRecord.quantity[i]+"<br>");
		cWin.write("Unit Price:"+parent.currencyUnit+orderRecord.price[i]+"<br>");
		cWin.write("SubTotal:"+parent.currencyUnit+Currency(itemPrice)+"<br>");
	}
	cWin.write("========================================<br>Total Price "+parent.currencyUnit+Currency(totalPrice)+"<br><br>");
	cWin.write("1. Please enter the shipping address. <br>");
	cWin.write("Name:______________________________<br>");
	cWin.write("Street Address:______________________________<br>");
	cWin.write("City:______________________________<br>");
	cWin.write("State/Province:______________________________<br>");
	cWin.write("Zip/Postal Code:______________________________<br>");
	cWin.write("Country:______________________________<br>");
	cWin.write("Phone:______________________________<br>");
	cWin.write("Shipping method:______________________________<br><br><Br>");
	cWin.write("2. Please enter the billing address. <br>");
	cWin.write("Name:______________________________<br>");
	cWin.write("Street Address:______________________________<br>");
	cWin.write("City:______________________________<br>");
	cWin.write("State/Province:______________________________<br>");
	cWin.write("Zip/Postal Code:______________________________<br>");
	cWin.write("Country:______________________________<br>");
	cWin.write("Phone:______________________________<br><br><Br>");
	cWin.write("</body></html>");
	cWin.close();	
}