var jIsSubmitting=false

function jsForgotEmail() {
o=document.thisForm.emailforgot
if (o.value=="") { alert("Please enter an email address."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
document.thisForm.submit()
}
function jsLogin(f,t,un,pw) {
o=un
if (o.value=="") { alert("Please enter an email address."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
f.hdnVal1.value=o.value
o=pw
if (o.value=="") { alert("Please enter a Password."); o.focus(); return; }
f.hdnVal2.value=o.value
f.hdnNextOp.value='LOGIN'
f.submit()
}

function jsSideLogin(f,t,un,pw) {
o=un
if (o.value=="") { alert("Please enter an email address."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
f.hdnVal1.value=o.value
o=pw
if (o.value=="") { alert("Please enter a Password."); o.focus(); return; }
f.hdnVal2.value=o.value
f.hdnNextOp.value='LOGIN'
f.submit()
}
function jsLoadSub(v) {
document.thisForm.SubscriptionID.value=v
}
function jsSubmitJoin(t) {
if (jIsSubmitting) { alert("We are in the process of submitting your transaction.  Please wait."); return 0; }
o=document.thisForm.SubscriptionID
if (o.value=="") { 
	alert("Please select a subscription");
	return
	}
o=document.thisForm.Address1
if (o.value=="") { alert("Please enter an address"); o.focus(); return }
o=document.thisForm.City
if (o.value=="") { alert("Please enter a city"); o.focus(); return }
o=document.thisForm.State
if (o.value=="") { alert("Please enter a state"); o.focus(); return }
o=document.thisForm.Postal
if (o.value=="") { alert("Please enter a Postal Code"); o.focus(); return }
o=document.thisForm.Country
if (o.value=="") { alert("Please enter a Country"); o.focus(); return }
o=document.thisForm.isAdmin
if (o.value!="ADMIN") {
	o=document.thisForm.ccType
	if (o.value=="") { alert("Please enter a Credit Card Type"); o.focus(); return }
	o=document.thisForm.ccNumber
	if (o.value=="") { alert("Please enter a Credit Card Number"); o.focus(); return }
	o=document.thisForm.ccMonth
	if (o.value=="") { alert("Please enter a Expiration Month"); o.focus(); return }
	o=document.thisForm.ccYear
	if (o.value=="") { alert("Please enter a Expiration Year"); o.focus(); return }
	}
jIsSubmitting=true
document.thisForm.hdnSaveThis.value="SAVE"
document.thisForm.submit()
}
function jsCheckRenew(t) {
if (jIsSubmitting) { alert("We are in the process of submitting your transaction.  Please wait."); return 0; }
o=document.thisForm.SubscriptionID
if (o.value=="") { 
	alert("Please select a subscription");
	return
	}
o=document.thisForm.Address1
if (o.value=="") { alert("Please enter an address"); o.focus(); return }
o=document.thisForm.City
if (o.value=="") { alert("Please enter a city"); o.focus(); return }
o=document.thisForm.State
if (o.value=="") { alert("Please enter a state"); o.focus(); return }
o=document.thisForm.Postal
if (o.value=="") { alert("Please enter a Postal Code"); o.focus(); return }
o=document.thisForm.Country
if (o.value=="") { alert("Please enter a Country"); o.focus(); return }
o=document.thisForm.isAdmin
if (o.value!="ADMIN") {
	o=document.thisForm.ccType
	if (o.value=="") { alert("Please enter a Credit Card Type"); o.focus(); return }
	o=document.thisForm.ccNumber
	if (o.value=="") { alert("Please enter a Credit Card Number"); o.focus(); return }
	o=document.thisForm.ccMonth
	if (o.value=="") { alert("Please enter a Expiration Month"); o.focus(); return }
	o=document.thisForm.ccYear
	if (o.value=="") { alert("Please enter a Expiration Year"); o.focus(); return }
	}
jIsSubmitting=true
document.thisForm.hdnSaveThis.value="SAVEPAY"
document.thisForm.submit()
}
function jsEmailThisPage() {
document.frmPageInfo.hdnThisTitle.value=document.title;
document.frmPageInfo.hdnThisPage.value=window.location;
document.frmPageInfo.submit();
}
function jsFormLogin(f,t) {
o=f.MainUN
if (o.value=="") { alert("Please enter an valid username."); o.focus(); return; }
o=f.MainPW
if (o.value=="") { alert("Please enter a Password."); o.focus(); return; }
f.hdnNextOp.value='LOGIN'
f.submit()
}
function jsLostPW(f) {
o=f.MainUN
if (o.value=="") { alert("Please enter an valid username and we will send your password to your registered email address."); o.focus(); return; }
f.hdnNextOp.value='FINDPW'
f.submit()
}
function jsRequestInfo(f,t) {
o=f.vInfoEmail
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
if (o.value=="") { alert("Please enter a valid email address."); o.focus(); event.preventDefault; return; }
o=f.vInfoCountry
if (o.value=="") { alert("Please select a valid Country."); o.focus(); return; }
if ((o.value!="Hong Kong") && (o.value!="Ireland")) {
	o=f.vInfoZip
	if (o.value=="") { alert("Please enter a valid Zip/Postal Code."); o.focus(); return; }
}
o=f.vInfoCountry
if (o.value=="") { alert("Please select a valid Country."); o.focus(); return; }
f.hdnNextOp.value='REQUESTINFO'
f.submit()
}
function jsSubmitEmail(f) {
o=f.RecipName
if (o.value=="") { alert("Please enter a Recipient name."); o.focus(); return; }
o=f.RecipEmail
if (o.value=="") { alert("Please enter an email for the recipient."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
o=f.SenderName
if (o.value=="") { alert("Please enter your name."); o.focus(); return; }
o=f.SenderEmail
if (o.value=="") { alert("Please enter your email."); o.focus(); return; }
rv=isEmail(o);
if (rv!="") { alert(mBadEmail + ":" + o.name + ":" + rv); o.focus(); return; }
f.hdnSaveThis.value="SAVE"
f.submit()
}
function jsOpenLocate() {
vHeight=700
vWidth=850
vProps='resizable=yes,location=yes,menubar=yes,menu=yes,scrollbars=yes,height=' + vHeight + ',width=' + vWidth
vThisWin=window.open(jIACPURL + "_loc.asp",'View',vProps)
vThisWin.focus()
}
function jsSubmitSearch(si) {
//document.getElementById("startIndex").value=si
document.forms("searchbox_008873985823673333676:tza5yk10keo").submit()
}
function jsCheckMember() {
document.thisForm.hdnNextOp.value="CHECKMEMBER"
document.thisForm.submit()
}
function jsShowMaintenance() {
alert('Sorry, but we are currently working on this function.  Please check back soon.')
}
function jsDoSort(sf,sd) {
document.thisForm.hdnSortFld.value=sf
document.thisForm.hdnSortDir.value=sd
document.thisForm.hdnNextOp.value="LIST"
document.thisForm.submit()
}
function InsertSampleMovie(path,file,w,h) {
if (file.indexOf('.swf') != -1) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + w + '" height="' + h + '">\n');
	document.write('<param name="movie" value="'  + path + file + '" />\n');
	document.write('<param name="quality" value="high"><param name="menu" value=true"><PARAM NAME="wmode" VALUE="transparent"> />\n');
	document.write('<embed src="'  + path + file + '" quality="high"  wmode="transparent" menu="true" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed>\n');
	document.write('</object>');
	return;
	}
if (file.indexOf('.wmv') != -1) {
	document.write('<EMBED src="' + file + '" width="320" height="240" autoplay="true" CONTROLLER="false" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>');
	return;
	}
var ua = navigator.userAgent.toLowerCase();
  if (ua.indexOf('safari') != - 1) { 
	document.write('<object classid="clsid: 02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" width="' + w + '" height="' + h + '">\n');
	document.write('<param name="src" value="'  + path + file + '" />\n');
	document.write('<param name="controller" value="true" />\n');
	document.write('</object>\n');

  } else 

	if (navigator.plugins && navigator.plugins.length) { // Not IE browser
		document.write(' <object type="video/quicktime" data="'  + path + file + '" width="' + w + '" height="' + h + ' class="mov">\n');
	    	document.write('<param name="controller" value="true" />\n');
		document.write('</object>\n');
	}

	else { // IE / PC browser
		document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="https://www.apple.com/qtactivex/qtplugin.cab" width="' + w + '" height="' + h + '">\n');
		document.write('<param name="src" value="'  + path + file + '" />\n');
		document.write('<param name="menu" value="true" />\n');
		document.write('<param name="controller" value="true" />\n');
 		document.write('</object>\n');
  }
}
function jsJumpToThis(t) {
if (t.value!="") {
	window.location="#" + t.value
	}
}
