function getCustomerForm(){
	var cd="<form id=form1><table><tr><td valign='top'>"+
	"<fieldset style='border:1px solid "+LIGHT_COLOR+";'><legend>Ship To:</legend>"+
	"<table><tr><td>Name:</td>"+
	"<td><input type=text size=24 id=cName class=gBorder></input></td>"+
	"</tr><tr>"+
	"<td>Address:</td><td><input type=text size=24 id=cAddress class=gBorder></input></td>"+
	"</tr><tr>"+
	"<td>City:</td><td><input type=text size=24 id=cCity class=gBorder></input></td>"+
	"</tr><tr>"+
	"<td>State:</td><td>"+getStateSelectorHtml()+" &nbsp; &nbsp; "+
	"Zip Code: <input type=text size=5 id=cZip  class=gBorder></input></td>"+
	"</tr><tr><td colspan=2>&nbsp;</td></tr>"+
	"<tr>"+
	"<td>Phone:</td><td><input type=text size=24 id=cPhone class=gBorder></input></td>"+
	"</tr><tr>"+
	"<td>E-Mail:</td><td><input type=text size=24 id=cEmail class=gBorder></input></td>"+
	"</tr></table></fieldset>"+
	"</td><td width=10></td><td valign=top>"+
	"<fieldset style=border:1px solid "+LIGHT_COLOR+"'><legend>Credit Card:</legend>"+
	"<table><tr>"+
	"<td>Type:</td><td>"+getCCTypeSelectorHtml()+"</td>"+
	"</tr><tr>"+
	"<td>Holder:</td><td><input id=cHolder type=text size=20 class=gBorder></input></td>"+
	"</tr><tr>"+
	"<td>Number:</td><td><input id=cNumber type=text size=20 maxlength=16 class=gBorder />"+
	"</td></tr><tr>"+
	"<td>Expires:</td><td>"+getCCExpMonthSelectorHtml()+" "+getCCExpYearSelectorHtml()+
	" &nbsp;PIN: "+"<input id=cPIN type=text size=1 maxlength=3 class=gBorder />"+
	"</td></tr></table></fieldset>"+
	"<br/><p><input id=chkPop type=checkbox onclick='top.populate()'>"+
	"Use values set in \"My Profile\"</p>"+
	"<p align=center>"+
	"<input type=button value='<< go back' style='cursor:pointer;' "+
	"onclick='top.actionPerformed(\"prev\")'></input> &nbsp; "+
	"<input type=button value=cancel style='cursor:pointer;' "+
	"onclick='top.actionPerformed(\"cancel\")'></input> &nbsp; "+
	"<input type=button value='next >>' style='cursor:pointer;' "+
	"onclick='top.setCustomerInfo()'></input>"+
	"</td></tr></table></form>";
	return cd;
}
function getCustomerHtml(){
	cHtml="<table>"+
	"<tr><td rowspan=3 valign=top>Ship to:</td><td>"+profile.name+"</td></tr>"+
	"<tr><td>"+profile.address+"</td></tr>"+
	"<tr><td>"+profile.city+", "+profile.state+" "+profile.zip+"</td></tr>"+
	"<tr><td>Phone:</td><td>"+profile.phone+"</td></tr>"+
	"<tr><td>Email:</td><td>"+profile.email+"</td></tr>"+
	"<tr><td colspan=2>&nbsp;</td></tr>"+
	"<tr><td>Card Type:</td><td>"+profile.cardType+"</td></tr>"+
	"<tr><td>Name on Card:</td><td>"+profile.cardHolder+"</td></tr>"+
	"<tr><td>Credit Card Number:</td><td>"+profile.cardNumber+"</td></tr>"+
	"<tr><td>Exp Date:</td><td>"+profile.cardExp+"</td></tr>"+
	"<tr><td>PIN</td><td>"+profile.cardPIN+"</td></tr></table>";
	return cHtml;
}
function getIcons(){
	var ih="<table><tr>";
	for(var i=0;i<cart.items.length;i++){
		ih+="<td align=center title='"+cart.items[i].label+"'>"+
		"<img src='"+tPath+cart.items[i].thumbnail+"' "+
		"width=50 height=50 class=gBorder onclick='top.confirmRemove(null,"+i+")'>"+
		"</td>";
	}
	ih+="</tr></table>"+
	"<div align=center style='color:"+DARK_COLOR+"'><small>"+
	"subtotal: $"+ShoppingCart.fix(subtotal)+" &nbsp; &nbsp; "+
	"shipping: $"+ShoppingCart.fix(shipping)+" &nbsp; &nbsp; ";
	if(salesTax!=0)ih+="ca sales tax: $"+ShoppingCart.fix(salesTax)+" &nbsp; &nbsp; ";
	ih+="total: $"+ShoppingCart.fix(grandTotal)+"</small></div>";
	return ih;
}
function getMethodsOfPayment(){
	var mp="<table cellspacing=10 cellpadding=20><tr>"+
	"<td id=e0 width=33% align=center style='border:4px solid #aaa; "+
	"cursor:pointer;color:#aaa;' onclick='top.switchMethods(0,\"purchase\")'>"+
	"<p><b>Order by Phone</b></p>"+
	"<img id=img0 src='"+wPath+"phone_disabled.gif' width=100 height=80 border=0>"+
	"</td>"+
	"<td id=e1 width=33% align=center style='border:4px solid #aaa; "+
	"cursor:pointer;color:#aaa;' onclick='top.switchMethods(1,\"purchase\")'>"+
	"<p><b>Order by Mail</b></p>"+
	"<img id=img1 src='"+wPath+"mail_disabled.gif' width=100 height=80 border=0>"+
	"</td>"+
	"<td id=e2 width=33% align=center style='border:4px solid #aaa; "+
	"cursor:pointer;color:#aaa;' onclick='top.switchMethods(2,\"purchase\")'>"+
	"<p><b>Order Online</b></p>"+
	"<img id=img2 src='"+wPath+"online_disabled.gif' width=100 height=80 border=0>"+
	"</td></tr><tr><td colspan='3'>&nbsp;</td></tr><tr>"+
	"<td colspan=3 align=center>"+getNavButtons(true,true,true)+"</td></tr></table>";
	return mp;
}
function getNavButtons(b1,b2,b3){
	var nb="";
	if(b1){
		nb+="<input type=button value='<< go back' style='cursor:pointer;' "+
		"onclick='top.actionPerformed(\"prev\")'></input> &nbsp; ";
	}
	if(b2){
		nb+="<input type=button value=cancel style='cursor:pointer;' "+
		"onclick='top.actionPerformed(\"cancel\")'></input> &nbsp; ";
	}
	if(b3){
		nb+="<input type=button value='Checkout >>' style='cursor:pointer;' "+
		"onclick='top.actionPerformed(\"checkout\")'></input>";
	}
	return nb;
}
function getOnlineChoice(){
	var oc="<table cellspacing=10 cellpadding=20><tr>"+
	"<td id=e0 width=50% style='border:4px solid #aaa; "+
	"cursor:pointer;color:#aaa;' onclick='top.switchMethods(0,\"online\")'>"+
	"<p align=center><img id=img0 src='"+wPath+"paypal_disabled.gif' border=0></p>"+
	"&bull; Single Payment only<br/>&bull; $10,000.00 order limit</td>"+
	"<td id=e1 width=50% style='border:4px solid #aaa; "+
	"cursor:pointer;color:#aaa;' onclick='top.switchMethods(1,\"online\")'>"+
	"<p align=center><img id=img1 src='"+wPath+"onlineLogo_disabled.gif' border=0></p>"+
	"&bull; Multiple Payment Plans<br/>&bull; $"+ShoppingCart.fix(MAX_ORDER)+" order limit"+
	"</td></tr><tr>"+
	"<td colspan=2 align=center>"+
	"<input type=button value='<< go back' onclick='top.actionPerformed(\"prev\")'></input>"+
	" &nbsp;<input type=button value=cancel onclick='top.actionPerformed(\"cancel\")'></input>"+
	" &nbsp;<input type=button value='next >>' onclick='top.checkOnlineTransfer()'></input>"+
	"</td></tr></table>";
	return oc;
}
function getPaymentPlans(){
	var cols=0;var plans=new Array(3);
	var single=(purchaseMethod==2&&transactionHandler==0)?(grandTotal<10000):(grandTotal<MAX_ORDER);
	var threemonth;var sixmonth;
	pp="<table cellspacing=10 cellpadding=20><tr>";
	if(single){
		pp+="<td id=e0 style='border:4px solid #aaa; "+
		"cursor:pointer;color:gray;' valign=top onclick='top.switchMethods(0,\"plan\")'>"+
		"<p align=center><b>Single Payment</b></p>"+
		"&bull; 1 payment of: $"+ShoppingCart.fix(grandTotal)+"</td>";
		cols++;
		plans[0]=true;
	}
	downpayment1=grandTotal/3;
	threemonth=(purchaseMethod==2&&transactionHandler==0)?
		(downpayment1>250&&downpayment1<10000):
		(downpayment1>250&&grandTotal<MAX_ORDER);
	if(threemonth){
		pp+="<td id=e1 style='border:4px solid #aaa; "+
		"cursor:pointer;color:gray;' valign=top onclick='top.switchMethods(1,\"plan\")'>"+
		"<p align=center><b>Three Month Plan</b></p>"+
		"&bull; 33% Down: $"+ShoppingCart.fix(downpayment1)+"<br />"+
		"&bull; 2 payments of: $"+ShoppingCart.fix(downpayment1)+"<br/></td>";
		cols++;plans[1]=true;
	}
	downpayment2=grandTotal*0.25;var difference=grandTotal-downpayment2;monthly=difference/5;
	sixmonth=(purchaseMethod==2&&transactionHandler==0)?
		(monthly>300&&downpayment2<10000&&monthly<10000):
		(monthly>300);
	if(sixmonth){
		pp+="<td id=e2 style='border:4px solid #aaa; "+
		"cursor:pointer;color:gray;' valign=top onclick='top.switchMethods(2,\"plan\")'>"+
		"<p align=center><b>Six Month Plan</b></p>&bull; 25% Down: $"+ShoppingCart.fix(downpayment2)+"<br />"+
		"&bull; 5 payments of: $"+ShoppingCart.fix(monthly)+"<br/></td>";
		cols++;plans[2]=true;
	}
	if(plans[paymentPlan]==null){
		for(var i=2;i>=0;i--)if(plans[i]!=null)paymentPlan=i;
	}
	pp+="</tr><tr><td colspan='"+cols+"'>&nbsp;</td></tr>"+
	"<tr><td colspan='"+cols+"' align=center>"+getNavButtons(true,true,true)+"</td></tr></table>";
	return pp;
}
function getOrderTotals(){
	var to="<table width=200><tr><td>Subtotal:</td>"+
	"<td align=right>$"+ShoppingCart.fix(subtotal)+"</td></tr>"+
	"<tr><td>Shipping:</td><td align=right>$"+ShoppingCart.fix(shipping)+"</td></tr>";
	if(salesTax!=0){
		to+="<tr><td>Ca Sales Tax:</td>"+
		"<td align=right>$"+ShoppingCart.fix(salesTax)+"</td></tr>";
	}
	to+="<tr><td>Order Total:</td>"+
	"<td align=right><b>$"+ShoppingCart.fix(grandTotal)+"</b></td></tr></table>";
	return to;
}

