function chkProgram(){ 
// Special case to send Store gift certificate queries to the iTunes team
// And payments.html requests to the payments mini-team
        if (document.email.program.value == "us_store"){
                if (document.email.subject1.value == "Using iTunes Gift Certificates"){
                        document.email.program.value = "AS_ITMS_GC";
                }
        }

		  // Extract the html file name
		  var dl = new String(document.location);
		  dl = dl.substring(dl.lastIndexOf('/')+1,dl.length);

		  // Define files to be sent to payment team
		  var paymentFiles = new Array('payments.html', 'cashierscheck.html', 'creditcard.html', 'echeck.html', 'lease.html', 'loan.html', 'wiretransfers.html');

		  // Send to the payments mini-team if applicable
		  for (file in paymentFiles) {
			  if (dl == paymentFiles[file]) {
					document.email.program.value = "us_store_payment";
					break;
			  }
		  }
}
function printForm(){
document.write('   <table width="600" border="0" cellpadding="0" cellspacing="0">');
document.write('	      <tr>');
document.write('			         <td valign="top" class="L11">');
document.write('						            <strong><span class="L14">Still having trouble?</span></strong>');
document.write('										            <br>');
document.write('														            <br>');
document.write('				If you\'re still having trouble using the Apple Store, let us know. We respond to requests in the order they are received, and will contact you within 24 hours. Be sure to include your web order number if you\'re having trouble with a specific purchase. Your answer will be sent to your registered email address ');
email();
document.write('. To switch to another account, you will need to <a href="http://signin.info.apple.com/?logout=now">log out</a>.');
document.write('				<br>');
document.write('				<br>');
document.write('				<a name="form"> </a>');
document.write('					<form name="email" action="http://depot.info.apple.com/request/" method="POST" onsubmit="return validate(this)">');
document.write('					<table border="0" cellpadding="0" cellspacing="0" width="600" valign="TOP">');
document.write('						<tr>');
document.write('							<td width="290" height="40" align="left" valign="top" class="L11">');
document.write('								<b>Name:</b>');
document.write('								<br>');
document.write('<script language="javascript">fullname();</script>');
document.write('							</td>');
document.write('							<td width="20" align="left" valign="top" class="L11">');
document.write('								<img src="http://images.apple.com/support/store/elements/spacer.gif" width="20" height="1">');
document.write('							</td>');
document.write('							<td width="290" align="left" valign="top" class="L11">');
document.write('								<b>Apple ID:</b>');
document.write('								<br>');
document.write('<script language="javascript">email();</script>');
document.write('							</td>');
document.write('						</tr>');
document.write('						<tr>');
document.write('							<td height="50" align="left" valign="top" class="L11">');
document.write('								<b>Specific Request:<span style="color: #F00">*</span></b>');
document.write('								<br>');
document.write('								<select name="category" class="form250">');
document.write('								<option value="" selected>');
document.write('								-- Choose One --');
document.write('								</option>');
for (i=1 ; i < printForm.arguments.length ; i++) {
	document.write("								<option value=\"" + printForm.arguments[i] + "\">");
	document.write("								" + printForm.arguments[i]);
	document.write('								</option>');
}
document.write('								</select>&nbsp;');
document.write('							</td>');
document.write('							<td align="left" valign="top" class="L11">');
document.write('								&nbsp;');
document.write('							</td>');
document.write('							<td width="290" height="50" align="left" valign="top" class="L11">');
document.write('								<b>Web Order Number:</b>');
document.write('								<br>');
document.write('								<input name="subject2" type="TEXT" class="form250" value="" size="20">');
document.write('							</td>');
document.write('						</tr>');
document.write('						<tr>');
document.write('							<td colspan="3" class="L11">');
document.write('								<b>Comments:<span style="color: #F00">*</span></b>');
document.write('								<br>');
document.write('								<textarea name="body" cols="60" rows="6" class="form600"></textarea>');
document.write('							</td>');
document.write('						</tr>');
document.write('						<tr>');
document.write('							<td align="left" class="L11">');
document.write('								<b><span style="color: #F00">*</span></b> Required');
document.write('							</td>');
document.write('							<td align="center" colspan="3">');
document.write('								<div align="right">');
document.write('									<input type="HIDDEN" name="returnurl" value="http://www.apple.com/support/store/education/thankyou.html">');
document.write('									<input type="HIDDEN" name="subject1" value="' + printForm.arguments[0] + '">');
document.write('									<input type="HIDDEN" name="program" value="us_store">');
document.write('									<a href="#" onclick="chkProgram();validate(document.email);"><img src="http://images.apple.com/support/store/elements/sendquestion.gif" width="120" height="28" border="0"></a>');
document.write('								</div>');
document.write('							</td>');
document.write('						</tr>');
document.write('					</table>');
document.write('				</form>');
document.write('			</td>');
document.write('		</tr>');
document.write('	</table>');
}
