/* ----------------------------------------------------------------------------- * * File: /scripts/subscribe.js * Project: WaveTrack Website * Author: Dominique Kraus-Ahma - * Kraus-Ahma IT Consulting (dka@kraus-ahma.com) * Purpose: This script provides all javascript callbacks for the 'Subscription' template * History: 15.01.2011 14:06:49 - file created (dk@) * * NOTES: * ----------------------------------------------------------------------------- */ // ---- concates the returned shopping basket // function concatOrderBasket( aItems, aSubTotalUSD, aSubTotalEUR, szCurrency ){ if( 0 == aItems.length ){ return( '' ); } // if( 0 == aItems.length ) szHtmlOutput = ''; for( iIdx = 0; iIdx < aItems.length; iIdx++ ){ szItemPrice = 'USD' == szCurrency ? aItems[ iIdx ].priceUSD : aItems[ iIdx ].priceEUR; szFirstEntryClass = 0 == iIdx ? '' : ' class="newItem"'; szHtmlOutput = szHtmlOutput + '
X ' + aItems[ iIdx ].name + '

- Start ' + aItems[ iIdx ].start + '
- Period ' + aItems[ iIdx ].period; szHtmlOutput = -1 == aItems[ iIdx ].renew ? szHtmlOutput + '' + szItemPrice : szHtmlOutput + '
- Automatic renewal' + '' + szItemPrice; szHtmlOutput = szHtmlOutput + '

'; } /* for( iIdx = 0; iIdx < aItems.length(); iIdx++ ) */ szSubTotal = 'USD' == szCurrency ? aSubTotalUSD : aSubTotalEUR; szHtmlOutput = szHtmlOutput + 'Sub Total: ' + szSubTotal + ''; return( szHtmlOutput ); } // ---- function 'concatOrderBasket()' // ---- checking form field data() // function checkEWCompassData(){ var objForm = document.forms[ 'frmEWCompass' ]; var aPosMsg = new Array(); var aErrMessages = new Array(); var szMsgString = '