function getStudioOrder(emailType)
{
	var so = "Jane Darin Studio\n5648 Camber Dr.\nSan Diego, CA  92117\n";
	so += "(858) 514-8154\n\n";
	if(emailType == "customer") so += "janed@san.rr.com\n\n";



	so += "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";
	so += "Ship to:      " + profile.name + "\n";
	so += "              " + profile.address + "\n";
	so += "              " + profile.city + ", " + profile.state + " " + profile.zip + "\n\n";

	so += profile.phoneType + ":       " + profile.phone + "\n";
	so += "Email:        " + profile.email + "\n\n";

	if(emailType == "customer")
	{
		so += "Paid by: " + profile.cardType + " " + profile.cardNumber.substring(12) + "\n\n\n";
	}
	else
	{
		so += "Card Type:    " + profile.cardType + "\n";
		so += "Name on Card: " + profile.cardHolder + "\n";
		so += "Card Number:  " + profile.cardNumber + "\n";
		so += "Card Exp:     " + profile.cardExp + "\n";
		so += "Card PIN:     " + profile.cardPIN + "\n\n\n";
	}

	so += "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";
	so += "          Title                         Edition    Qty    Total\n";
	so += "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";
	for(var i = 0; i < cart.items.length; i++)
	{
		var label = cart.items[i].label;
		if(label.length > 36) label = label.substring(0, 34);
		while(label.length < 40) label += " ";
		so += label;

		label = cart.items[i].edition;
		while(label.length < 12) label += " ";
		so += label;

		label = cart.qtys[i];
		while(label.length < 6) label += " ";
		so += label;

		label = "$" + ShoppingCart.fix(cart.getQtyPrice(i));
		while(label.length < 12) label = (" " + label);
		so += label + "\n";
	}
	var currency = "$" + ShoppingCart.fix(cart.getSubtotal());
	while(currency.length < 12) currency = (" " + currency);
	so += "\n    SubTotal:" + currency + "\n";

	currency = "$" + ShoppingCart.fix(shipping);
	while(currency.length < 12) currency = (" " + currency);
	so += "    Shipping:" + currency + "\n";

	if(profile.state == "CA")
	{
		currency = "$" + ShoppingCart.fix(salesTax);
		while(currency.length < 12) currency = (" " + currency);
		so += "Ca Sales Tax:" + currency + "\n";
	}

	currency = "$" + ShoppingCart.fix(grandTotal);
	while(currency.length < 12) currency = (" " + currency);
	so += " Order Total:" + currency + "\n\n";

	so += "I choose to use your ";
	switch(paymentPlan)
	{
		case 0: so += "Single Payment Plan:\n"
			so += " * You are authorized to make a single charge of $";
			so += ShoppingCart.fix(grandTotal) + " to my credit card.\n";
			break;
		case 1: so += "Three Month Payment Plan:\n";
			so += " * You are authorized to make 3 monthly charges of $";
			so += ShoppingCart.fix(downpayment1) + " to my credit card.\n";
			so += " * Payable on the " + paymentsDue + (paymentsDue == 1 ? "st" : "th");
			so += " of each month.\n";
			break;
		case 2:	so += "Six Month Payment Plan\n";
			so += " * You are authorized to make six monthly charges on my ";
			so += "credit card as follows:\n";
			so += " * 1 Down payment of 25%: $" + ShoppingCart.fix(downpayment2) + "\n";
			so += " * 5 monthly payments of $" + ShoppingCart.fix(monthly) + "\n";
			so += " * Payable on the " + paymentsDue + (paymentsDue == 1 ? "st" : "th");
			so += " of each month.\n";
			break;
	}

	so += "\n\nSincerely,\n\n\t" + profile.name
	return so;
}
function setTotals(){
	shipping=cart.getShipping();
	subtotal=cart.getSubtotal();
	var regExp=/ca/i;
	if(regExp.test(profile.state))salesTax = subtotal * CA_SALES_TAX;
	else salesTax = 0;
	grandTotal=subtotal+shipping+salesTax;
}
