function un_check() {
for (var i = 0; i < document.searching.elements.length; i++) {
var e = document.searching.elements[i];
if (e.type == 'checkbox') {
e.checked = false;
}
}
}
function check() {
for (var i = 0; i < document.searching.elements.length; i++) {
var e = document.searching.elements[i];
if (e.type == 'checkbox') {
e.checked = true;
}
}
}
/* Session Time Alert */
/* do not edit below this line.*/
var limit,curhour,curmin,cursec;
var parselimit = 0;
var st = 0;
var pause = 0;
var hours = 0;
var min = 0;
var sec = 1800;
var sec3 = 1800;
var limit3,curhour3,curmin3,cursec3;
var parselimit3 = 0;
var st3 = 0;
var pause3 = 0;
var hours3 = 0;
var min3 = 0;
var pWin2;
var pWin3;
var pCenterToolWin;
/* Countdown for Logout Warnin Popup */
function sessionexpirealert() {
/* Any Tools Been Opened */
if (pCenterToolWin) {
/* Tool Still Open? */
if (!pCenterToolWin.closed) {
/* Renew Countdown for Tool */
sessionexpirealerttool();
}
}
/* prevent multiple settimeouts */
if(st3) { clearTimeout(st3); }
limit3 = hours3 + ":" + min3 + ":" + sec3;
parselimit3=limit3.split(":");
/* take the minutes x 60 add it to the seconds; */
parselimit3 = parselimit3[0]*3600 + parselimit3[1]*60 + parselimit3[2]*1;
/* exit if timer wasn't set. */
if(parselimit3 <= 0) {
return;
}
st3 = setTimeout("begintimer()",1000);
}
function begintimer() {
var element3 = document.getElementById('Tool');
/* Open Popup for Main Page Only (do not open for Tool) */
if ((parselimit3 == 67) && (!( element3 ))) {
/* Open Popup */
parselimit3 = parselimit3-1;
var iWidth = 310;
var iHeight = 295;
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
var randomnumber = Math.floor(Math.random()*11);
pWin3 = window.open("cpTimeOut_Popup.php",randomnumber,"height=2,width=2,status=0,menubar=0,location=0,resizable=0,titlebar=0,scrollbars=0,top=0,left=0");
pWin3.focus();
pWin3.resizeTo (iWidth, iHeight);
pWin3.moveTo (xPos, yPos);
}
else if (parselimit3 == 1) {
/* Logout */
parselimit3 = parselimit3-1;
pWin3.close();
if ( element3 ) {
var Tool = document.getElementById('Tool').value;
if ((Tool == 'VT') || (Tool == 'SS') || (Tool == 'ADS')) {
window.location = 'Page_Tool_Login.php';
}
else {
window.location = 'include/content/pages/page_processing/Process_Logout.inc.php';
}
}
else {
window.location = 'include/content/pages/page_processing/Process_Logout.inc.php';
/* If Tool Open, Logout The Tool Too */
if (pCenterToolWin) {
if (!pCenterToolWin.closed) {
pCenterToolWin.location = 'Page_Tool_Login.php';
}
}
}
}
else {
/* Count Down */
parselimit3-=1;
curhour3 = Math.floor(parselimit3/3600);
/* greater than an hour divide by 60 but subtract the hours. */
if(parselimit3 > 3600) {
/* first convert hours back into seconds */
curmin3 = curhour3 * 3600;
/* subtract that from total to get minutes left. */
curmin3 = parselimit3 - curmin3;
curmin3 = Math.floor(curmin3/60);
/* jAlert(curmin3); */
}
else {
curmin3 = Math.floor(parselimit3/60);
}
cursec3 = parselimit3 % 60;
}
st3 = setTimeout("begintimer(pWin3)",1000);
}
/* END */
/* Called by clickin CLOSE Button in Session Timeout PopUp */
function renewsessioncountdown(){
/* If Primary Window Opened Warning, Renew Primary Counter */
if (pWin3) {
sessionexpirealert();
}
/* Renew Tools Counter */
else {
sessionexpirealerttool();
}
}
function nontoolpopuprenewsessioncountdown(){
window.opener.sessionexpirealert();
}
function sessionexpirealerttool() {
/* prevent multiple settimeouts */
if(st) {
clearTimeout(st);
}
limit = hours + ":" + min + ":" + sec;
parselimit=limit.split(":");
/* take the minutes x 60 add it to the seconds; */
parselimit = parselimit[0]*3600 + parselimit[1]*60 + parselimit[2]*1;
/* exit if timer wasn't set. */
if(parselimit <= 0) {
return;
}
st = setTimeout("begintimertool()",1000);
}
function begintimertool() {
var element = document.getElementById('Tool');
if ((parselimit==67) && ( element ) && (!window.opener)) {
/* Open Popup */
parselimit=parselimit-1;
var iWidth = 310;
var iHeight = 295;
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
var randomnumber = Math.floor(Math.random()*11);
pWin2 = window.open("cpTimeOut_Popup.php",randomnumber,"height=2,width=2,status=0,menubar=0,location=0,resizable=0,titlebar=0,scrollbars=0,top=0,left=0");
pWin2.focus();
pWin2.resizeTo (iWidth, iHeight);
pWin2.moveTo (xPos, yPos);
}
else if (parselimit == 1) {
/* Logout */
parselimit = parselimit-1;
/* If Not a Popup */
/* If Is a Popup, Popup's Logout is Handled by begintimer() */
if (!window.opener) {
pWin2.close();
if ( element ) {
var Tool = document.getElementById('Tool').value;
if ((Tool == 'VT') || (Tool == 'SS') || (Tool == 'ADS')) {
window.location = 'Page_Tool_Login.php';
}
else {
window.location = 'include/content/pages/page_processing/Process_Logout.inc.php';
}
}
else {
window.location = 'include/content/pages/page_processing/Process_Logout.inc.php';
}
}
}
else {
/* Count Down */
parselimit-=1;
curhour = Math.floor(parselimit/3600);
/* greater than an hour divide by 60 but subtract the hours. */
if(parselimit > 3600) {
/* first convert hours back into seconds */
curmin = curhour * 3600;
/* subtract that from total to get minutes left. */
curmin = parselimit - curmin;
curmin = Math.floor(curmin/60);
/* jAlert(curmin); */
}
else {
curmin = Math.floor(parselimit/60);
}
cursec = parselimit%60;
}
st=setTimeout("begintimertool()",1000);
}
/* END */
function disableNumber(form) {
if (form.IndefiniteOn.checked) {
form.Number.disabled=true;
form.Number.value="";
}
else {
form.Number.disabled=false;
}
}
function billingtype2() {
if ((document.f.BankAcctType.value == 'PC') || (document.f.BankAcctType.value == 'PS')) {
document.getElementById('B1').style.display = 'none';
}
else {
document.getElementById('B1').style.display = '';
}
}
function ledgers() {
if (document.getElementById('softwareid').value !== '') {
document.getElementById('LS1').style.display = '';
if (document.getElementById('ledgersync').value == 'Multiple') {
document.getElementById('LS2').style.display = '';
document.getElementById('LS3').style.display = '';
}
else {
document.getElementById('LS2').style.display = 'none';
document.getElementById('LS3').style.display = 'none';
document.getElementById('ledgercount').value = 1;
document.getElementById('ledgerdefault').value = 1;
}
}
else {
if (document.getElementById('ledgercount').value > 1) {
document.getElementById('ledgersync').value = 'Multiple';
document.getElementById('LS1').style.display = '';
document.getElementById('LS2').style.display = '';
document.getElementById('LS3').style.display = '';
}
else {
document.getElementById('LS1').style.display = 'none';
document.getElementById('LS2').style.display = 'none';
document.getElementById('LS3').style.display = 'none';
document.getElementById('ledgersync').value = 'Single';
document.getElementById('ledgercount').value = 1;
document.getElementById('ledgerdefault').value = 1;
}
}
}
function billingtype() {
if ((document.f.BankAcctType.value == 'PC') || (document.f.BankAcctType.value == 'PS') || (document.f.BankAcctType.value == 'DDA') || (document.f.BankAcctType.value == 'SAV')) {
document.getElementById('B1').style.display = '';
document.getElementById('B2').style.display = '';
document.getElementById('B4').style.display = '';
document.getElementById('B5').style.display = '';
document.getElementById('B6').style.display = '';
document.getElementById('B3').style.display = 'none';
}
else if ((document.f.BankAcctType.value == 'BC') || (document.f.BankAcctType.value == 'BS')) {
document.getElementById('B1').style.display = '';
document.getElementById('B2').style.display = '';
document.getElementById('B3').style.display = '';
document.getElementById('B4').style.display = '';
document.getElementById('B5').style.display = '';
document.getElementById('B6').style.display = '';
}
else if (document.f.BankAcctType.value == 'D') {
jConfirm('Are you sure you want to permanantly delete this Bank Account from the client record? If yes, click OK then save the change by clicking the [Save] button.\n\nAlthough this action will remove the Bank Account from being being assinged to any future payments, it will NOT delete it from any CURRENTLY scheduled Auto-Debits.', 'Delete Bank Account', function(agree) {
if (agree) {
document.getElementById('B1').style.display = 'none';
document.getElementById('B2').style.display = 'none';
document.getElementById('B4').style.display = 'none';
document.getElementById('B5').style.display = 'none';
document.getElementById('B6').style.display = 'none';
document.f.Billing_First_Name.value = '';
document.f.Billing_Last_Name.value = '';
document.f.Bank_Name.value = '';
document.f.Bank_Rout_Number.value = '';
document.f.Bank_Acct_Number.value = '';
return true;
}
else {
document.f.reset();
return false;
}
});
}
else if (document.f.BankAcctType.value == '') {
document.getElementById('B1').style.display = 'none';
document.getElementById('B2').style.display = 'none';
document.getElementById('B4').style.display = 'none';
document.getElementById('B5').style.display = 'none';
document.getElementById('B6').style.display = 'none';
document.getElementById('B3').style.display = 'none';
document.f.Billing_First_Name.value = '';
document.f.Billing_Last_Name.value = '';
document.f.Bank_Name.value = '';
document.f.Bank_Rout_Number.value = '';
document.f.Bank_Acct_Number.value = '';
}
}
function find(val,idx) {
var sel=document.getElementById('BankAcctType');
if (sel.options[idx].parentNode.label == 'Personal') {
document.getElementById('B1').style.display = '';
document.getElementById('B2').style.display = '';
document.getElementById('B3').style.display = 'none';
document.getElementById('B4').style.display = '';
document.getElementById('B5').style.display = '';
document.getElementById('B6').style.display = '';
document.Form1.Billing_Company.value = '';
}
else if (sel.options[idx].parentNode.label == 'Business') {
document.getElementById('B1').style.display = 'none';
document.getElementById('B2').style.display = 'none';
document.getElementById('B3').style.display = '';
document.getElementById('B4').style.display = '';
document.getElementById('B5').style.display = '';
document.getElementById('B6').style.display = '';
document.f.Billing_First_Name.value = '';
document.f.Billing_Last_Name.value = '';
}
else {
document.getElementById('B1').style.display = 'none';
document.getElementById('B2').style.display = 'none';
document.getElementById('B3').style.display = 'none';
document.getElementById('B4').style.display = 'none';
document.getElementById('B5').style.display = 'none';
document.getElementById('B6').style.display = 'none';
document.f.Billing_First_Name.value = '';
document.f.Billing_Last_Name.value = '';
document.f.Billing_Company.value = '';
document.f.Bank_Name.value = '';
document.f.Bank_Rout_Number.value = '';
document.f.Bank_Acct_Number.value = '';
}
}
function idtype() {
if ((document.f.Billing_ID_Type.value == 'DL') || (document.f.Billing_ID_Type.value == 'MI') || (document.f.Billing_ID_Type.value == 'GN') || (document.f.Billing_ID_Type.value == 'SS')) {
document.getElementById('ID1').style.display = '';
document.getElementById('ID2').style.display = '';
}
else {
if (document.f.Billing_ID_Type.value == 'D') {
jConfirm('Are you sure you want to permanantly delete this Identification from the client record? If yes, click OK then save the change by clicking the [Save] button.\n\nAlthough this action will remove the Identification from being being assinged to any future payments, it will NOT delete it from any CURRENTLY scheduled Auto-Debits.', 'Delete Identification', function(agree) {
if (agree) {
document.getElementById('ID1').style.display = 'none';
document.getElementById('ID2').style.display = 'none';
document.f.Billing_ID_Type.value = '';
document.f.Billing_ID_Number.value = '';
document.f.Billing_ID_State.value = '';
return true;
}
else {
document.f.reset();
return false;
}
});
}
else {
document.getElementById('ID1').style.display = 'none';
document.getElementById('ID2').style.display = 'none';
document.f.Billing_ID_Number.value = '';
document.f.Billing_ID_State.value = '';
}
}
}
function cardtype() {
if ((document.f.Credit_Card_Type.value !== '') && (document.f.Credit_Card_Type.value !== 'D')) {
document.getElementById('CC1').style.display = '';
document.getElementById('CC2').style.display = '';
document.getElementById('CC3').style.display = '';
document.getElementById('CC4').style.display = '';
}
else {
if (document.f.Credit_Card_Type.value == 'D') {
jConfirm('Are you sure you want to permanantly delete this Credit Card from the client record? If yes, click OK then Save the change by clicking the [Save] button.\n\nAlthough this action will remove the Credit Card from being being assinged to any future payments, it will NOT delete it from any CURRENTLY scheduled Auto-Debits.', 'Delete Credit Card', function(agree) {
if (agree) {
document.getElementById('CC1').style.display = 'none';
document.getElementById('CC2').style.display = 'none';
document.getElementById('CC3').style.display = 'none';
document.getElementById('CC4').style.display = 'none';
document.f.Billing_Name.value = '';
document.f.Credit_Card_Type.value = '';
document.f.Credit_Card_Number.value = '';
document.f.Credit_Card_Exp_Month.value = '';
document.f.Credit_Card_Exp_Year.value = '';
return true;
}
else {
document.f.reset();
return false;
}
});
}
else {
document.getElementById('CC1').style.display = 'none';
document.getElementById('CC2').style.display = 'none';
document.getElementById('CC3').style.display = 'none';
document.getElementById('CC4').style.display = 'none';
document.f.Billing_Name.value = '';
document.f.Credit_Card_Number.value = '';
document.f.Credit_Card_Exp_Month.value = '';
document.f.Credit_Card_Exp_Year.value = '';
}
}
}
function disableswipe() {
if ((document.f.Downpayment.value == 'Manually') && (document.f.optionID[2].checked == true)) {
document.f.Debit_Type[2].disabled = true;
}
else {
document.f.Debit_Type[2].disabled = false;
}
}
function displaySaveBilling1() {
if(document.f.Debit_Type[0].checked == true) {
document.f.BAssign.checked = false;
document.getElementById('BAssign1').style.display = '';
document.f.MerchantType.value = 'Internet';
}
if(document.f.Debit_Type[2].checked == true) {
document.getElementById('BAssign1').style.display = '';
document.f.MerchantType.value = 'Internet';
}
else if(document.f.Debit_Type[2].checked == false) {
document.getElementById('BAssign1').style.display = 'none';
}
if(document.f.Debit_Type[1].checked == true) {
document.getElementById('BAssign3').style.display = '';
document.f.BAssign.checked = false;
if (document.f.MerchantType.value == 'Retail') {
jAlert('ALERT: Retail Merchant Account Selected.\n\nBy default, the Internet Merchant Account is typically used to process Credit-Keyed. However, you have the option to process with your Retail Merchant Account without having to enter a billing address or phone. Please Note: The processing fees may be slightly higher when using the retail merchant account to process credit-keyed.');
}
}
else if(document.f.Debit_Type[1].checked == false) {
document.getElementById('BAssign3').style.display = 'none';
}
}
function displaySaveBilling2() {
if(document.f.Debit_Type[0].checked == true) {
document.f.MerchantType.value = 'Internet';
}
if (document.f.Debit_Type[1].checked == true) {
document.getElementById('BAssign1').style.display = '';
if (document.f.MerchantType.value == 'Retail') {
jAlert('ALERT: Retail Merchant Account Selected.\n\nBy default, the Internet Merchant Account is typically used to process Credit-Keyed. However, you have the option to process with your Retail Merchant Account without having to enter a billing address or phone. Please Note: The processing fees may be slightly higher when using the retail merchant account to process credit-keyed.');
}
}
else if (document.f.Debit_Type[2].checked == true) {
document.getElementById('BAssign1').style.display = '';
if (document.f.MerchantType.value == 'Retail') {
jAlert('ALERT: Retail Merchant Account Selected for Auto-Debits.\n\nSwiping the card is faster, however the Internet Merchant Account (default) should still be used to process the auto-debits. You have the option to schedule the auto-debits to process with your retail merchant account without having to enter a billing address. However, the processing fees may be slightly higher when using the retail merchant account to process auto-debits.');
}
}
else if((document.f.Debit_Type[1].checked == false) && (document.f.Debit_Type[2].checked == false)) {
document.getElementById('BAssign1').style.display = 'none';
}
}
function displaySaveBilling3() {
if(document.f.Debit_Type[0].checked == true) {
document.getElementById('BAssign1').style.display = 'none';
document.getElementById('BAssign2').style.display = 'none';
document.getElementById('BAssign3').style.display = 'none';
document.getElementById('BAssign4').style.display = 'none';
document.getElementById('BAssign5').style.display = 'none';
}
if(document.f.Debit_Type[2].checked == true) {
document.getElementById('BAssign1').style.display = '';
document.getElementById('BAssign4').style.display = '';
}
else if(document.f.Debit_Type[2].checked == false) {
document.getElementById('BAssign1').style.display = 'none';
document.getElementById('BAssign4').style.display = 'none';
}
if(document.f.Debit_Type[1].checked == true) {
document.getElementById('BAssign2').style.display = '';
document.getElementById('BAssign3').style.display = '';
if (document.f.MerchantType.value == 'Retail') {
document.getElementById('BAssign1').style.display = 'none';
document.getElementById('BAssign5').style.display = '';
jAlert('ALERT: Retail Merchant Account Selected.\n\nInternet Merchant Account (default) should be used to process Credit-Keyed, although you have the option to process with your retail merchant account without entering a billing address. Please Note: The processing fees are slightly higher when using the retail merchant account to process auto-debits.');
}
else {
document.getElementById('BAssign1').style.display = 'none';
document.getElementById('BAssign5').style.display = 'none';
}
}
else if(document.f.Debit_Type[1].checked == false) {
document.getElementById('BAssign2').style.display = 'none';
document.getElementById('BAssign3').style.display = 'none';
}
}
function ltrim(str, chars) {
chars = chars || "\\s";
return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
function rtrim(str, chars) {
chars = chars || "\\s";
return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
function trim(str, chars) {
return ltrim(rtrim(str, chars), chars);
}
/* Status Bar Message */
function MM_displayStatusMsg(msgStr) {
status=msgStr;
document.MM_returnValue = true;
}
/* Credit Card Validation */
function mod10( requiredCredit_Card_Number ) { // LUHN Formula for validation of credit card numbers.
var ar = new Array( requiredCredit_Card_Number.length );
var i = 0,sum = 0;
for( i = 0; i < requiredCredit_Card_Number.length; ++i ) {
ar[i] = parseInt(requiredCredit_Card_Number.charAt(i),10);
}
for( i = ar.length -2; i >= 0; i-=2 ) { // you have to start from the right, and work back.
ar[i] *= 2; // every second digit starting with the right most (check digit)
if( ar[i] > 9 ) {ar[i]-=9;} // will be doubled, and summed with the skipped digits.
} // if the double digit is > 9, ADD those individual digits together
for( i = 0; i < ar.length; ++i ) {
sum += ar[i]; // if the sum is divisible by 10 mod10 succeeds
}
return (((sum%10)==0)?true:false);
}
function expired( month, year ) {
var now = new Date(); // this function is designed to be Y2K compliant.
month = month.substr(0,2);
var expiresIn = new Date(year,month,0,0,0); // create an expired on date object with valid thru expiration date
expiresIn.setMonth(expiresIn.getMonth()+1); // adjust the month, to first day, hour, minute & second of expired month
if( now.getTime() < expiresIn.getTime() ) {return false;}
return true; // then we get the miliseconds, and do a long integer comparison
}
function validateCard(requiredCredit_Card_Number,Credit_Card_Type,Credit_Card_Exp_Month,Credit_Card_Exp_Year) {
var prefix;
if( requiredCredit_Card_Number.length == 0 ) { //most of these checks are self explanitory
jAlert('Please Enter a Valid Card Number.');
return false;
}
for( var i = 0; i < requiredCredit_Card_Number.length; ++i )
{ // make sure the number is all digits.. (by design)
var c = requiredCredit_Card_Number.charAt(i);
if( c < '0' || c > '9' ) {
jAlert('Please Enter a Valid Card Number. Use Only Digits. Do Not Use Spaces or Hyphens.');
return false;
}
}
var length = requiredCredit_Card_Number.length; //perform card specific length and prefix tests
switch( Credit_Card_Type ) {
case 'Amex':
if( length !== 15 ) {
jAlert('Please Enter a Valid American Express Card Number.');
return false;
}
prefix = parseInt( requiredCredit_Card_Number.substring(0,2),10 );
if( prefix !== 34 && prefix !== 37 ) {
jAlert('Please Enter a Valid American Express Card Number.');
return false;
}
break;
case 'AM':
if( length !== 15 ) {
jAlert('Please Enter a Valid American Express Card Number.');
return false;
}
prefix = parseInt( requiredCredit_Card_Number.substring(0,2),10 );
if( prefix !== 34 && prefix !== 37 ) {
jAlert('Please Enter a Valid American Express Card Number.');
return false;
}
break;
case 'Discover':
if( length !== 16 ) {
jAlert('Please Enter a Valid Discover Card Number.');
return false;
}
prefix = parseInt( requiredCredit_Card_Number.substring(0,4),10 );
if( prefix !== 6011 ) {
jAlert('Please Enter a Valid Discover Card Number.');
return false;
}
break;
case 'DI':
if( length !== 16 ) {
jAlert('Please Enter a Valid Discover Card Number.');
return false;
}
prefix = parseInt( requiredCredit_Card_Number.substring(0,4),10 );
if( prefix !== 6011 ) {
jAlert('Please Enter a Valid Discover Card Number.');
return false;
}
break;
case 'Mastercard':
if( length !== 16 ) {
jAlert('Please Enter a Valid MasterCard Number.');
return false;
}
prefix = parseInt( requiredCredit_Card_Number.substring(0,2),10 );
if( prefix < 51 || prefix > 55) {
jAlert('Please Enter a Valid MasterCard Number.');
return false;
}
break;
case 'MC':
if( length !== 16 ) {
jAlert('Please Enter a Valid MasterCard Number.');
return false;
}
prefix = parseInt( requiredCredit_Card_Number.substring(0,2),10 );
if( prefix < 51 || prefix > 55) {
jAlert('Please Enter a Valid MasterCard Number.');
return false;
}
break;
case 'Visa':
if( length !== 16 && length !== 13 ) {
jAlert('Please Enter a Valid Visa Number.');
return false;
}
prefix = parseInt( requiredCredit_Card_Number.substring(0,1),10 );
if( prefix !== 4 ) {
jAlert('Please Enter a Valid Visa Number.');
return false;
}
break;
case 'VI':
if( length !== 16 && length !== 13 ) {
jAlert('Please Enter a Valid Visa Number.');
return false;
}
prefix = parseInt( requiredCredit_Card_Number.substring(0,1),10 );
if( prefix !== 4 ) {
jAlert('Please Enter a Valid Visa Number.');
return false;
}
break;
}
if( !mod10( requiredCredit_Card_Number )) {
jAlert('Sorry! This is Not a Valid Credit Card Number.');
return false;
}
if( expired( Credit_Card_Exp_Month, Credit_Card_Exp_Year )) {
jAlert('Sorry! The Expiration Date You Have Entered Would Make This Card Invalid.');
return false;
}
return true; // at this point card has not been proven to be invalid
}
/* Routing Number */
function ABAMod10(Bank_Rout_Number) { //v2.0
var valid = "0123456789";
var len = Bank_Rout_Number.length;
var bNum = true;
var iABA = parseInt(Bank_Rout_Number,10);
var sABA = Bank_Rout_Number.toString();
var url = "abaDisplay2.asp?Bank_Rout_Number=" + sABA;
var iTotal = 0;
var bResult = false;
var temp;
//jAlert(Bank_Rout_Number);
for (var j=0; j maxNum) {
}
else {
if (boxValue > minNum) {
document.all.thebox1.size = boxValue;
}
else if (boxValue < minNum || boxValue !== minNum) {
document.all.thebox1.size = minNum;
}
}
}
// End of script //
function boxexpand2() {
// Code to make the script easier to use //
var boxValue=document.all.thebox2.value.length;
var boxSize=document.all.thebox2.size;
var minNum=20; // Set this to the MINIMUM size you want your box to be.
var maxNum=100; // Set this to the MAXIMUM size you want your box to be.
// Starts the main portion of the script //
if (boxValue > maxNum) {
}
else {
if (boxValue > minNum) {
document.all.thebox2.size = boxValue;
}
else if (boxValue < minNum || boxValue !== minNum) {
document.all.thebox2.size = minNum;
}
}
}
// End of script //
/*//Begin Eroor Blocking */
function blockError() {
return true;
}
window.onerror = blockError;
/* Check is Caps Lock Key is on */
function checkCapsLock(e) {
var myKeyCode=0;
var myShiftKey=false;
var myMsg='Caps Lock is On.\n\nTo prevent entering your password incorrectly,\nyou should press Caps Lock to turn it off.';
// Internet Explorer 4+
if ( document.all ) {
myKeyCode=e.keyCode;
myShiftKey=e.shiftKey;
// Netscape 4
}
else if ( document.layers ) {
myKeyCode=e.which;
myShiftKey=( myKeyCode == 16 ) ? true : false;
// Netscape 6
}
else if ( document.getElementById ) {
myKeyCode=e.which;
myShiftKey=( myKeyCode == 16 ) ? true : false;
}
// Upper case letters are seen without depressing the Shift key, therefore Caps Lock is on
if (( myKeyCode >= 65 && myKeyCode <= 90 )&& !myShiftKey ) {
jAlert( myMsg );
// Lower case letters are seen while depressing the Shift key, therefore Caps Lock is on
}
else if (( myKeyCode >= 97 && myKeyCode <= 122 ) && myShiftKey ) {
jAlert( myMsg );
}
}
/* END */
/* Confirms the Terms of Use box is checked */
function checkCheckBox(f) {
if (f.agree.checked == false) {
jAlert('Check the Accept Terms of Use Box to Continue.');
return false;
}
else {
return true;
}
}
/* Close Acct Alert */
function expirealert() {
jConfirm('Are You Sure You Want to Close Your Account?', 'Account Closure', function(agree) {
if (agree) {
document.f.submit();
return true;
}
else {
window.location="?Page=My_Account";
}
});
}
/* Validate field for alpha-numeric */
function validate(field) {
var valid = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
var ok = "yes";
var temp;
for (var i=0; i max) && (max > 0)) {
jAlert('Warning: Value is greater than the allowed maximum of ' + max + '%.');
if (enf == 1) {
field.value = value;
}
}
}
/* Validate number of months filled in and not left blank */
function validatemonth(field) {
var valid = "0123456789";
var ok = "yes";
var temp;
for (var i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
return true;
}
}
/* End */
/* Makes a field Required with progress bar on submit*/
function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
document.f.submit();
return true;
}
}
/* End */
/* verfiy emails on join now page */
function ValidEmailSubmit() {
var goodEmail = window.document.f.requiredEmail.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.com)|(\..{2,2}))$)\b/gi);
if ((goodEmail) || (goodEmail == '%ClientEmail%') || (goodEmail == '%Email%')) {
selfsubmit();
}
else {
jAlert('Please Enter a Valid Email Address.');
field.focus();
field.select();
return false;
}
}
/* End */
/* verfiy emails on join now page */
function verifyEmails() {
var goodEmail = window.document.f.requiredEmail.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.biz)|(\..{2,2}))$)\b/gi);
var main_email=window.document.f.requiredEmail.value;
var second_email=window.document.f.email2.value;
if (main_email!=second_email) {
jAlert('Email Error !!!\n\nYou Entered Two Different Email Addresses. Please Re-enter Your Email Address.');
window.document.f.requiredEmail.style.backgroundColor='#C4C4D7';
window.document.f.email2.style.backgroundColor='#C4C4D7';
window.document.f.requiredEmail.focus();
window.document.f.submit1.disabled=true;
return false;
}
else if (goodEmail) {
good = true;
window.document.f.requiredEmail.style.backgroundColor='#fdfdfd';
window.document.f.email2.style.backgroundColor='#fdfdfd';
window.document.f.submit1.disabled=false;
return true;
}
else {
jAlert('Please Enter a Valid Email Address.');
field.focus();
field.select();
good = false;
window.document.f.submit1.disabled=true;
return false;
}
}
/* End */
/* verfiy emails on gateway page */
function verifyEmails2() {
var goodEmail = window.document.f.requiredEmail.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.com)|(\..{2,2}))$)\b/gi);
var main_email=window.document.f.requiredEmail.value;
var second_email=window.document.f.email2.value;
if (main_email!=second_email) {
jAlert('Email Error !!!\n\nYou Entered Two Different Email Addresses. Please Re-enter Your Email Address.');
window.document.f.requiredEmail.style.backgroundColor='#C4C4D7';
window.document.f.email2.style.backgroundColor='#C4C4D7';
window.document.f.requiredEmail.focus();
return false;
}
else if (goodEmail) {
good = true;
window.document.f.requiredEmail.style.backgroundColor='#dfddff';
window.document.f.email2.style.backgroundColor='#dfddff';
return true;
}
else {
jAlert('Please Enter a Valid Email Address.');
field.focus();
field.select();
good = false;
return false;
}
}
/* End */
/* open pop up for join now page */
function showPop(sLoc) {
var xPos =(screen.width/2)-(450/2);
var yPos =(screen.height/2)-(450/2);
var pWin = null; //open pop wait screen
pWin = window.open(sLoc,"pWin", "height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pWin.resizeTo(450, 450);
pWin.moveTo(xPos, yPos);
}
/* End */
/* open pop up for join now page */
function showPoplarge(sLoc) {
var xPos = (screen.width/2)-(662/2);
var yPos = (screen.height/2)-(688/2);
var pWin = null; //open pop wait screen
pWin = window.open(sLoc,"pWin", "height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=0,top=0,left=0");
pWin.resizeTo(662, 688);
pWin.moveTo(xPos, yPos);
}
/* End */
/* Enable Option 2 Defualt Setting */
function enablePlan2Bonus() {
if (document.getElementById('Plan2Bonus_On').value == 0) {
document.getElementById('Option2Bonus1a').disabled=true;
document.getElementById('Option2Bonus2a').disabled=true;
document.getElementById('Option2Bonus3a').disabled=true;
document.getElementById('Option2Bonus4a').disabled=true;
document.getElementById('Option2Bonus5a').disabled=true;
}
if (document.getElementById('Plan2Bonus_On').value == 1) {
document.getElementById('Option2Bonus1a').disabled=false;
document.getElementById('Option2Bonus2a').disabled=false;
document.getElementById('Option2Bonus3a').disabled=false;
document.getElementById('Option2Bonus4a').disabled=false;
document.getElementById('Option2Bonus5a').disabled=false;
}
}
/* End */
/* Target Collection Calc */
function calcfee() {
var ExpectedOverhead = Math.round(document.TCLCalc.DesiredPercentOverhead.value * 0.01 * (document.TCLCalc.AnnualCollections.value / 12));
var CurrentOverhead = (Math.round(document.TCLCalc.ActualOverhead.value / (document.TCLCalc.AnnualCollections.value / 12) * 10000) / 100);
var CostPerVisit = (Math.round((document.TCLCalc.ActualOverhead.value / 4.3 / document.TCLCalc.CMTPerWeek.value) * 100) / 100);
var NetIncome = Math.round(document.TCLCalc.AnnualCollections.value - (document.TCLCalc.ActualOverhead.value * 12));
var TargetCollectionLevel = (Math.round((CostPerVisit / document.TCLCalc.DesiredPercentOverhead.value * 100) * 100) / 100);
document.TCLCalc.answerExpectedOverhead.value = formatNumber(ExpectedOverhead);
document.TCLCalc.answerCurrentOverhead.value = formatNumber(CurrentOverhead);
document.TCLCalc.answerCostPerVisit.value = formatNumber(CostPerVisit);
document.TCLCalc.answerNetIncome.value = formatNumber(NetIncome);
document.TCLCalc.answerTargetCollectionLevel.value = formatNumber(TargetCollectionLevel);
if (TargetCollectionLevel > 0) {
document.getElementById('results').style.display = '';
}
else
{
jAlert('Enter values into the Target Collection Calculator™');
}
}
function cleartcl() {
document.getElementById('results').style.display = 'none';
}
/* End */
/* Enable Option */
function enableOption2() {
if (document.TheForm.plantype.value == 0) {
document.TheForm.option2on.disabled=false;
document.TheForm.option2on.checked=true;
}
if (document.TheForm.plantype.value == 1) {
document.TheForm.option2on.disabled=true;
document.TheForm.option2on.checked=false;
}
}
/* End */
/* Account Priveliges Functions */
function enableCPC() {
if (document.getElementById('CPC0').checked == false) {
document.getElementById('CPC1').disabled=true;
document.getElementById('CPC2').disabled=true;
document.getElementById('CPC3').disabled=true;
document.getElementById('CPC4').disabled=true;
document.getElementById('CPC5').disabled=true;
document.getElementById('CPC6').disabled=true;
document.getElementById('CPC7').disabled=true;
document.getElementById('CPC8').disabled=true;
}
else if (document.getElementById('CPC0').checked == true) {
document.getElementById('CPC1').disabled=false;
document.getElementById('CPC2').disabled=false;
document.getElementById('CPC3').disabled=false;
document.getElementById('CPC4').disabled=false;
document.getElementById('CPC5').disabled=false;
document.getElementById('CPC6').disabled=false;
document.getElementById('CPC7').disabled=false;
document.getElementById('CPC8').disabled=false;
}
}
function enableADS() {
if (document.getElementById('ADS0').checked == false) {
document.getElementById('ADS1').disabled=true;
document.getElementById('ADS2').disabled=true;
document.getElementById('ADS3').disabled=true;
document.getElementById('ADS3a').disabled=true;
document.getElementById('ADS3b').disabled=true;
document.getElementById('ADS4').disabled=true;
document.getElementById('ADS4a').disabled=true;
document.getElementById('ADS4b').disabled=true;
document.getElementById('ADS4c').disabled=true;
document.getElementById('ADS4d').disabled=true;
document.getElementById('ADS4e').disabled=true;
document.getElementById('ADS5').disabled=true;
document.getElementById('ADS6').disabled=true;
document.getElementById('ADS7').disabled=true;
document.getElementById('ADS8').disabled=true;
document.getElementById('ADS11').disabled=true;
document.getElementById('ADS12').disabled=true;
document.getElementById('ADS13').disabled=true;
}
else if (document.getElementById('ADS0').checked == true) {
document.getElementById('ADS1').disabled=false;
document.getElementById('ADS2').disabled=false;
document.getElementById('ADS3').disabled=false;
document.getElementById('ADS3a').disabled=false;
document.getElementById('ADS3b').disabled=false;
document.getElementById('ADS4').disabled=false;
document.getElementById('ADS4a').disabled=false;
document.getElementById('ADS4b').disabled=false;
document.getElementById('ADS4c').disabled=false;
document.getElementById('ADS4d').disabled=false;
document.getElementById('ADS4e').disabled=false;
document.getElementById('ADS5').disabled=false;
document.getElementById('ADS6').disabled=false;
document.getElementById('ADS7').disabled=false;
document.getElementById('ADS8').disabled=false;
document.getElementById('ADS11').disabled=false;
document.getElementById('ADS12').disabled=false;
document.getElementById('ADS13').disabled=false;
}
}
function enableDES() {
if (document.getElementById('DES0').checked == false) {
document.getElementById('DES1').disabled=true;
document.getElementById('DES2').disabled=true;
document.getElementById('DES2a').disabled=true;
document.getElementById('DES2b').disabled=true;
document.getElementById('DES2c').disabled=true;
document.getElementById('DES2d').disabled=true;
document.getElementById('DES2e').disabled=true;
document.getElementById('DES2f').disabled=true;
document.getElementById('DES3a').disabled=true;
document.getElementById('DES3b').disabled=true;
document.getElementById('DES3c').disabled=true;
document.getElementById('DES4').disabled=true;
document.getElementById('DES5').disabled=true;
document.getElementById('DES6').disabled=true;
document.getElementById('DES7').disabled=true;
document.getElementById('DES8').disabled=true;
}
else if (document.getElementById('DES0').checked == true) {
document.getElementById('DES1').disabled=false;
document.getElementById('DES2').disabled=false;
document.getElementById('DES2a').disabled=false;
document.getElementById('DES2b').disabled=false;
document.getElementById('DES2c').disabled=false;
document.getElementById('DES2d').disabled=false;
document.getElementById('DES2e').disabled=false;
document.getElementById('DES2f').disabled=false;
document.getElementById('DES3a').disabled=false;
document.getElementById('DES3b').disabled=false;
document.getElementById('DES3c').disabled=false;
document.getElementById('DES4').disabled=false;
document.getElementById('DES5').disabled=false;
document.getElementById('DES6').disabled=false;
document.getElementById('DES7').disabled=false;
document.getElementById('DES8').disabled=false;
}
}
function enableSSS() {
if (document.getElementById('SSS0').checked == false) {
document.getElementById('SSS1').disabled=true;
document.getElementById('SSS2').disabled=true;
document.getElementById('SSS3').disabled=true;
document.getElementById('SSS4').disabled=true;
document.getElementById('SSS5').disabled=true;
document.getElementById('SSS6').disabled=true;
document.getElementById('SSS7').disabled=true;
document.getElementById('SSS8').disabled=true;
document.getElementById('SSS9').disabled=true;
document.getElementById('SSS10').disabled=true;
document.getElementById('SSS11').disabled=true;
document.getElementById('SSS12').disabled=true;
document.getElementById('SSS13').disabled=true;
document.getElementById('SSS14').disabled=true;
document.getElementById('SSS15').disabled=true;
document.getElementById('SSS16').disabled=true;
document.getElementById('SSS17').disabled=true;
document.getElementById('SSS18').disabled=true;
document.getElementById('SSS19').disabled=true;
document.getElementById('SSS20').disabled=true;
}
else if (document.getElementById('SSS0').checked == true) {
document.getElementById('SSS1').disabled=false;
document.getElementById('SSS2').disabled=false;
document.getElementById('SSS3').disabled=false;
document.getElementById('SSS4').disabled=false;
document.getElementById('SSS5').disabled=false;
document.getElementById('SSS6').disabled=false;
document.getElementById('SSS7').disabled=false;
document.getElementById('SSS8').disabled=false;
document.getElementById('SSS9').disabled=false;
document.getElementById('SSS10').disabled=false;
document.getElementById('SSS11').disabled=false;
document.getElementById('SSS12').disabled=false;
document.getElementById('SSS13').disabled=false;
document.getElementById('SSS14').disabled=false;
document.getElementById('SSS15').disabled=false;
document.getElementById('SSS16').disabled=false;
document.getElementById('SSS17').disabled=false;
document.getElementById('SSS18').disabled=false;
document.getElementById('SSS19').disabled=false;
document.getElementById('SSS20').disabled=false;
}
}
function enableOFS() {
if (document.getElementById('OFS0').checked == false) {
document.getElementById('OFS1').disabled=true;
document.getElementById('OFS2').disabled=true;
document.getElementById('OFS3').disabled=true;
document.getElementById('OFS4').disabled=true;
document.getElementById('OFS5').disabled=true;
}
else if (document.getElementById('OFS0').checked == true) {
document.getElementById('OFS1').disabled=false;
document.getElementById('OFS2').disabled=false;
document.getElementById('OFS3').disabled=false;
document.getElementById('OFS4').disabled=false;
document.getElementById('OFS5').disabled=false;
}
}
function enableSCS() {
if (document.getElementById('SCS0').checked == false) {
document.getElementById('SCS1').disabled=true;
document.getElementById('SCS2').disabled=true;
document.getElementById('SCS3').disabled=true;
document.getElementById('SCS4').disabled=true;
document.getElementById('SCS5').disabled=true;
document.getElementById('SCS6').disabled=true;
document.getElementById('SCS7').disabled=true;
document.getElementById('SCS8').disabled=true;
}
else if (document.getElementById('SCS0').checked == true) {
document.getElementById('SCS1').disabled=false;
document.getElementById('SCS2').disabled=false;
document.getElementById('SCS3').disabled=false;
document.getElementById('SCS4').disabled=false;
document.getElementById('SCS5').disabled=false;
document.getElementById('SCS6').disabled=false;
document.getElementById('SCS7').disabled=false;
document.getElementById('SCS8').disabled=false;
}
}
function enableMC() {
if (document.getElementById('MC').checked == false) {
document.getElementById('MC0').disabled=true;
document.getElementById('MC1').disabled=true;
document.getElementById('MC2').disabled=true;
document.getElementById('MC3').disabled=true;
document.getElementById('MC4').disabled=true;
document.getElementById('MC5').disabled=true;
document.getElementById('MC6').disabled=true;
document.getElementById('MC7').disabled=true;
document.getElementById('MC8').disabled=true;
document.getElementById('MC9').disabled=true;
document.getElementById('MC10').disabled=true;
document.getElementById('MC11').disabled=true;
}
else if (document.getElementById('MC').checked == true) {
document.getElementById('MC0').disabled=false;
document.getElementById('MC1').disabled=false;
document.getElementById('MC2').disabled=false;
document.getElementById('MC3').disabled=false;
document.getElementById('MC4').disabled=false;
document.getElementById('MC5').disabled=false;
document.getElementById('MC6').disabled=false;
document.getElementById('MC7').disabled=false;
document.getElementById('MC8').disabled=false;
document.getElementById('MC9').disabled=false;
document.getElementById('MC10').disabled=false;
document.getElementById('MC11').disabled=false;
}
}
/* End */
function calcservice(){
var Service1copay;
if (document.getElementById('Service1').value == "Adjustments") {
Service1copay = "Adjustment Copays";
}
else if (document.getElementById('Service1').value == "Spinal-Adjustments") {
Service1copay = "Spinal Adjustment Copays";
}
else if (document.getElementById('Service1').value == "Manipulations") {
Service1copay = "Manipulation Copays";
}
else if (document.getElementById('Service1').value == "Spinal-Manipulations") {
Service1copay = "Spinal Manipulation Copays";
}
else if (document.getElementById('Service1').value == "Office-Visits") {
Service1copay = "Office Visit Copays";
}
else if (document.getElementById('Service1').value == "ChiroHealth USA Covered") {
Service1copay = "Adjustment Copays";
}
else if (document.getElementById('Service1').value == "Non-Insured Adjustments") {
Service1copay = "Insured Adjustments";
}
else if (document.getElementById('Service1').value == "Non-Insured Care Visits") {
Service1copay = "Insured Care Visits";
}
else if (document.getElementById('Service1').value == "Wellness Care Visits") {
Service1copay = "Corrective Care Visits";
}
else if (document.getElementById('Service1').value == "Corrective Care Visits") {
Service1copay = "Wellness Care Visits";
}
else if (document.getElementById('Service1').value == "Months of Service") {
Service1copay = "Months of Service Copays";
}
else if (document.getElementById('Service1').value == "Sessions") {
Service1copay = "Session Copays";
}
document.getElementById('Service2').value = Service1copay;
}
/* Join Now Membership Calculator */
function memberfee() {
var Fee1 = 27;
var Fee2 = 20;
var SusbscriberSize = document.f.DripEd_Size.value / 1000;
if (SusbscriberSize == 1) {
SusbscriberSize = 0;
}
var CostPerMComplete = Math.round((document.f.Associate_Size.value * 0.5 * (Fee1 + (Fee2 * 2))) + (SusbscriberSize + (Fee1 + (Fee2 * 2))));
var CostPerQComplete = Math.round(CostPerMComplete * 3 * 0.95);
var CostPerYComplete = Math.round(CostPerMComplete * 12 * 0.90);
document.f.answerCostPerMComplete.value = CostPerMComplete;
document.f.answerCostPerQComplete.value = CostPerQComplete;
document.f.answerCostPerYComplete.value = CostPerYComplete;
var CostPerMGold = Math.round((document.f.Associate_Size.value * 0.5 * (Fee1 + Fee2)) + (Fee1 + Fee2) + SusbscriberSize);
var CostPerQGold = Math.round(CostPerMGold * 3 * 0.95);
var CostPerYGold = Math.round(CostPerMGold * 12 * 0.90);
document.f.answerCostPerMGold.value = CostPerMGold;
document.f.answerCostPerQGold.value = CostPerQGold;
document.f.answerCostPerYGold.value = CostPerYGold;
var CostPerMCPC = Math.round((document.f.Associate_Size.value * 0.5 * Fee1) + Fee1);
var CostPerQCPC = Math.round(CostPerMCPC * 3 * 0.95);
var CostPerYCPC = Math.round(CostPerMCPC * 12 * 0.90);
document.f.answerCostPerMCPC.value = CostPerMCPC;
document.f.answerCostPerQCPC.value = CostPerQCPC;
document.f.answerCostPerYCPC.value = CostPerYCPC;
var CostPerMAD = Math.round((document.f.Associate_Size.value * 0.5 * Fee1) + (SusbscriberSize + Fee1));
var CostPerQAD = Math.round(CostPerMAD * 3 * 0.95);
var CostPerYAD = Math.round(CostPerMAD * 12 * 0.90);
document.f.answerCostPerMAD.value = CostPerMAD;
document.f.answerCostPerQAD.value = CostPerQAD;
document.f.answerCostPerYAD.value = CostPerYAD;
var CostPerMDE = Math.round((document.f.Associate_Size.value * 0.5 * Fee1) + (SusbscriberSize + Fee1));
var CostPerQDE = Math.round(CostPerMDE * 3 * 0.95);
var CostPerYDE = Math.round(CostPerMDE * 12 * 0.90);
document.f.answerCostPerMDE.value = CostPerMDE;
document.f.answerCostPerQDE.value = CostPerQDE;
document.f.answerCostPerYDE.value = CostPerYDE;
var CostPerMSavedComplete = Math.round(((Fee1 * 3) * 12) + (document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerMComplete * 12)));
var CostPerQSavedComplete = Math.round(((Fee1 * 3) * 12) + (document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerQComplete * 4)));
var CostPerYSavedComplete = Math.round(((Fee1 * 3) * 12) + (document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - CostPerYComplete));
document.f.answerSavedPerMComplete.value = 'Save $' + CostPerMSavedComplete;
document.f.answerSavedPerQComplete.value = 'Save $' + CostPerQSavedComplete;
document.f.answerSavedPerYComplete.value = 'Save $' + CostPerYSavedComplete;
var CostPerMSavedGold = Math.round(((Fee1 * 2) * 12) + (document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerMGold * 12)));
var CostPerQSavedGold = Math.round(((Fee1 * 2) * 12) + (document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerQGold * 4)));
var CostPerYSavedGold = Math.round(((Fee1 * 2) * 12) + (document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - CostPerYGold));
document.f.answerSavedPerMGold.value = 'Save $' + CostPerMSavedGold;
document.f.answerSavedPerQGold.value = 'Save $' + CostPerQSavedGold;
document.f.answerSavedPerYGold.value = 'Save $' + CostPerYSavedGold;
var CostPerQSavedCPC = Math.round((CostPerMCPC * 12) - (CostPerQCPC * 4));
var CostPerYSavedCPC = Math.round((CostPerMCPC * 12) - CostPerYCPC);
document.f.answerSavedPerQCPC.value = 'Save $' + CostPerQSavedCPC;
document.f.answerSavedPerYCPC.value = 'Save $' + CostPerYSavedCPC;
var CostPerQSavedAD = Math.round((CostPerMAD * 12) - (CostPerQAD * 4));
var CostPerYSavedAD = Math.round((CostPerMAD * 12) - CostPerYAD);
document.f.answerSavedPerQAD.value = 'Save $' + CostPerQSavedAD;
document.f.answerSavedPerYAD.value = 'Save $' + CostPerYSavedAD;
var CostPerQSavedDE = Math.round((CostPerMDE * 12) - (CostPerQDE * 4));
var CostPerYSavedDE = Math.round((CostPerMDE * 12) - CostPerYDE);
document.f.answerSavedPerQDE.value = 'Save $' + CostPerQSavedDE;
document.f.answerSavedPerYDE.value = 'Save $' + CostPerYSavedDE;
var CostPerMSavedTrial = Math.round((CostPerMSavedComplete) + 63);
document.f.answerCostTrial.value = '$3.95';
document.f.answerSavedTrial.value = 'Save $' + CostPerMSavedTrial;
document.f.answerCostPerMTrial.value = CostPerMComplete;
jAlert('Check Table in Step 1 For Adjusted Fees.');
return true;
}
/* End */
/* Join Now Membership Calculator */
function memberfeeV2() {
var Fee1 = 47;
var Fee2 = 30;
var Fee3 = 20;
var SusbscriberSize = document.f.DripEd_Size.value / 5000;
if (SusbscriberSize == 1) {
SusbscriberSize = 0;
}
else {
SusbscriberSize = (SusbscriberSize * 5) - 5;
}
var CostPerMComplete = Math.round((document.f.Associate_Size.value * 0.5 * (Fee1 + Fee2 + Fee3)) + (SusbscriberSize + (Fee1 + Fee2 + Fee3)));
var CostPerQComplete = Math.round(CostPerMComplete * 3 * 0.95);
var CostPerYComplete = Math.round(CostPerMComplete * 12 * 0.90);
document.f.answerCostPerMComplete.value = CostPerMComplete;
document.f.answerCostPerQComplete.value = CostPerQComplete;
document.f.answerCostPerYComplete.value = CostPerYComplete;
var CostPerMGold = Math.round((document.f.Associate_Size.value * 0.5 * (Fee1 + Fee2)) + (Fee1 + Fee2) + SusbscriberSize);
var CostPerQGold = Math.round(CostPerMGold * 3 * 0.95);
var CostPerYGold = Math.round(CostPerMGold * 12 * 0.90);
document.f.answerCostPerMGold.value = CostPerMGold;
document.f.answerCostPerQGold.value = CostPerQGold;
document.f.answerCostPerYGold.value = CostPerYGold;
var CostPerMCPC = Math.round((document.f.Associate_Size.value * 0.5 * Fee1) + Fee1);
var CostPerQCPC = Math.round(CostPerMCPC * 3 * 0.95);
var CostPerYCPC = Math.round(CostPerMCPC * 12 * 0.90);
document.f.answerCostPerMCPC.value = CostPerMCPC;
document.f.answerCostPerQCPC.value = CostPerQCPC;
document.f.answerCostPerYCPC.value = CostPerYCPC;
var CostPerMAD = Math.round((document.f.Associate_Size.value * 0.5 * Fee1) + (SusbscriberSize + Fee1));
var CostPerQAD = Math.round(CostPerMAD * 3 * 0.95);
var CostPerYAD = Math.round(CostPerMAD * 12 * 0.90);
document.f.answerCostPerMAD.value = CostPerMAD;
document.f.answerCostPerQAD.value = CostPerQAD;
document.f.answerCostPerYAD.value = CostPerYAD;
var CostPerMDE = Math.round((document.f.Associate_Size.value * 0.5 * Fee1) + (SusbscriberSize + Fee1));
var CostPerQDE = Math.round(CostPerMDE * 3 * 0.95);
var CostPerYDE = Math.round(CostPerMDE * 12 * 0.90);
document.f.answerCostPerMDE.value = CostPerMDE;
document.f.answerCostPerQDE.value = CostPerQDE;
document.f.answerCostPerYDE.value = CostPerYDE;
var CostPerMSavedComplete = Math.round(((Fee1 * 3) * 12) + (document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerMComplete * 12)));
var CostPerQSavedComplete = Math.round(((Fee1 * 3) * 12) + (document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerQComplete * 4)));
var CostPerYSavedComplete = Math.round(((Fee1 * 3) * 12) + (document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - CostPerYComplete));
document.f.answerSavedPerMComplete.value = 'Save $' + CostPerMSavedComplete;
document.f.answerSavedPerQComplete.value = 'Save $' + CostPerQSavedComplete;
document.f.answerSavedPerYComplete.value = 'Save $' + CostPerYSavedComplete;
var CostPerMSavedGold = Math.round(((Fee1 * 2) * 12) + (document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerMGold * 12)));
var CostPerQSavedGold = Math.round(((Fee1 * 2) * 12) + (document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerQGold * 4)));
var CostPerYSavedGold = Math.round(((Fee1 * 2) * 12) + (document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - CostPerYGold));
document.f.answerSavedPerMGold.value = 'Save $' + CostPerMSavedGold;
document.f.answerSavedPerQGold.value = 'Save $' + CostPerQSavedGold;
document.f.answerSavedPerYGold.value = 'Save $' + CostPerYSavedGold;
var CostPerQSavedCPC = Math.round((CostPerMCPC * 12) - (CostPerQCPC * 4));
var CostPerYSavedCPC = Math.round((CostPerMCPC * 12) - CostPerYCPC);
document.f.answerSavedPerQCPC.value = 'Save $' + CostPerQSavedCPC;
document.f.answerSavedPerYCPC.value = 'Save $' + CostPerYSavedCPC;
var CostPerQSavedAD = Math.round((CostPerMAD * 12) - (CostPerQAD * 4));
var CostPerYSavedAD = Math.round((CostPerMAD * 12) - CostPerYAD);
document.f.answerSavedPerQAD.value = 'Save $' + CostPerQSavedAD;
document.f.answerSavedPerYAD.value = 'Save $' + CostPerYSavedAD;
var CostPerQSavedDE = Math.round((CostPerMDE * 12) - (CostPerQDE * 4));
var CostPerYSavedDE = Math.round((CostPerMDE * 12) - CostPerYDE);
document.f.answerSavedPerQDE.value = 'Save $' + CostPerQSavedDE;
document.f.answerSavedPerYDE.value = 'Save $' + CostPerYSavedDE;
var CostPerMSavedTrial = Math.round((CostPerMSavedComplete) + 63);
document.f.answerCostTrial.value = '$3.95';
document.f.answerSavedTrial.value = 'Save $' + CostPerMSavedTrial;
document.f.answerCostPerMTrial.value = CostPerMComplete;
jAlert('Check Table in Step 1 For Adjusted Fees.');
return true;
}
/* End */
/* Join Now Membership Calculator */
function memberfeeV3()
{
var Fee1 = 47;
var Fee2 = 30;
var Fee3 = 20;
var GatewayFee = 20;
var CorporateFee = 99;
var SusbscriberSize = document.f.DripEd_Size.value / 5000;
if (SusbscriberSize == 1) {
SusbscriberSize = 0;
}
else {
SusbscriberSize = (SusbscriberSize * 5) - 5;
}
var CostPerMComplete = Math.round(
(document.f.Associate_Size.value * 0.5 * (Fee1 + Fee2 + Fee3)) +
(SusbscriberSize + (Fee1 + Fee2 + Fee3)) +
(document.f.GatewaySystem.value * GatewayFee)
);
CostPerMComplete = CostPerMComplete + (document.f.License_Select.value * CostPerMComplete);
var CostPerQComplete = Math.round(CostPerMComplete * 3 * 0.95);
var CostPerYComplete = Math.round(CostPerMComplete * 12 * 0.90);
document.f.answerCostPerMComplete.value = CostPerMComplete;
document.f.answerCostPerQComplete.value = CostPerQComplete;
document.f.answerCostPerYComplete.value = CostPerYComplete;
var CostPerMGold1 = Math.round(
(document.f.Associate_Size.value * 0.5 * (Fee1 + Fee2)) +
(Fee1 + Fee2) +
SusbscriberSize +
(document.f.GatewaySystem.value * GatewayFee)
);
CostPerMGold1 = CostPerMGold1 + (document.f.License_Select.value * CostPerMGold1);
var CostPerQGold1 = Math.round(CostPerMGold1 * 3 * 0.95);
var CostPerYGold1 = Math.round(CostPerMGold1 * 12 * 0.90);
document.f.answerCostPerMGold1.value = CostPerMGold1;
document.f.answerCostPerQGold1.value = CostPerQGold1;
document.f.answerCostPerYGold1.value = CostPerYGold1;
var CostPerMGold2 = Math.round(
(document.f.Associate_Size.value * 0.5 * (Fee1 + Fee2)) +
(Fee1 + Fee2) +
SusbscriberSize +
(document.f.GatewaySystem.value * GatewayFee)
);
CostPerMGold2 = CostPerMGold2 + (document.f.License_Select.value * CostPerMGold2);
var CostPerQGold2 = Math.round(CostPerMGold1 * 3 * 0.95);
var CostPerYGold2 = Math.round(CostPerMGold1 * 12 * 0.90);
document.f.answerCostPerMGold2.value = CostPerMGold2;
document.f.answerCostPerQGold2.value = CostPerQGold2;
document.f.answerCostPerYGold2.value = CostPerYGold2;
var CostPerMCPC = Math.round(
(document.f.Associate_Size.value * 0.5 * Fee1) +
Fee1
);
CostPerMCPC = CostPerMCPC + (document.f.License_Select.value * CostPerMCPC);
var CostPerQCPC = Math.round(CostPerMCPC * 3 * 0.95);
var CostPerYCPC = Math.round(CostPerMCPC * 12 * 0.90);
document.f.answerCostPerMCPC.value = CostPerMCPC;
document.f.answerCostPerQCPC.value = CostPerQCPC;
document.f.answerCostPerYCPC.value = CostPerYCPC;
var CostPerMAD = Math.round(
(document.f.Associate_Size.value * 0.5 * Fee1) +
(SusbscriberSize + Fee1) +
(document.f.GatewaySystem.value * GatewayFee)
);
CostPerMAD = CostPerMAD + (document.f.License_Select.value * CostPerMAD);
var CostPerQAD = Math.round(CostPerMAD * 3 * 0.95);
var CostPerYAD = Math.round(CostPerMAD * 12 * 0.90);
document.f.answerCostPerMAD.value = CostPerMAD;
document.f.answerCostPerQAD.value = CostPerQAD;
document.f.answerCostPerYAD.value = CostPerYAD;
var CostPerMDE = Math.round(
(document.f.Associate_Size.value * 0.5 * Fee1) +
(SusbscriberSize + Fee1)
);
CostPerMDE = CostPerMDE + (document.f.License_Select.value * CostPerMDE);
var CostPerQDE = Math.round(CostPerMDE * 3 * 0.95);
var CostPerYDE = Math.round(CostPerMDE * 12 * 0.90);
document.f.answerCostPerMDE.value = CostPerMDE;
document.f.answerCostPerQDE.value = CostPerQDE;
document.f.answerCostPerYDE.value = CostPerYDE;
var CostPerMSavedComplete = Math.round(
((Fee1 * 3) * 12) +
(document.f.License_Select.value * ((Fee1 * 3) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerMComplete * 12)) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerQSavedComplete = Math.round(
((Fee1 * 3) * 12) +
(document.f.License_Select.value * ((Fee1 * 3) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerQComplete * 4)) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerYSavedComplete = Math.round(
((Fee1 * 3) * 12) +
(document.f.License_Select.value * ((Fee1 * 3) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 3 * 0.5) * 12) + (SusbscriberSize * 12) - CostPerYComplete) +
(document.f.License_Select.value * CorporateFee * 12)
);
document.f.answerSavedPerMComplete.value = 'Save $' + CostPerMSavedComplete;
document.f.answerSavedPerQComplete.value = 'Save $' + CostPerQSavedComplete;
document.f.answerSavedPerYComplete.value = 'Save $' + CostPerYSavedComplete;
var CostPerMSavedGold1 = Math.round(
((Fee1 * 2) * 12) +
(document.f.License_Select.value * ((Fee1 * 2) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerMGold1 * 12)) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerQSavedGold1 = Math.round(
((Fee1 * 2) * 12) +
(document.f.License_Select.value * ((Fee1 * 2) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerQGold1 * 4)) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerYSavedGold1 = Math.round(
((Fee1 * 2) * 12) +
(document.f.License_Select.value * ((Fee1 * 2) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - CostPerYGold1) +
(document.f.License_Select.value * CorporateFee * 12)
);
document.f.answerSavedPerMGold1.value = 'Save $' + CostPerMSavedGold1;
document.f.answerSavedPerQGold1.value = 'Save $' + CostPerQSavedGold1;
document.f.answerSavedPerYGold1.value = 'Save $' + CostPerYSavedGold1;
var CostPerMSavedGold2 = Math.round(
((Fee1 * 2) * 12) +
(document.f.License_Select.value * ((Fee1 * 2) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerMGold2 * 12)) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerQSavedGold2 = Math.round(
((Fee1 * 2) * 12) +
(document.f.License_Select.value * ((Fee1 * 2) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - (CostPerQGold2 * 4)) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerYSavedGold2 = Math.round(
((Fee1 * 2) * 12) +
(document.f.License_Select.value * ((Fee1 * 2) * 12)) +
(document.f.Associate_Size.value * ((Fee1 * 2 * 0.5) * 12) + (SusbscriberSize * 12) - CostPerYGold2) +
(document.f.License_Select.value * CorporateFee * 12)
);
document.f.answerSavedPerMGold2.value = 'Save $' + CostPerMSavedGold2;
document.f.answerSavedPerQGold2.value = 'Save $' + CostPerQSavedGold2;
document.f.answerSavedPerYGold2.value = 'Save $' + CostPerYSavedGold2;
var CostPerQSavedCPC = Math.round(
(CostPerMCPC * 12) - (CostPerQCPC * 4) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerYSavedCPC = Math.round(
(CostPerMCPC * 12) - CostPerYCPC +
(document.f.License_Select.value * CorporateFee * 12)
);
document.f.answerSavedPerQCPC.value = 'Save $' + CostPerQSavedCPC;
document.f.answerSavedPerYCPC.value = 'Save $' + CostPerYSavedCPC;
var CostPerQSavedAD = Math.round(
(CostPerMAD * 12) - (CostPerQAD * 4) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerYSavedAD = Math.round(
(CostPerMAD * 12) - CostPerYAD +
(document.f.License_Select.value * CorporateFee * 12)
);
document.f.answerSavedPerQAD.value = 'Save $' + CostPerQSavedAD;
document.f.answerSavedPerYAD.value = 'Save $' + CostPerYSavedAD;
var CostPerQSavedDE = Math.round(
(CostPerMDE * 12) - (CostPerQDE * 4) +
(document.f.License_Select.value * CorporateFee * 12)
);
var CostPerYSavedDE = Math.round(
(CostPerMDE * 12) - CostPerYDE +
(document.f.License_Select.value * CorporateFee * 12)
);
document.f.answerSavedPerQDE.value = 'Save $' + CostPerQSavedDE;
document.f.answerSavedPerYDE.value = 'Save $' + CostPerYSavedDE;
var CostPerMSavedTrial = Math.round(
(CostPerMSavedComplete) + 63 +
(document.f.License_Select.value * CorporateFee)
);
document.f.answerCostTrial.value = '$3.95';
document.f.answerSavedTrial.value = 'Save $' + CostPerMSavedTrial;
document.f.answerCostPerMTrial.value = CostPerMComplete;
return true;
}
/* End */
/* Join Now Membership Calculator */
function memberfee2()
{
var CostPerMCPC = Math.round((document.f.Associate_Size.value * 0.5 * 27) + 27);
var CostPerQCPC = Math.round(CostPerMCPC * 3 * 0.95);
var CostPerYCPC = Math.round(CostPerMCPC * 12 * 0.90);
document.f.answerCostPerMCPC.value = CostPerMCPC;
document.f.answerCostPerQCPC.value = CostPerQCPC;
document.f.answerCostPerYCPC.value = CostPerYCPC;
var CostPerQSavedCPC = Math.round((CostPerMCPC * 12) - (CostPerQCPC * 4));
var CostPerYSavedCPC = Math.round((CostPerMCPC * 12) - CostPerYCPC);
document.f.answerSavedPerQCPC.value = 'Save $' + CostPerQSavedCPC;
document.f.answerSavedPerYCPC.value = 'Save $' + CostPerYSavedCPC;
var CostPerMSavedTrial = CostPerMCPC;
document.f.answerCostTrial.value = '$3.95';
document.f.answerCostPerMTrial.value = CostPerMCPC;
}
/* End */
/* Upgrade Membership Calculator */
function upgradefee2() {
var CostPerMCPC = Math.round(document.f.Associate_Size.value * 0.5 * 27);
var CostPerQCPC = Math.round(CostPerMCPC * 3 * 0.95);
var CostPerYCPC = Math.round(CostPerMCPC * 12 * 0.90);
document.f.answerCostPerMCPC.value = CostPerMCPC;
document.f.answerCostPerQCPC.value = CostPerQCPC;
document.f.answerCostPerYCPC.value = CostPerYCPC;
var CostPerQSavedCPC = Math.round((CostPerMCPC * 12) - (CostPerQCPC * 4));
var CostPerYSavedCPC = Math.round((CostPerMCPC * 12) - CostPerYCPC);
document.f.answerSavedPerQCPC.value = 'Save $' + CostPerQSavedCPC;
document.f.answerSavedPerYCPC.value = 'Save $' + CostPerYSavedCPC;
}
/* End */
/* open close image */
function displayReview(divID) {
if((document.getElementById(divID).style.display == 'block')||(document.getElementById(divID).style.display == '')) {
var closeReview = true;
document.getElementById(divID).style.display = 'none';
}
if(!closeReview) {
document.getElementById(divID).style.display = 'block';
}
closeReview = false;
return false;
}
function closeReview(divID) {
document.getElementById(divID).style.display = 'none';
return false;
}
/* End */
/* open close image */
function displayDESelect(divID) {
if(document.getElementById(divID).style.display == '') {
var closeReview = true;
if(document.f.id.value == 0) {
document.getElementById(divID).style.display = 'none';
}
}
if(!closeReview) {
document.getElementById(divID).style.display = '';
}
closeReview = false;
return false;
}
function DSEmailDisable() {
if (document.f.AutoShipments.value == 0) {
document.getElementById('DSEmail1').style.display = 'none';
document.getElementById('DSEmail2').style.display = 'none';
}
if (document.f.AutoShipments.value == 2) {
document.getElementById('DSEmail1').style.display = '';
document.getElementById('DSEmail2').style.display = '';
}
}
/* open close image */
function ASSelect(divID) {
if (document.f.AutoShipments.value == "No") {
document.getElementById('ASB1').style.display = 'none';
document.getElementById('ASB2').style.display = 'none';
}
if (document.f.AutoShipments.value == "Yes") {
document.getElementById('ASB1').style.display = 'block';
document.getElementById('ASB2').style.display = 'block';
}
}
/* open close image */
function displayDECampaignSelect(divID) {
if(document.getElementById(divID).style.display == '') {
var closeReview = true;
if(document.f.campaign_id.value == 0) {
document.getElementById(divID).style.display = 'none';
}
}
if(!closeReview) {
document.getElementById(divID).style.display = '';
}
closeReview = false;
return false;
}
/* open close image */
function displayInitialPaymentSelect(divID) {
if(document.f.Downpayment.value == 'Now') {
document.getElementById(divID).style.display = 'none';
}
if(document.f.Downpayment.value == 'Manually') {
document.getElementById(divID).style.display = 'none';
}
if(document.f.Downpayment.value == 'Scheduled') {
document.getElementById(divID).style.display = '';
}
return false;
}
/* open close image */
function displayReceiptSelect(divID) {
if(document.getElementById(divID).style.display == '') {
var closeReview = true;
if(document.f.ReceiptPage.value == 0) {
document.getElementById(divID).style.display = 'none';
}
}
if(!closeReview) {
document.getElementById(divID).style.display = '';
}
closeReview = false;
return false;
}
function displayReceiptSelect2(divID) {
if(document.getElementById(divID).style.display == '') {
var closeReview = true;
if((document.f.ReceiptPage.value == 1)&&(document.f.EmailReceipt.value == 1)) {
document.getElementById(divID).style.display = 'none';
}
}
if(!closeReview) {
document.getElementById(divID).style.display = '';
}
closeReview = false;
return false;
}
/* open close image */
function displayADSelect1(divID) {
if(document.getElementById(divID).style.display == '') {
var closeReview = true;
if(document.f.Frequency.value == 0) {
document.getElementById(divID).style.display = 'none';
}
}
if(!closeReview) {
document.getElementById(divID).style.display = '';
}
closeReview = false;
return false;
}
function displayADSelect() {
if(document.getElementById("Frequency").value == 0) {
document.getElementById("AD1").style.display = 'none';
document.getElementById("AD2").style.display = 'none';
document.getElementById("RecurFee").value = '';
document.getElementById("Number").value = '';
document.getElementById("IndefiniteOn").checked = false;
}
else {
if(document.getElementById("GatewayType").value == 1) {
document.getElementById("AD1").style.display = '';
}
else {
document.getElementById("AD1").style.display = 'none';
}
document.getElementById("AD2").style.display = '';
}
}
/* open close image */
function displayQSelect(divID) {
if(document.getElementById(divID).style.display == '') {
var closeReview = true;
if(document.f.QuantityOn.value == 0) {
document.getElementById(divID).style.display = 'none';
}
}
if(!closeReview) {
document.getElementById(divID).style.display = '';
}
closeReview = false;
return false;
}
function displayCustonURL() {
/*
EmailReceipt 0=Receipt 1=No Receipt
ReceiptPage 0=Default URL 1=Custom URL */
/* No Receipt & Custom URL */
if ((document.f.ReceiptPage.value == 1) && (document.f.EmailReceipt.value == 1)) {
document.getElementById("GRCustom1").style.display = '';
document.getElementById("GRCustom2").style.display = 'none';
document.getElementById("GRCustom3").style.display = 'none';
document.getElementById("GRCustom4").style.display = 'none';
document.getElementById("GRCustom5").style.display = 'none';
}
/* No Email Receipt & Default URL */
else if (document.f.ReceiptPage.value == 0) {
document.getElementById("GRCustom1").style.display = 'none';
document.getElementById("GRCustom2").style.display = '';
document.getElementById("GRCustom3").style.display = '';
document.getElementById("GRCustom4").style.display = '';
document.getElementById("GRCustom5").style.display = '';
}
/* Email Receipt & Custom URL */
else if ((document.f.ReceiptPage.value == 1) && (document.f.EmailReceipt.value == 0)) {
document.getElementById("GRCustom1").style.display = '';
document.getElementById("GRCustom2").style.display = '';
document.getElementById("GRCustom3").style.display = '';
document.getElementById("GRCustom4").style.display = '';
document.getElementById("GRCustom5").style.display = '';
}
}
function displayProductFreq() {
if (document.f.Frequency.value == 0) {
document.getElementById("Payments").style.display = 'none';
document.getElementById("IndefiniteOn").checked = false;
document.getElementById("Number").disabled = false;
document.getElementById("Number").value = '';
}
else {
document.getElementById("Payments").style.display = '';
}
}
function displayFormType() {
if (document.getElementById("InputType").value == 1) {
document.getElementById("F0").style.display = 'none';
document.getElementById("F1").style.display = 'none';
document.getElementById("F3").style.display = 'none';
document.getElementById("F4").style.display = 'none';
document.getElementById("F5").style.display = 'none';
document.getElementById("F9").style.display = 'none';
document.getElementById("AD1").style.display = 'none';
document.getElementById("AD2").style.display = 'none';
document.getElementById("Q1").style.display = 'none';
document.getElementById("Q2").style.display = 'none';
document.getElementById("Q3").style.display = 'none';
document.getElementById("Q4").style.display = 'none';
document.getElementById("Q5").style.display = 'none';
document.getElementById("T1").style.display = 'none';
document.getElementById("T2").style.display = 'none';
document.getElementById("T4").style.display = 'none';
document.getElementById("F12").style.display = 'none';
document.getElementById("F11").style.display = 'none';
document.getElementById("F13").style.display = 'none';
document.getElementById("F15").style.display = 'none';
document.getElementById("F17").style.display = 'none';
document.getElementById("F18").style.display = 'none';
document.getElementById("Address_On").value = 0;
document.getElementById("Country_On").value = 0;
document.getElementById("Phone_On").value = 0;
}
else {
document.getElementById("F9").style.display = '';
document.getElementById("F11").style.display = '';
document.getElementById("F12").style.display = '';
document.getElementById("F13").style.display = '';
document.getElementById("F15").style.display = '';
document.getElementById("F17").style.display = '';
document.getElementById("F18").style.display = '';
displayTypeSelect();
displayBillingSelect();
}
}
function displayFormType2() {
if (document.getElementById("InputType").value == 1) {
document.getElementById("F0").style.display = 'none';
document.getElementById("F1").style.display = 'none';
document.getElementById("F3").style.display = 'none';
document.getElementById("F4").style.display = 'none';
document.getElementById("F5").style.display = 'none';
document.getElementById("F9").style.display = 'none';
document.getElementById("AD1").style.display = 'none';
document.getElementById("AD2").style.display = 'none';
document.getElementById("Q1").style.display = 'none';
document.getElementById("Q2").style.display = 'none';
document.getElementById("Q3").style.display = 'none';
document.getElementById("Q4").style.display = 'none';
document.getElementById("Q5").style.display = 'none';
document.getElementById("T1").style.display = 'none';
document.getElementById("T2").style.display = 'none';
document.getElementById("T4").style.display = 'none';
document.getElementById("F12").style.display = 'none';
document.getElementById("F11").style.display = 'none';
document.getElementById("F13").style.display = 'none';
document.getElementById("F15").style.display = 'none';
document.getElementById("F17").style.display = 'none';
document.getElementById("F18").style.display = 'none';
document.getElementById("Address_On").value = 0;
document.getElementById("Country_On").value = 0;
document.getElementById("Phone_On").value = 0;
}
else {
document.getElementById("F9").style.display = '';
document.getElementById("F11").style.display = '';
document.getElementById("F12").style.display = '';
document.getElementById("F13").style.display = '';
document.getElementById("F15").style.display = '';
document.getElementById("F17").style.display = '';
document.getElementById("F18").style.display = '';
}
}
function displayBillingSelect() {
if (document.f.BillingOffered.value == 3) {
document.getElementById("F0").style.display = 'none';
document.getElementById("F1").style.display = 'none';
document.getElementById("F3").style.display = 'none';
document.getElementById("F4").style.display = 'none';
document.getElementById("F5").style.display = 'none';
document.getElementById("AD1").style.display = 'none';
document.getElementById("AD2").style.display = 'none';
document.getElementById("Q1").style.display = 'none';
document.getElementById("Q2").style.display = 'none';
document.getElementById("Q3").style.display = 'none';
document.getElementById("Q4").style.display = 'none';
document.getElementById("Q5").style.display = 'none';
document.getElementById("T1").style.display = 'none';
document.getElementById("T2").style.display = 'none';
document.getElementById("T4").style.display = 'none';
document.getElementById("S1").style.display = 'none';
document.getElementById("S2").style.display = 'none';
document.getElementById("S3").style.display = 'none';
document.getElementById("Address_On").value = 0;
document.getElementById("Country_On").value = 0;
document.getElementById("Phone_On").value = 0;
}
else {
displayTypeSelect();
document.getElementById("F0").style.display = '';
document.getElementById("F3").style.display = '';
document.getElementById("F4").style.display = '';
document.getElementById("F5").style.display = '';
document.getElementById("Address_On").value = 2;
document.getElementById("Country_On").value = 2;
document.getElementById("Phone_On").value = 2;
document.getElementById("S1").style.display = '';
document.getElementById("S2").style.display = '';
document.getElementById("S3").style.display = '';
}
displayFormType2();
}
function displayTypeSelect() {
document.getElementById("T2").style.display = '';
if (document.getElementById("GatewayType").value > 1) {
document.getElementById("AD1").style.display = 'none';
document.getElementById("Q1").style.display = 'none';
document.getElementById("Q2").style.display = 'none';
document.getElementById("Q3").style.display = 'none';
document.getElementById("Q4").style.display = 'none';
document.getElementById("Q5").style.display = 'none';
document.getElementById("T1").style.display = 'none';
document.getElementById("T4").style.display = 'none';
if (document.getElementById("Frequency").value == 0) {
document.getElementById("AD2").style.display = 'none';
document.getElementById("IndefiniteOn").checkbox = false;
document.getElementById("Number").value = '';
}
else {
document.getElementById("AD2").style.display = '';
}
document.getElementById("Initial_Fee").value = '';
document.getElementById("RecurFee").value = '';
document.getElementById("QuantityOn").value = '0';
document.getElementById("QuantityLabel").value = 'Quantity';
document.getElementById("QuantityMin").value = '1';
document.getElementById("QuantityMax").value = '1';
document.getElementById("QuantityInc").value = '1';
}
if (document.getElementById("GatewayType").value == 2) {
document.getElementById("T2").style.display = 'none';
document.getElementById("F0").style.display = 'none';
document.getElementById("SS0").style.display = '';
document.getElementById("SS1").style.display = '';
document.getElementById("SS2").style.display = '';
document.getElementById("AD1").style.display = 'none';
document.getElementById("AD2").style.display = 'none';
}
if (document.getElementById("GatewayType").value != 2) {
document.getElementById("T2").style.display = '';
document.getElementById("F0").style.display = '';
document.getElementById("SS0").style.display = 'none';
document.getElementById("SS1").style.display = 'none';
document.getElementById("SS2").style.display = 'none';
if (document.getElementById("Frequency").value == 0) {
document.getElementById("AD1").style.display = 'none';
document.getElementById("AD2").style.display = 'none';
}
else {
document.getElementById("AD1").style.display = '';
document.getElementById("AD2").style.display = '';
}
}
if (document.getElementById("GatewayType").value == 1) {
document.getElementById("T1").style.display = '';
document.getElementById("T2").style.display = '';
document.getElementById("T4").style.display = '';
if (document.getElementById("Frequency").value == 0) {
document.getElementById("AD1").style.display = 'none';
document.getElementById("AD2").style.display = 'none';
}
else {
document.getElementById("AD1").style.display = '';
document.getElementById("AD2").style.display = '';
}
if (document.getElementById("QuantityOn").value == 0) {
document.getElementById("Q1").style.display = 'none';
document.getElementById("Q2").style.display = 'none';
document.getElementById("Q3").style.display = 'none';
document.getElementById("Q4").style.display = 'none';
document.getElementById("Q5").style.display = 'none';
}
else {
document.getElementById("Q1").style.display = '';
document.getElementById("Q2").style.display = '';
document.getElementById("Q3").style.display = '';
document.getElementById("Q4").style.display = '';
document.getElementById("Q5").style.display = '';
}
}
}
function swiperdisable(which) {
showLoader();
document.f.button13.value = 'Please wait...';
document.f.button13.disabled = true;
document.f.submit1.disabled = true;
return true;
}
/* End */
function swiperdisable2(which) {
showLoader();
document.f.button11.value = 'Please wait...';
document.f.button11.disabled = true;
document.f.submit1.disabled = true;
return true;
}
/* End */
function swiperdisable3(which) {
showLoader();
document.f.button12.value = 'Please wait...';
document.f.button12.disabled = true;
document.f.submit1.disabled = true;
return true;
}
/* End */
/* Makes a field Required AND Terms Of Use Checked for Mini-Course */
function checkrequiredmini(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else if (document.g.agree.checked) {
document.g.submit1.disabled = true;
return true;
}
else {
jAlert('Check the Accept Terms of Use Box to Continue.');
return false;
}
}
/* End */
/* Makes a field Required AND Terms Of Use Checked for Start Now Page */
function checkrequired2(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else if (document.f.agree.checked) {
if (validateCard(document.f.requiredCredit_Card_Number.value,document.f.Credit_Card_Type.value,document.f.Credit_Card_Exp_Month.value,document.f.Credit_Card_Exp_Year.value)) {
jConfirm('Except as outlined in the Terms of Use, there are no refunds once you submit. Click OK to Submit Your Registration.', 'Confirm', function(agree) {
if (agree) {
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
return true;
}
else {
return false;
}
});
}
else {
return false;
}
}
else {
jAlert('Check the Accept Terms of Use Box to Continue.');
return false;
}
}
/* End */
/* Makes a field Required AND Warn of $1.00 Authorized */
function checkrequired3(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' field was properly completed.');
return false;
}
else {
jConfirm('By clicking OK you are agreeing to have your account auto-debited per your membership. For account verification an authorization for $1.00 will occur. Click OK to authorize.', 'Confirm', function(agree) {
if (agree) {
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Makes a merchant account fields Required IF Gateway set to Optimal */
function checkrequired4(which) {
if (document.autodebitdefaults.Gateway.value == "Optimal") {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
return true;
}
}
else {
return true;
}
}
/* End */
/* Makes a field Required AND Confirm for Auto-Debit */
function checkrequired5() {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
showLoader();
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.button11.disabled = true;
document.f.reset.disabled = true;
document.f.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Makes a field Required AND Confirm */
function checkrequired6(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
showLoader();
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.reset.disabled = true;
document.f.button12.disabled = true;
document.f.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Makes a field Required AND Confirm */
function checkrequired7(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
showLoader();
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.reset.disabled = true;
document.f.button13.disabled = true;
document.f.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Makes a field Required AND Confirm */
function checkrequired8(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.reset.disabled = true;
document.f.button16.disabled = true;
document.f.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Makes a field Required AND Confirm */
function checkrequired9(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Makes a field Required AND Confirm */
function checkrequired10(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Authorize Payment', 'Confirm', function(agree) {
if (agree) {
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Makes a field Required AND Confirm */
function checkrequired11() {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.reset.disabled = true;
document.f.button17.disabled = true;
document.f.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Makes a field Required AND Confirm */
function checkrequired12(which) {
var pass=true;
var debittype;
var digits;
var billing;
var process;
var tempobj;
var routing;
if (document.images) {
for (i=0; iContact Info:\n' +
document.f.requiredFirstName.value + ' ' +
document.f.requiredLastName.value + '\n' +
document.f.requiredAddress.value + ' ' +
document.f.requiredCity.value + ', ' +
document.f.State.value + ' ' +
document.f.requiredZip.value + ' ' +
document.f.Country.value + '\n' +
document.f.requiredEmail.value + '\nP: ' +
document.f.requiredPhone.value +
'\n\nBilling Info:\n' +
document.f.requiredBillingAddress.value + ' ' +
document.f.requiredBillingCity.value + ', ' +
document.f.BillingState.value + ' ' +
document.f.requiredBillingZip.value + ' ' +
document.f.BillingCountry.value + '\n' +
document.f.requiredBillingPhone.value +
'\n' + billing + '\n\nBy submitting you are confirming you agree with the Terms. Click OK to Submit Your Order.', 'Please Confirm Order', function(agree) {
if (agree) {
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.target = "_self";
document.f.submit(); // Submit the page
return true;
}
else {
return false;
}
});
}
else {
return false;
}
}
else {
jAlert('Check the Terms box to continue.');
return false;
}
}
/* End */
/* Simple Swiper Makes a field Required AND Confirm */
function checkrequired22(which) {
var tempobj;
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.button21.disabled = true;
document.f.action = "include/content/pages/page_processing/SAGE_Simple_Swiper.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Simple Swiper Makes a field Required AND Confirm */
function checkrequired22a(which) {
var pass=true;
var tempobj;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.button21.disabled = true;
document.f.target = "_self";
document.f.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
function showLoader() {
document.getElementById("uploader_image").style.display = '';
document.getElementById("uploader_image").innerHTML = "
";
}
/* Simple Swiper Makes a field Required AND Confirm */
function checkrequired22aV2(which) {
var pass=true;
var tempobj;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
jConfirm('Click OK to Proceed', 'Confirm', function(agree) {
if (agree) {
showLoader();
document.f.submit1.value = 'Please wait...';
document.f.submit1.disabled = true;
document.f.button21.disabled = true;
document.f.target = "_self";
document.f.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
function validatesignup() {
fnmcheck = trim(document.signup.First_Name.value);
if ((fnmcheck.length < 1) || (fnmcheck == 'First Name')) {
jAlert('Please Enter a First Name.');
return false;
}
lnmcheck = trim(document.signup.Last_Name.value);
if ((lnmcheck.length < 1) || (lnmcheck == 'Last Name')) {
jAlert('Please Enter a Last Name.');
return false;
}
emailscheck = trim(document.signup.Email.value);
if ((emailscheck.length < 1) || (emailscheck == 'Email')) {
jAlert('Please Enter a Valid Email Address.');
good = false;
return false;
}
else {
// Note: The next expression must be all on one line...
//allow no spaces, linefeeds, or carriage returns!
var goodEmail = document.signup.Email.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail) {
good = true;
document.signup.submit();
}
else {
jAlert('Please Enter a Valid Email Address.');
field.focus();
field.select();
good = false;
}
}
}
/* Makes a field Required with Password Check */
function checkrequiredwithpass(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
pw1 = TheForm.requiredPassword1.value;
pw2 = TheForm.requiredPassword2.value;
if (pw1 != pw2) {
jAlert('You Did Not Enter the Same New Password Twice. Please Re-enter Your Password.');
return false;
}
document.TheForm.submit();
}
}
/* End */
/* Confirm password entered the same in two boxes */
function checkPw(form) {
pw1 = form.Password.value;
pw2 = form.Passwordx.value;
if (pw1 != pw2) {
jAlert('You Did Not Enter the Same New Password Twice. Please Re-enter Your Password.');
return false;
}
document.TheForm.submit();
return false;
}
/* Begin */
function checkrequiredSBS1(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
document.TheForm.action = "Page_Staff_Bonus_Calculator_Report.inc.php";
window.open('about:blank', 'previewWinSB1', 'resizable=no,scrollbars=yes,menubar=no,toolbar=no,directories=no,location=no,status=no');
document.TheForm.target = "previewWinSB1";
document.TheForm.submit();
return true;
}
}
/* End */
/* Begin */
function checkrequiredSBS2(which) {
var pass=true;
if (document.images) {
for (i=0; i'+shortFieldName+' Field was Properly Completed.');
return false;
}
else {
document.TheForm2.action = "Page_Staff_Bonus_Calculator_Report.inc.php";
window.open('about:blank', 'previewWinSB2', 'resizable=no,scrollbars=yes,menubar=no,toolbar=no,directories=no,location=no,status=no');
document.TheForm2.target = "previewWinSB2";
document.TheForm2.submit();
return true;
}
}
/* End */
/*Combo-Box Viewer script- Created by and © Dynamicdrive.comVisit http://www.dynamicdrive.com/ for this script and more This notice MUST stay intact for legal use*/
if (document.getElementById) {
document.write('\n');
}
function contractall() {
if (document.getElementById) {
var inc=0;
while (document.getElementById("dropmsg"+inc)) {
document.getElementById("dropmsg"+inc).style.display="none";
inc++;
}
}
}
function expandone() {
if (document.getElementById) {
var selectedItem=document.TheForm.dropmsgoption.selectedIndex;
contractall();
document.getElementById("dropmsg"+selectedItem).style.display="block";
}
}
if (window.addEventListener) {
window.addEventListener("load", expandone, false);
}
else if (window.attachEvent) {
window.attachEvent("onload", expandone);
}
/* END */
/* Positions Pop-up on the screen */
var version4 = (navigator.appVersion.charAt(0) == "4");
var popupHandle;
function closePopup() {
if(popupHandle !== null && !popupHandle.closed)
{popupHandle.close();}
}
function displayPopup(position,url,name,height,width,evnt) {
// position=1 POPUP: makes screen display up and/or left, down and/or right
// depending on where cursor falls and size of window to open
// position=2 CENTER: makes screen fall in center
var properties = "toolbar = 0, scrollbars = 1, location = 0, height = " + height;
properties = properties + ", width=" + width;
var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
if(navigator.appName == "Microsoft Internet Explorer") {
screenY = document.body.offsetHeight;
screenX = window.screen.availWidth;
}
else {
screenY = window.outerHeight;
screenX = window.outerWidth;
}
if(position == 1) {
// if POPUP not CENTER
cursorX = evnt.screenX;
cursorY = evnt.screenY;
padAmtX = 10;
padAmtY = 10;
if((cursorY + height + padAmtY) > screenY) {
// make sizes a negative number to move left/up
padAmtY = (-30) + (height * -1);
// if up or to left, make 30 as padding amount
}
if((cursorX + width + padAmtX) > screenX) {
padAmtX = (-30) + (width * -1);
// if up or to left, make 30 as padding amount
}
if(navigator.appName == "Microsoft Internet Explorer") {
leftprop = cursorX + padAmtX;
topprop = cursorY + padAmtY;
}
else {
leftprop = (cursorX - pageXOffset + padAmtX);
topprop = (cursorY - pageYOffset + padAmtY);
}
}
else {
leftvar = (screenX - width) / 2;
rightvar = (screenY - height) / 2;
if(navigator.appName == "Microsoft Internet Explorer") {
leftprop = leftvar;
topprop = rightvar;
}
else {
leftprop = (leftvar - pageXOffset);
topprop = (rightvar - pageYOffset);
}
}
if(evnt !== null) {
properties = properties + ", left = " + leftprop;
properties = properties + ", top = " + topprop;
}
closePopup();
popupHandle = open(url,name,properties);
}
/* End */
/* Validates email */
function checkEmailAddress(field) {
// Note: The next expression must be all on one line...
//allow no spaces, linefeeds, or carriage returns!
var Email = field.value;
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\..{2,2}))$)\b/gi);
if (goodEmail) {
good = true;
}
else if (Email.length <1) {
good = true;
}
else {
jAlert('Please Enter a Valid Email Address.');
field.focus();
field.select();
good = false;
}
}
/* Check for completed fields and call CHECKEMAIL */
function sendOff()
{
fnmcheck = document.TheForm.Name.value;
if (fnmcheck.length <1) {
jAlert('Please Enter a Name.');
return;
}
passcheck = document.TheForm.Password.value;
if (passcheck.length <1) {
jAlert('Please Enter a Password.');
return;
}
good = false;
checkEmailAddress(document.TheForm.Employee_id);
if ((document.TheForm.Employee_id.value == document.TheForm.Employee_idx.value)&&(good)) {
// This is where you put your action
// if name and email addresses are good.
document.TheForm.submit();
}
if ((document.TheForm.Employee_id.value !== document.TheForm.Employee_idx.value)&&(good)) {
jAlert('Both Email Address Entries Must Match.');
}
}
/* end */
/* Check for completed fields and call CHECKEMAIL */
function EditAssociate() {
fnmcheck = document.TheForm.Name.value;
if (fnmcheck.length <1) {
jAlert('Please Enter a Name.');
return;
}
passcheck = document.TheForm.Password.value;
if (passcheck.length <1) {
jAlert('Please Enter a Password.');
return;
}
good = false;
checkEmailAddress(document.TheForm.Associate_id);
if ((document.TheForm.Associate_id.value == document.TheForm.Associate_idx.value)&&(good)) {
// This is where you put your action
// if name and email addresses are good.
document.TheForm.submit();
}
if ((document.TheForm.Associate_id.value != document.TheForm.Associate_idx.value)&&(good)) {
jAlert('Both Email Address Entries Must Match.');
}
}
/* end */
function AdminEstimateWindow() {
displayPopup(1,'previewWinA1','previewWinA1',200,380,(version4 ? event : null));
document.CreatePlan.target = "previewWinA1"; // Open in a new window
document.CreatePlan.submit();
return true;
}
/* My Associate Users ADD NEW Button */
function OnMyAssoc0() {
document.f.action = "Page_Index.php?Page=Change_Membership#associate";
document.f.target = "_self";
document.f.submit();
return true;
}
function enableAutoDebit1() {
if (document.getElementById('TestMode').value == "true") {
jAlert('Test Mode will allow you to run test transactions (the transactions do not get processed).\n\nWhile in Test Mode, you can still enter clients, however you must be in Live Mode in order to schedule real auto-debits.\n\nAuto-Debits created while in Test Mode will NOT become live when Live Mode is activated. Please note that you cannot run Card-Present Swiped transactions while in test mode.');
}
if (document.getElementById('TestMode').value == "false") {
jAlert('Live Mode requires an active Internet Merchant Account. If you do not have one, contact us by the Live Support link.\n\nTransactions created while in Test Mode will NOT be processed when Live Mode is turned on.');
}
}
/* Purchase Order VIEW Button */
function OnbuttonPO1() {
if (document.CreatePurchaseOrder.SOID.value == 0) {
jAlert('Select Sales Order First');
return false;
}
else if (document.CreatePurchaseOrder.Delivery.value == 0) {
jAlert('Select Delivery Method First');
return false;
}
else {
document.CreatePurchaseOrder.action = "Page_Retail_Purchase_Order_View.inc.php";
window.open("about:blank", "previewWinSO1", "width=800,height=600,left=10,top=10,location=no,toolbar=yes,menubar=yes,scrollbars=yes,resizable=no");
document.CreatePurchaseOrder.target = "previewWinSO1"; // Open in a new window
document.CreatePurchaseOrder.submit();
return true;
}
}
/* Purchase Order AUTO_DEBIT Button */
function OnbuttonPO2() {
if (document.CreatePurchaseOrder.SOID.value == 0) {
jAlert('Select Sales Order First');
return false;
}
else if (document.CreatePurchaseOrder.id.value == 0) {
jAlert('Attach Client Account First');
return false;
}
else if (document.CreatePurchaseOrder.Delivery.value == 0) {
jAlert('Select Delivery Method First');
return false;
}
else {
document.CreatePurchaseOrder.action = "Page_Auto_Debit_Scheduler_1b.inc.php";
window.open("about:blank", "previewWinPO1", "width=800,height=600,left=10,top=10,location=no,toolbar=yes,menubar=yes,scrollbars=yes,resizable=no");
document.CreatePurchaseOrder.target = "previewWinPO1"; // Open in a new window
document.CreatePurchaseOrder.submit();
return true;
}
}
/* Purchase Order ADD NEW Button */
function OnbuttonPO3() {
document.CreatePurchaseOrder.action = "?Page=Purchase_Order_New";
document.CreatePurchaseOrder.target = "_self";
document.CreatePurchaseOrder.submit();
return true;
}
/* Purchase Order EDIT Button */
function OnbuttonPO4() {
if (document.CreatePurchaseOrder.SOID.value == 0) {
jAlert('Select Sales Order First');
return false;
}
else {
document.CreatePurchaseOrder.action = "?Page=Purchase_Order_Edit";
document.CreatePurchaseOrder.target = "_self";
document.CreatePurchaseOrder.submit();
return true;
}
}
/* Purchase Order COPY Button */
function OnbuttonPO5() {
if (document.CreatePurchaseOrder.SOID.value == 0) {
jAlert('Select Sales Order First');
return false;
}
else {
document.CreatePurchaseOrder.action = "?Page=Purchase_Order_Copy";
document.CreatePurchaseOrder.target = "_self";
document.CreatePurchaseOrder.submit();
return true;
}
}
/* Purchase Order DELETE Button */
function OnbuttonPO6() {
if (document.CreatePurchaseOrder.SOID.value == 0) {
jAlert('Select Sales Order First');
return false;
}
else {
jConfirm('Are you sure you want to permanantly delete this Sales Order?', 'Delete Sales Order', function(agree) {
if (agree) {
document.CreatePurchaseOrder.action = "?Page=Purchase_Orders&Action=Delete";
document.CreatePurchaseOrder.target = "_self";
document.CreatePurchaseOrder.submit();
return true;
}
else {
return false;
}
});
}
}
/* Purchase Order CHARGE Button */
function OnbuttonPO7() {
if (document.CreatePurchaseOrder.SOID.value == 0) {
jAlert('Select Sales Order First');
return false;
}
else if (document.CreatePurchaseOrder.id.value == 0) {
jAlert('Attach Client Account First');
return false;
}
else if (document.CreatePurchaseOrder.Delivery.value == 0) {
jAlert('Select Delivery Method First');
return false;
}
else {
document.CreatePurchaseOrder.action = "Page_Virtual_Terminal_1.inc.php";
window.open("about:blank", "previewWinVT1", "width=800,height=600,left=10,top=10,location=no,toolbar=yes,menubar=yes,scrollbars=yes,resizable=no");
document.CreatePurchaseOrder.target = "previewWinVT1"; // Open in a new window
document.CreatePurchaseOrder.submit();
return true;
}
}
/* Purchase Order ARCHIVE Button */
function OnbuttonPO8() {
if (document.CreatePurchaseOrder.SOID.value == 0) {
jAlert('Select Sales Order First');
return false;
}
else {
document.CreatePurchaseOrder.action = "?Page=Purchase_Orders&Action=Archive";
document.CreatePurchaseOrder.target = "_self";
document.CreatePurchaseOrder.submit();
return true;
}
}
/* Cash Plan Editor Save Button */
function EditPlanSave(which) {
if (checkrequired(which)) {
document.f.action = "include/content/pages/page_processing/Process_Saved_Plan_Edit.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
else {
return false;
}
}
/* Cash Plan Editor Copy Button */
function EditPlanCopy(which) {
if (checkrequired(which)) {
if (confirm('Are you sure you want to make a copy of this Cash Plan?')) {
document.f.action = "include/content/pages/page_processing/Process_Saved_Plan_Copy.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
else {
return false;
}
}
else {
return false;
}
}
/* Cash Plan Calculator ADD NEW PLAN Button */
function OnButton0() {
document.CreatePlan.action = "?Page=Cash_Plan_Calculator_Add_New_Plan_Page_1";
document.CreatePlan.target = "_self";
document.CreatePlan.submit();
return true;
}
/* Cash Plan Calculator OPEN PLAN Button For filming width=837,height=683,left=173,top=0 */
function OnButton1() {
if (document.CreatePlan.PlanID.value == 0) {
jAlert('Select Plan Name First');
return false;
}
else {
var iWidth = 850;
var iHeight = 700;
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
pCenterWin = window.open("about:blank", "previewWinCP1", "height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pCenterWin.resizeTo (iWidth, iHeight);
pCenterWin.moveTo (xPos, yPos);
document.CreatePlan.action = "Page_Cash_Plan.inc.php";
document.CreatePlan.target = "previewWinCP1";
document.CreatePlan.submit();
return true;
}
}
/* Cash Plan Calculator EDIT PLAN Button */
function OnButton3() {
if (document.CreatePlan.PlanID.value == 0) {
jAlert('Select Plan Name First');
return false;
}
else {
document.CreatePlan.action = "?Page=Saved_Plan_Edit";
document.CreatePlan.target = "_self";
document.CreatePlan.submit();
return true;
}
}
/* Cash Plan Calculator COPY PLAN Button */
function OnButton4() {
if (document.CreatePlan.PlanID.value == 0)
{
jAlert('Select Plan Name First');
return false;
}
else {
document.CreatePlan.action = "?Page=Saved_Plan_Copy";
document.CreatePlan.target = "_self";
document.CreatePlan.submit();
return true;
}
}
/* ash Plan Calculator DELETE Button */
function OnButton5() {
if (document.CreatePlan.PlanID.value == 0) {
jAlert('Select Plan Name First');
return false;
}
else {
jConfirm('Are you sure you want to permanantly delete this Cash Plan?', 'Delete Cash Plan', function(agree) {
if (agree) {
document.CreatePlan.action = "?Page=Cash_Plan_Calculator&action=Delete";
document.CreatePlan.target = "_self";
document.CreatePlan.submit();
return true;
}
else {
return false;
}
});
}
}
/* Cash Plan Calculator ARCHIVE PLAN Button */
function OnButton5b() {
if (document.CreatePlan.PlanID.value == 0) {
jAlert('Select Plan Name First');
return false;
}
else {
jConfirm('Click OK to Archive this Cash Plan.', 'Archive Cash Plan', function(agree) {
if (agree) {
document.CreatePlan.action = "?Page=Cash_Plan_Calculator&action=Archive";
document.CreatePlan.target = "_self";
document.CreatePlan.submit();
return true;
}
else {
return false;
}
});
}
}
/* Cash Plan Calculator SCHEDULER Button */
function OnButton6a() {
if (document.CreatePlan.PlanID.value == 0) {
jAlert('Select Plan Name First');
return false;
}
else if (document.CreatePlan.id.value == 0) {
jAlert('Select Client Name First');
return false;
}
else {
var iWidth = 800;
var iHeight = 700;
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
pCenterWin = window.open("about:blank", "previewWinCP6", "height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pCenterWin.resizeTo (iWidth, iHeight);
pCenterWin.moveTo (xPos, yPos);
document.CreatePlan.action = "Page_Cash_Plan_Scheduler.inc.php";
document.CreatePlan.target = "previewWinCP6";
document.CreatePlan.submit();
return true;
}
}
/* View Patient Info Button */
function OnButton7() {
if (document.f.id.value == 0) {
jAlert('Select Account Name First');
return false;
}
else {
var iWidth = 900;
var iHeight = 700;
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
pCenterWin = window.open("about:blank", "previewWin2", "height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pCenterWin.resizeTo (iWidth, iHeight);
pCenterWin.moveTo (xPos, yPos);
document.f.action = "addeindex.blank.php?page=patient_info";
document.f.target = "previewWin2";
document.f.submit();
return true;
}
}
/* Cash Plan Calculator SCHEDULER Button */
function OnButton8() {
if (document.f.id.value == 0) {
jAlert('Select Account Name First');
return false;
}
else {
document.f.action = "Page_Cash_Plan_Scheduler_2.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
}
/* End */
/* ADS */
function enableAutoDebit() {
if (document.f.duplicate.value == "No") {
document.f.submit1.disabled=true;
}
if (document.f.duplicate.value == "Yes") {
document.f.submit1.disabled=false;
}
}
function enableAutoDebit2() {
document.f.submit1.disabled=true;
}
/* AUTO-DEBIT SCHEDULER Button */
function OnButton9() {
if (document.f.id.value == 0) {
jAlert('Attach Account Name First');
return false;
}
else if (document.f.Amount.value == 0) {
jAlert('Must Enter $ Amount');
return false;
}
else if ((document.f.Number.value == 0) && (document.f.IndefiniteOn.checked == false)) {
jAlert('Must Select Number of Payments');
return false;
}
else {
document.f.action = "Page_Auto_Debit_Scheduler_2..php";
document.f.target = "_self";
document.f.submit();
return true;
}
}
/* End */
/* Shop & Ship SCHEDULER Page 2 Button */
function OnButton9c() {
if ((document.f.Number.value == 0) && (document.f.IndefiniteOn.checked == false)) {
jAlert('Must Select Number of Shipments');
return false;
}
else {
document.f.action = "Page_Auto_Debit_Scheduler_2b.inc.php";
document.f.target = "_self";
document.f.submit();
}
return true;
}
/* End */
/* AUTO-DEBIT SCHEDULER Button */
function OnButton9b() {
jConfirm('This Preview does NOT schedule the Auto-Debit. Click OK to Preview. To Schedule the Auto-Debit, click Cancel, then click the Next Step button.', 'Preview', function(agree) {
if (agree) {
var iWidth = 800;
var iHeight = 700;
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
pCenterWin = window.open("about:blank", "previewWin3", "height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pCenterWin.resizeTo (iWidth, iHeight);
pCenterWin.moveTo (xPos, yPos);
document.f.action = "Process_Auto_Debit_Previewer_Results.inc.php";
document.f.target = "previewWin3";
document.f.submit();
return true;
}
else {
return false;
}
});
}
/* End */
/* Virtual Terminal Page 1 Button */
function OnButton10() {
if (document.f.id.value == 0) {
jAlert('Attach Account Name First');
return false;
}
else {
document.f.action = "Page_Virtual_Terminal_2..php";
document.f.target = "_self";
document.f.submit();
return true;
}
}
/* End */
/* Virtual Terminal Page 1 Button */
function OnButton10a() {
if (document.f.id.value == 0) {
jAlert('Attach Account Name First');
return false;
}
else {
document.f.action = "Page_Virtual_Terminal_2a.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
}
/* End */
/* Cash Plan Calculator SCHEDULER Reload Button */
function OnButton11a() {
document.f.action = "Page_Cash_Plan_Scheduler.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Cash Plan Calculator SCHEDULER Reload Button */
function OnButton11() {
document.f.action = "Page_Cash_Plan_Scheduler_1.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Cash Plan Calculator SCHEDULER Reload Button */
function OnButton11V2() {
document.f.action = "Page_Cash_Plan_Scheduler_1_V2.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Auto-Debit SCHEDULER Reload Button */
function OnButton12() {
document.f.action = "Page_Auto_Debit_Scheduler_1..php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Virtual Terminal Reload Button */
function OnButton13() {
document.f.action = "Page_Virtual_Terminal_1..php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Virtual Terminal Reload Button */
function OnButton13a() {
document.f.action = "Page_Virtual_Terminal_1a..php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Virtual Terminal Reload Button */
function OnButton13SSS() {
document.f.action = "Page_Virtual_Terminal_SSS..php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Virtual Terminal Reload Button */
function OnButton13TPS() {
document.f.action = "Page_TPS_Virtual_Terminal_12.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Virtual Terminal Page 3 Back Button */
function OnButton23() {
document.f.action = "Page_Virtual_Terminal_2..php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Virtual Terminal Page 3 Back Button */
function OnButton23TPS() {
document.f.action = "Page_TPS_Virtual_Terminal_12.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Virtual Terminal Reload Button */
function OnButton14() {
document.f.action = "Page_Auto_Debit_Viewer_2.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* View Patient Info Button */
function OnButton15() {
var iWidth = 900;
var iHeight = 700;
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
pCenterWin = window.open("about:blank", "previewWin4", "height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pCenterWin.resizeTo (iWidth, iHeight);
pCenterWin.moveTo (xPos, yPos);
document.f.action = "addeindex.blank.php?page=patient_add";
document.f.target = "previewWin4";
document.f.submit();
return true;
}
/* Declined Payment Rescheduler Button */
function OnButton16() {
document.f.action = "?Page=Auto_Debit_Rescheduler_1";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Auto-Debit Editor Back Button */
function OnButton17() {
document.f.action = "Page_Auto_Debit_Viewer_1.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Cash Plan Calculator SCHEDULER Reload Button */
function OnButton18() {
document.f.action = "Page_Cash_Plan_Scheduler_2.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Auto-Debit SCHEDULER Step 3 Back Button */
function OnButton19() {
document.f.action = "Page_Auto_Debit_Scheduler_2..php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Auto-Debit VIEWER Step 3 Back Button */
function OnButton20() {
document.f.action = "Page_Auto_Debit_Viewer_2.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Simple Swiper Back Button */
function OnButton21() {
document.f.action = "Page_Simple_Swiper_1.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Simple Swiper Back Button */
function OnButton21V2() {
document.f.action = "Page_Simple_Swiper_1.V2.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Simple Swiper Next Button */
function OnButton22() {
document.f.action = "Page_Simple_Swiper_2.inc.php";
document.f.target = "_self";
document.f.submit();
return true;
}
/* End */
/* Cash Plan Calculator DELETE PLAN Button */
function ListButton1() {
document.PlanSearch.action = "?Page=Cash_Plan_Calculator";
document.PlanSearch.target = "_self";
document.PlanSearch.submit();
return true;
}
/* End */
/* Cash Plan Calculator DELETE PLAN Button */
function ListButton2() {
document.PlanSearch.action = "Cash_Plan_Calculator_List.php";
window.open("about:blank", "previewWin", "width=300,height=600,left=0,top=0,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no");
document.PlanSearch.target = "previewWin"; // Open in a new window
document.PlanSearch.submit();
return true;
}
/* End */
/* Posted Payment Archive Button */
function ArchiveTrans() {
document.searching.action = "?Page=Patient_Orders&action=archive&Message=Successfully Archived";
document.searching.target = "_self";
document.searching.submit();
return true;
}
function ArchiveButton0() {
jConfirm('Are you sure you want to ARCHIVE ALL SELECTED?', 'Archive', function(agree) {
if (agree) {
document.searching.action = "?Page=Patient_Orders&action=archive&Message=Successfully Archived";
document.searching.target = "_self";
document.searching.submit();
return true;
}
else {
return false;
}
});
}
/* End */
/* Posted Payment Archive Button */
function ADStatusSaveButton0() {
jConfirm('Are you sure you want to SAVE ALL DATES?', 'Save Dates', function(agree) {
if (agree) {
document.Orders.action = "Page_Index.php?Page=Admin_Auto_Debit_Status&action=save&Message=Successfully Saved";
document.Orders.target = "_self";
document.Orders.submit();
return true;
}
else {
return false;
}
});
}
/* End */
/* Posted Payment Download Button */
function DownloadReport() {
document.searching.action = "?Page=Patient_Orders&action=download";
document.searching.target = "_self";
document.searching.submit();
return true;
}
function DownloadButton0() {
jConfirm('Click OK to DOWNLOAD REPORT?', 'Download', function(agree) {
if (agree) {
document.searching.action = "?Page=Patient_Orders&action=download";
document.searching.target = "_self";
document.searching.submit();
return true;
}
else {
return false;
}
});
}
/* End */
/* Posted Payment Download Button */
function DownloadButton1() {
jConfirm('Click OK to DOWNLOAD REPORT?', 'Download', function(agree) {
if (agree) {
document.searching.action = "?Page=Client_Export&action=download";
document.searching.target = "_self";
document.searching.submit();
return true;
}
else {
return false;
}
});
}
/* End */
/* Posted Payment Archive Button */
function BounceResetButton0() {
jConfirm('Are you sure you want to RESET ALL SELECTED?', 'Reset', function(agree) {
if (agree) {
document.searching.action = "?Page=Bounced_Emails&action=Reset&Message=Successfully Reset";
document.searching.target = "_self";
document.searching.submit();
return true;
}
else {
return false;
}
});
}
/* End */
/* Tool Mailer SEND Button */
function ToolMailerButton0() {
if (document.toolmailer.subject.value == '') {
jAlert('Must Enter Subject');
return false;
}
else {
jConfirm('Click OK To Send', 'Send', function(agree) {
if (agree) {
document.toolmailer.action = "index.php?page=job_status&action=send";
document.toolmailer.target = "_self";
document.toolmailer.submit();
return true;
}
else {
return false;
}
});
}
}
/* End */
/* Tool Mailer SAVE NEW Button */
function ToolMailerButton1() {
if (document.toolmailer.subject.value == '') {
jAlert('Must Enter Subject');
return false;
}
else {
document.toolmailer.action = "index.php?page=tool_mailer&action=savenew";
document.toolmailer.target = "_self";
document.toolmailer.submit();
return true;
}
}
/* End */
/* Tool Mailer UPDATE OLD Button */
function ToolMailerButton2() {
if (document.toolmailer.subject.value == '') {
jAlert('Must Enter Subject');
return false;
}
else {
document.toolmailer.action = "index.php?page=tool_mailer&action=saveold";
document.toolmailer.target = "_self";
document.toolmailer.submit();
return true;
}
}
/* End */
function PopUpCentered(sLoc,iWidth,iHeight) {
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
var randomnumber=Math.floor(Math.random()*11);
pCenterWin = randomnumber; //open pop wait screen
pCenterWin = window.open(sLoc,randomnumber,"height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pCenterWin.resizeTo (iWidth, iHeight);
pCenterWin.moveTo (xPos, yPos);
}
function PopUpCenteredTool(sLoc,iWidth,iHeight) {
var xPos = (screen.width/2) - (iWidth/2);
var yPos = (screen.height/2) - (iHeight/2);
var randomnumber=Math.floor(Math.random()*11);
pCenterToolWin = randomnumber; //open pop wait screen
pCenterToolWin = window.open(sLoc,randomnumber,"height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pCenterToolWin.resizeTo (iWidth, iHeight);
pCenterToolWin.moveTo (xPos, yPos);
}
/* Popup For Training Videos */
function popUpVideo(URL) {
day = new Date();
id = day.getTime();
var width = 655;
var height = 580;
var xPos = (screen.width/2)-(width/2);
var yPos = (screen.height/2)-(height/2);
var pWin = null; //open pop wait screen
pWin = window.open(URL, "pWin", "height=2, width=2, status=0, menubar=0, location=0, resizable=0, titlebar=0, scrollbars=0, top=0, left=0");
pWin.resizeTo(width, height);
pWin.moveTo(xPos, yPos);
}
/* End */
/* Popup for Video 0 - Cash Plan Calculator */
function video0() {
popupwin = window.open("video/CashPlanCalculator_wmv.php","","location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Video 1 - Insurance Visit Estimator */
function video1() {
popupwin = window.open("video/InsuranceVisitEst_1_wmv.php","","location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Video 2 - Target Collection Calculator */
function video2() {
popupwin = window.open("video/TargetCollectionCalculator_wmv.php","","location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Video 3 - Staff Bonus Calculator */
function video3() {
popupwin = window.open("video/StaffBonusCalc_wmv.htm","","location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Video 4 - Adding Employees */
function video4() {
popupwin = window.open("video/CreateUsers_0_wmv.htm","","location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Video 5 - CPC Default Settings */
function video5() {
popupwin = window.open("video/DefaultSettings_wmv.php","","location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Video 6 - CPC Getting Started */
function video6() {
popupwin = window.open("video/GettingStarted_8_wmv.php","","location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Video 5 - CPC Updates #1 */
function videoupdate() {
popupwin = window.open("video/updates1005-1_player.php","","left=10,top=10,width=800,height=620,location=0,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Teleclass 1 */
function teleclass01() {
popupwin = window.open("cpteleclass01.php","","width=405,height=425,top=30,left=75,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Teleclass 2 */
function teleclass02() {
popupwin = window.open("cpteleclass02.php","","width=405,height=425,top=30,left=75,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Teleclass 3 */
function teleclass03() {
popupwin = window.open("cpteleclass03.php","","width=405,height=425,top=30,left=75,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Teleclass 4 */
function teleclass04() {
popupwin = window.open("cpteleclass04.php","","width=405,height=425,top=30,left=75,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Teleclass 5 */
function teleclass05() {
popupwin = window.open("cpteleclass05.php","","width=405,height=425,top=30,left=75,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Teleclass 6 */
function teleclass06() {
popupwin = window.open("cpteleclass06.php","","width=405,height=425,top=30,left=75,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Audio Help 1 */
function faq01() {
popupwin = window.open("cpfaqcpcalcwithins.php","","width=405,height=350,top=30,left=75,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
/* Popup for Audio Help 2 */
function faq02() {
popupwin = window.open("cpfaqcpcalcsetup.php","","width=445,height=350,top=30,left=75,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
/* End */
function moyaltest() {
popupwin = window.open("moyaltest.htm","","width=500,height=550,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,top=10,left=15");
}
/* End */
function flueggetest() {
popupwin = window.open("flueggetest.htm","","width=500,height=550,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,top=10,left=15");
}
/* End */
function beardontest() {
popupwin = window.open("beardontest.htm","","width=500,height=550,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,top=10,left=15");
}
/* End */
function testimonialvideo() {
popupwin = window.open("testimonialvideo.htm","","width=240,height=180,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,top=270,left=285");
}
/* End */
function billingaddress() {
document.f.requiredBillingAddress.value = document.f.requiredAddress.value;
document.f.requiredBillingCity.value = document.f.requiredCity.value;
document.f.requiredBillingState.value = document.f.requiredState.value;
document.f.requiredBillingZip.value = document.f.requiredZip.value;
document.f.requiredBillingCountry.value = document.f.requiredCountry.value;
document.f.requiredBillingPhone.value = document.f.requiredPhone.value;
document.f.BillingFirstName.value = document.f.requiredFirstName.value;
document.f.BillingLastName.value = document.f.requiredLastName.value;
}
function billingaddresscheck() {
if (document.f.billingsame.checked == true) {
document.f.requiredBillingAddress.value = document.f.requiredAddress.value;
document.f.requiredBillingCity.value = document.f.requiredCity.value;
document.f.BillingState.value = document.f.State.value;
document.f.requiredBillingZip.value = document.f.requiredZip.value;
document.f.BillingCountry.value = document.f.Country.value;
document.f.requiredBillingPhone.value = document.f.requiredPhone.value;
document.f.BillingFirstName.value = document.f.requiredFirstName.value;
document.f.BillingLastName.value = document.f.requiredLastName.value;
}
else {
document.f.requiredBillingAddress.value = '';
document.f.requiredBillingCity.value = '';
document.f.BillingState.value = '';
document.f.requiredBillingZip.value = '';
document.f.BillingCountry.value = '';
document.f.requiredBillingPhone.value = '';
document.f.BillingFirstName.value = '';
document.f.BillingLastName.value = '';
}
}
function CopyToBillingAddress() {
if (document.f.billingsame.checked == true) {
document.f.Billing_Address.value = document.ClientInfo.address.value;
document.f.Billing_City.value = document.ClientInfo.city.value;
document.f.Billing_State.value = document.ClientInfo.state.value;
document.f.Billing_Zip.value = document.ClientInfo.zip.value;
document.f.Billing_Country.value = document.ClientInfo.country.value;
document.f.Billing_Phone.value = document.ClientInfo.phone.value;
document.f.Billing_First_Name.value = document.ClientInfo.fname.value;
document.f.Billing_Last_Name.value = document.ClientInfo.lname.value;
jAlert('Be sure to click the Save Button to save changes');
return false;
}
else {
document.f.Billing_Address.value = '';
document.f.Billing_City.value = '';
document.f.Billing_State.value = '';
document.f.Billing_Zip.value = '';
document.f.Billing_Country.value = '';
document.f.Billing_Phone.value = '';
document.f.Billing_First_Name.value = '';
document.f.Billing_Last_Name.value = '';
}
}
function DebitTypeDisable() {
if (document.f.DebitType.value == "Credit") {
document.getElementById('Credit').style.display = 'block';
document.getElementById('Bank').style.display = 'none';
document.f.submit1.disabled = false;
document.f.BillingName.disabled = false;
document.f.CreditCardType.disabled = false;
document.f.CreditCardNumber.disabled = false;
document.f.ExpMonth.disabled = false;
document.f.ExpYear.disabled = false;
document.f.CreditCardCode.disabled = false;
document.f.BillingFirstName.disabled = true;
document.f.BillingLastName.disabled = true;
document.f.BankName.disabled = true;
document.f.RoutingNumber.disabled = true;
document.f.AccountNumber.disabled = true;
document.f.BillingIDType.disabled = true;
document.f.BillingIDNumber.disabled = true;
document.f.BillingIDState.disabled = true;
}
if (document.f.DebitType.value == "Bank") {
document.getElementById('Credit').style.display = 'none';
document.getElementById('Bank').style.display = 'block';
document.f.submit1.disabled = false;
document.f.BillingName.disabled = true;
document.f.CreditCardType.disabled = true;
document.f.CreditCardNumber.disabled = true;
document.f.ExpMonth.disabled = true;
document.f.ExpYear.disabled = true;
document.f.CreditCardCode.disabled = true;
document.f.BillingFirstName.disabled = false;
document.f.BillingLastName.disabled = false;
document.f.BankName.disabled = false;
document.f.RoutingNumber.disabled = false;
document.f.AccountNumber.disabled = false;
document.f.BillingIDType.disabled = false;
document.f.BillingIDNumber.disabled = false;
document.f.BillingIDState.disabled = false;
}
if (document.f.DebitType.value == "") {
document.getElementById('Credit').style.display = 'none';
document.getElementById('Bank').style.display = 'none';
document.f.submit1.disabled = true;
document.f.BillingName.disabled = true;
document.f.CreditCardType.disabled = true;
document.f.CreditCardNumber.disabled = true;
document.f.ExpMonth.disabled = true;
document.f.ExpYear.disabled = true;
document.f.CreditCardCode.disabled = true;
document.f.BillingFirstName.disabled = true;
document.f.BillingLastName.disabled = true;
document.f.BankName.disabled = true;
document.f.RoutingNumber.disabled = true;
document.f.AccountNumber.disabled = true;
document.f.BillingIDType.disabled = true;
document.f.BillingIDNumber.disabled = true;
document.f.BillingIDState.disabled = true;
}
}
function showADSTraining(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0, resizable=1, width=750, height=670, top=10, left=20');");
}
/* Start Power Vendor Functions */
function DiscountAlert1() {
if ((document.discountform.ApplyDiscount.value == "Month") && (document.f.ChargeResellers.value == "Order"))
{
jAlert('ALERT: With Discounting Rules set to Monthly Volume, you cannot Charge Resellers By Purchase Order. To Charge By Purchase Order, either (1) change your Discounting Rules to By Purchase Order or (2) Delete your Discount Rules. Or just charge Resellers At Month End and leave your Discount Rules set to Monthly.');
document.f.ChargeResellers.value = "Month";
return false;
}
}
function DiscountAlert2() {
if ((document.discountform.ApplyDiscount.value == "Month") && (document.f.ChargeResellers.value == "Order")) {
jAlert('ALERT: When Charging Resellers By Purchase Order, you cannot apply Discounts by Monthly Volume. Either (1) apply Discounts By Purchase Order or (2) change how you Charge Resellers to At Month End.');
document.discountform.ApplyDiscount.value = "Order";
return false;
}
}
/* End Power Vendor Functions */
/* open pop up for Gateway Terms */
function showPopGateway(sLoc) {
var xPos = (screen.width/2)-(500/2);
var yPos = (screen.height/2)-(500/2);
var pWin = null; //open pop wait screen
pWin = window.open(sLoc,"pWin", "height=2,width=2,status=0,menubar=0,location=0,resizable=1,titlebar=0,scrollbars=1,top=0,left=0");
pWin.resizeTo(500, 500);
pWin.moveTo(xPos, yPos);
}
/* End */
function savechanges() {
if (document.f.account.checked !== true) {
document.f.account.checked = true;
for (var i = 0; i < document.f.elements.length; i++) {
var e = document.f.elements[i];
if ((e.type == 'checkbox') && (e.name == 'UpdateAD')) {
e.checked = true;
}
}
return true;
}
else {
return false;
}
}
/* End */
/* Start Link Tracker Functions */
function reemptyfield(sel) {
switch(sel) {
case 1: {
if(document.getElementById('chkURL1').checked == false) {
document.getElementById('URL1').value="";
}else {
document.getElementById('URL1').value='';
}
break;
}
case 2: {
if(document.getElementById('chkURL2').checked == false) {
document.getElementById('URL2').value="";
}else {
document.getElementById('http2').value= document.getElementById('http1').value;
document.getElementById('URL2').value= document.getElementById('URL1').value;
}
break;
}
case 3: {
if(document.getElementById('chkURL3').checked == false) {
document.getElementById('URL3').value=""
}else {
document.getElementById('http3').value= document.getElementById('http1').value;
document.getElementById('URL3').value= document.getElementById('URL1').value;
}
break;
}
}
}
function save(which) {
if(
document.getElementById('chkURL1').checked == false &
document.getElementById('chkURL2').checked == false &
document.getElementById('chkURL3').checked == false) {
jAlert('Please Enable one of the destination URLs.');
}
else if (checkrequired(which)) {
document.f.submit();
return true;
}
else {
return false;
}
}
function uncheckbox(sel) {
switch(sel) {
case 1: {
document.getElementById('chkURL1').checked=true;
break;
}
case 2: {
document.getElementById('chkURL2').checked=true;
break;
}
case 3: {
document.getElementById('chkURL3').checked=true;
break;
}
}
}
/* End Link Tracker Functions */
/* Start Coupon Functions */
function DiscountType(){
if (document.getElementById('Discount_Type').value == 'Percentage') {
document.getElementById('Amount').style.display = '';
document.getElementById('Percent').style.display = '';
document.getElementById('Dollar').style.display = 'none';
}
else if (document.getElementById('Discount_Type').value == 'Dollar') {
document.getElementById('Amount').style.display = '';
document.getElementById('Percent').style.display = 'none';
document.getElementById('Dollar').style.display = '';
}
else {
document.getElementById('Amount').style.display = 'none';
}
}
function CouponType(){
if (document.getElementById('Coupon_Type').value == 'Product') {
document.getElementById('P1').style.display = '';
document.getElementById('P2').style.display = '';
document.getElementById('C1').style.display = 'none';
document.getElementById('C2').style.display = 'none';
}
else if (document.getElementById('Coupon_Type').value == 'Category') {
document.getElementById('P1').style.display = 'none';
document.getElementById('P2').style.display = 'none';
document.getElementById('C1').style.display = '';
document.getElementById('C2').style.display = '';
}
else {
document.getElementById('P1').style.display = 'none';
document.getElementById('P2').style.display = 'none';
document.getElementById('C1').style.display = 'none';
document.getElementById('C2').style.display = 'none';
}
}
function LimitToGroup(){
if (document.getElementById('Limit_To_Group').value == 0) {
document.getElementById('G1').style.display = 'none';
document.getElementById('G2').style.display = 'none';
}
else if (document.getElementById('Limit_To_Group').value == 1) {
document.getElementById('G1').style.display = '';
document.getElementById('G2').style.display = '';
}
}
/* End Coupon Functions */
/* Limit Image Uploads to Image Files */
function LimitAttach(form, file) {
ImageExtArray = new Array(".gif", ".jpg", ".jpeg", ".png");
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < ImageExtArray.length; i++) {
if (ImageExtArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) form.submit();
else
jAlert('Please only upload files that end in types: '
+ (ImageExtArray.join(' ')) + '\nPlease select a new '
+ 'file to upload and submit again.');
}
/* End Limit Image Uploads to Image Files */
/* Limit Digital Uploads File Types*/
/* ".mp4", ".mov", ".wmv", ".avi", ".mpg", ".m4v" */
function LimitFileAttach(form, file) {
FileExtArray = new Array(".gif", ".jpg", ".jpeg", ".png", ".zip", ".pdf", ".doc", ".docx", ".ppt", ".pptx", ".odt", ".mp3" ,".m4a",".ogg", ".wav");
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < FileExtArray.length; i++) {
if (FileExtArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) form.submit();
else
jAlert('Please only upload files that end in types: '
+ (FileExtArray.join(' ')) + '\nPlease select a new '
+ 'file to upload and submit again.');
}
/* End Digital Upload File Types */
/* Number Format Start */
// mredkj.com
function NumberFormat(num, inputDecimal)
{
this.VERSION = 'Number Format v1.5.4';
this.COMMA = ',';
this.PERIOD = '.';
this.DASH = '-';
this.LEFT_PAREN = '(';
this.RIGHT_PAREN = ')';
this.LEFT_OUTSIDE = 0;
this.LEFT_INSIDE = 1;
this.RIGHT_INSIDE = 2;
this.RIGHT_OUTSIDE = 3;
this.LEFT_DASH = 0;
this.RIGHT_DASH = 1;
this.PARENTHESIS = 2;
this.NO_ROUNDING = -1
this.num;
this.numOriginal;
this.hasSeparators = false;
this.separatorValue;
this.inputDecimalValue;
this.decimalValue;
this.negativeFormat;
this.negativeRed;
this.hasCurrency;
this.currencyPosition;
this.currencyValue;
this.places;
this.roundToPlaces;
this.truncate;
this.setNumber = setNumberNF;
this.toUnformatted = toUnformattedNF;
this.setInputDecimal = setInputDecimalNF;
this.setSeparators = setSeparatorsNF;
this.setCommas = setCommasNF;
this.setNegativeFormat = setNegativeFormatNF;
this.setNegativeRed = setNegativeRedNF;
this.setCurrency = setCurrencyNF;
this.setCurrencyPrefix = setCurrencyPrefixNF;
this.setCurrencyValue = setCurrencyValueNF;
this.setCurrencyPosition = setCurrencyPositionNF;
this.setPlaces = setPlacesNF;
this.toFormatted = toFormattedNF;
this.toPercentage = toPercentageNF;
this.getOriginal = getOriginalNF;
this.moveDecimalRight = moveDecimalRightNF;
this.moveDecimalLeft = moveDecimalLeftNF;
this.getRounded = getRoundedNF;
this.preserveZeros = preserveZerosNF;
this.justNumber = justNumberNF;
this.expandExponential = expandExponentialNF;
this.getZeros = getZerosNF;
this.moveDecimalAsString = moveDecimalAsStringNF;
this.moveDecimal = moveDecimalNF;
this.addSeparators = addSeparatorsNF;
if (inputDecimal == null) {
this.setNumber(num, this.PERIOD);
} else {
this.setNumber(num, inputDecimal);
}
this.setCommas(true);
this.setNegativeFormat(this.LEFT_DASH);
this.setNegativeRed(false);
this.setCurrency(false);
this.setCurrencyPrefix('$');
this.setPlaces(2);
}
function setInputDecimalNF(val)
{
this.inputDecimalValue = val;
}
function setNumberNF(num, inputDecimal)
{
if (inputDecimal != null) {
this.setInputDecimal(inputDecimal);
}
this.numOriginal = num;
this.num = this.justNumber(num);
}
function toUnformattedNF()
{
return (this.num);
}
function getOriginalNF()
{
return (this.numOriginal);
}
function setNegativeFormatNF(format)
{
this.negativeFormat = format;
}
function setNegativeRedNF(isRed)
{
this.negativeRed = isRed;
}
function setSeparatorsNF(isC, separator, decimal)
{
this.hasSeparators = isC;
if (separator == null) separator = this.COMMA;
if (decimal == null) decimal = this.PERIOD;
if (separator == decimal) {
this.decimalValue = (decimal == this.PERIOD) ? this.COMMA : this.PERIOD;
} else {
this.decimalValue = decimal;
}
this.separatorValue = separator;
}
function setCommasNF(isC)
{
this.setSeparators(isC, this.COMMA, this.PERIOD);
}
function setCurrencyNF(isC)
{
this.hasCurrency = isC;
}
function setCurrencyValueNF(val)
{
this.currencyValue = val;
}
function setCurrencyPrefixNF(cp)
{
this.setCurrencyValue(cp);
this.setCurrencyPosition(this.LEFT_OUTSIDE);
}
function setCurrencyPositionNF(cp)
{
this.currencyPosition = cp
}
function setPlacesNF(p, tr)
{
this.roundToPlaces = !(p == this.NO_ROUNDING);
this.truncate = (tr != null && tr);
this.places = (p < 0) ? 0 : p;
}
function addSeparatorsNF(nStr, inD, outD, sep)
{
nStr += '';
var dpos = nStr.indexOf(inD);
var nStrEnd = '';
if (dpos != -1) {
nStrEnd = outD + nStr.substring(dpos + 1, nStr.length);
nStr = nStr.substring(0, dpos);
}
var rgx = /(\d+)(\d{3})/;
while (rgx.test(nStr)) {
nStr = nStr.replace(rgx, '$1' + sep + '$2');
}
return nStr + nStrEnd;
}
function toFormattedNF()
{
var pos;
var nNum = this.num;
var nStr;
var splitString = new Array(2);
if (this.roundToPlaces) {
nNum = this.getRounded(nNum);
nStr = this.preserveZeros(Math.abs(nNum));
} else {
nStr = this.expandExponential(Math.abs(nNum));
}
if (this.hasSeparators) {
nStr = this.addSeparators(nStr, this.PERIOD, this.decimalValue, this.separatorValue);
} else {
nStr = nStr.replace(new RegExp('\\' + this.PERIOD), this.decimalValue);
}
var c0 = '';
var n0 = '';
var c1 = '';
var n1 = '';
var n2 = '';
var c2 = '';
var n3 = '';
var c3 = '';
var negSignL = (this.negativeFormat == this.PARENTHESIS) ? this.LEFT_PAREN : this.DASH;
var negSignR = (this.negativeFormat == this.PARENTHESIS) ? this.RIGHT_PAREN : this.DASH;
if (this.currencyPosition == this.LEFT_OUTSIDE) {
if (nNum < 0) {
if (this.negativeFormat == this.LEFT_DASH || this.negativeFormat == this.PARENTHESIS) n1 = negSignL;
if (this.negativeFormat == this.RIGHT_DASH || this.negativeFormat == this.PARENTHESIS) n2 = negSignR;
}
if (this.hasCurrency) c0 = this.currencyValue;
} else if (this.currencyPosition == this.LEFT_INSIDE) {
if (nNum < 0) {
if (this.negativeFormat == this.LEFT_DASH || this.negativeFormat == this.PARENTHESIS) n0 = negSignL;
if (this.negativeFormat == this.RIGHT_DASH || this.negativeFormat == this.PARENTHESIS) n3 = negSignR;
}
if (this.hasCurrency) c1 = this.currencyValue;
}
else if (this.currencyPosition == this.RIGHT_INSIDE) {
if (nNum < 0) {
if (this.negativeFormat == this.LEFT_DASH || this.negativeFormat == this.PARENTHESIS) n0 = negSignL;
if (this.negativeFormat == this.RIGHT_DASH || this.negativeFormat == this.PARENTHESIS) n3 = negSignR;
}
if (this.hasCurrency) c2 = this.currencyValue;
}
else if (this.currencyPosition == this.RIGHT_OUTSIDE) {
if (nNum < 0) {
if (this.negativeFormat == this.LEFT_DASH || this.negativeFormat == this.PARENTHESIS) n1 = negSignL;
if (this.negativeFormat == this.RIGHT_DASH || this.negativeFormat == this.PARENTHESIS) n2 = negSignR;
}
if (this.hasCurrency) c3 = this.currencyValue;
}
nStr = c0 + n0 + c1 + n1 + nStr + n2 + c2 + n3 + c3;
if (this.negativeRed && nNum < 0) {
nStr = '' + nStr + '';
}
return (nStr);
}
function toPercentageNF()
{
nNum = this.num * 100;
nNum = this.getRounded(nNum);
return nNum + '%';
}
function getZerosNF(places)
{
var extraZ = '';
var i;
for (i=0; i= 0 ? Math.floor(val) : Math.ceil(val);
} else {
val = Math.round(val);
}
val = this.moveDecimalLeft(val);
return val;
}
function preserveZerosNF(val)
{
var i;
val = this.expandExponential(val);
if (this.places <= 0) return val;
var decimalPos = val.indexOf('.');
if (decimalPos == -1) {
val += '.';
for (i=0; i
function formatNumber(number)
{
var formatednumber = new NumberFormat(number).toFormatted();
return formatednumber;
}
/* Number Format End */