
    var quantityTmp = 0;
    var productDescs = new Array();
    productDescs['100'] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n<html><!-- InstanceBegin template=\"/Templates/otherpages.dwt\" codeOutsideHTMLIsLocked=\"false\" -->\n<head>\n<!-- InstanceBeginEditable name=\"doctitle\" -->\n<title>ActiveLoan License Options - Single Continuous Session</title>\n<!-- InstanceEndEditable --><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n<style type=\"text/css\">\n<!--\nbody {\n	background-color: #FFFFFF;\n	margin-left: 0px;\n	margin-top: 0px;\n	margin-right: 0px;\n	margin-bottom: 0px;\n	font-family: Verdana, Arial, Helvetica, sans-serif;\n	font-size: 12pt;\n	font-weight: normal;\n}\n-->\n</style>\n<link href=\"activeLoanStyles.css\" rel=\"stylesheet\" type=\"text/css\">\n<!-- InstanceBeginEditable name=\"head\" --><!-- InstanceEndEditable -->\n<script type=\"text/javascript\" src=\"qualifier.js\" ></script>\n</head>\n\n<body>\n<table width=\"800\"  border=\"0\" align=\"center\" cellspacing=\"0\" bordercolor=\"#CECFCE\">\n  <tr>\n    <td><div align=\"left\"><img src=\"images/activeLoan_txt.jpg\" width=\"363\" height=\"92\"></div>\n    </td>\n    <td><div align=\"right\"><img src=\"images/banner_right.jpg\" width=\"409\" height=\"126\" align=\"right\"></div></td>\n  </tr>\n  <tr>\n    <td colspan=\"2\">\n      <!-- InstanceBeginEditable name=\"body\" -->      <br>\n      <h1 class=\"prod_popup\">ActiveLoan Pre-paid Qualifier License Options</h1>\n      <h4 class=\"prod_popup\">Single Session</h4>\n      <p>The \"Single Session\" license allows you continuous access to the ActiveLoan Online Qualifier for between 1 and 8 hours, priced at $6.50/hour.</p>\n      <p>For example, let's say you purchase a 4-hour \"Single Session\" license.  If you then log in to the ActiveLoan Online Qualifier at 12:30pm, that 4-hour block will begin.  You will be able to access the ActiveLoan Online Qualifier continuously until 4:30pm, at which time your \"Single Session\" license will expire, and you will need to purchase another license.</p>\n      <!-- InstanceEndEditable --></td>\n  </tr>\n</table>\n</body>\n<!-- InstanceEnd --></html>\n";
    productDescs['101'] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n<html><!-- InstanceBegin template=\"/Templates/otherpages.dwt\" codeOutsideHTMLIsLocked=\"false\" -->\n<head>\n<!-- InstanceBeginEditable name=\"doctitle\" -->\n<title>ActiveLoan License Options - Block of 25 Sessions</title>\n<!-- InstanceEndEditable --><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n<style type=\"text/css\">\n<!--\nbody {\n	background-color: #FFFFFF;\n	margin-left: 0px;\n	margin-top: 0px;\n	margin-right: 0px;\n	margin-bottom: 0px;\n	font-family: Verdana, Arial, Helvetica, sans-serif;\n	font-size: 12pt;\n	font-weight: normal;\n}\n-->\n</style>\n<link href=\"activeLoanStyles.css\" rel=\"stylesheet\" type=\"text/css\">\n<!-- InstanceBeginEditable name=\"head\" --><!-- InstanceEndEditable -->\n<script type=\"text/javascript\" src=\"qualifier.js\" ></script>\n</head>\n\n<body>\n<table width=\"800\"  border=\"0\" align=\"center\" cellspacing=\"0\" bordercolor=\"#CECFCE\">\n  <tr>\n    <td><div align=\"left\"><img src=\"images/activeLoan_txt.jpg\" width=\"363\" height=\"92\"></div>\n    </td>\n    <td><div align=\"right\"><img src=\"images/banner_right.jpg\" width=\"409\" height=\"126\" align=\"right\"></div></td>\n  </tr>\n  <tr>\n    <td colspan=\"2\">\n      <!-- InstanceBeginEditable name=\"body\" -->      <br>\n      <h1 class=\"prod_popup\">ActiveLoan Pre-paid Qualifier License Options</h1>\n      <h4 class=\"prod_popup\">Block of 25</h4>\n      <p>The \"Block of 25\" license gives you 25 one-hour sessions priced at $6.00/Session, for a total of $150.00.</p>\n      <p>Each time you log in to the ActiveLoan Online Qualifier you begin 1 session (i.e. you \"use up\" 1 session), which gives you access to the Qualifier for 1 hour (eg. between 2:45pm and 3:45pm).  If you stay logged in to the Qualifier past the hour-mark, you use another of your pre-paid sessions, and so-on for as many hours as you wish to use the Online Qualifier.  Once you log out of the Qualifier, no more of your sessions are used until you log in again.</p>\n      <p>For example, let's say you buy a Block of 25 sessions.  If you then log in to the Online Qualifier at 11:23am, you are given access to the Qualifier for an hour (i.e. until 12:23pm), and your number of sessions remaining goes down by 1 (i.e. from 25 to 24).  If you do not log out before 12:23pm, you use up another session, and are now able to access the Qualifier until 1:23pm, and your number of sessions again decreased by 1 (from 24 to 23).  If you then log out of the Online Qualifier at 1:15pm, your number or remaining sessions stays at 23 until the next time you log in.</p>\n      <p>Please note also that your pre-paid sessions DO NOT expire, so you can buy as few or as many as you like, with the security of knowing that you will not have to use them up within a certain time period to get your money's worth.</p>\n      <!-- InstanceEndEditable --></td>\n  </tr>\n</table>\n</body>\n<!-- InstanceEnd --></html>\n";
    productDescs['102'] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n<html><!-- InstanceBegin template=\"/Templates/otherpages.dwt\" codeOutsideHTMLIsLocked=\"false\" -->\n<head>\n<!-- InstanceBeginEditable name=\"doctitle\" -->\n<title>ActiveLoan License Options - Block of 50 Sessions</title>\n<!-- InstanceEndEditable --><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n<style type=\"text/css\">\n<!--\nbody {\n	background-color: #FFFFFF;\n	margin-left: 0px;\n	margin-top: 0px;\n	margin-right: 0px;\n	margin-bottom: 0px;\n	font-family: Verdana, Arial, Helvetica, sans-serif;\n	font-size: 12pt;\n	font-weight: normal;\n}\n-->\n</style>\n<link href=\"activeLoanStyles.css\" rel=\"stylesheet\" type=\"text/css\">\n<!-- InstanceBeginEditable name=\"head\" --><!-- InstanceEndEditable -->\n<script type=\"text/javascript\" src=\"qualifier.js\" ></script>\n</head>\n\n<body>\n<table width=\"800\"  border=\"0\" align=\"center\" cellspacing=\"0\" bordercolor=\"#CECFCE\">\n  <tr>\n    <td><div align=\"left\"><img src=\"images/activeLoan_txt.jpg\" width=\"363\" height=\"92\"></div>\n    </td>\n    <td><div align=\"right\"><img src=\"images/banner_right.jpg\" width=\"409\" height=\"126\" align=\"right\"></div></td>\n  </tr>\n  <tr>\n    <td colspan=\"2\">\n      <!-- InstanceBeginEditable name=\"body\" -->      <br>\n      <h1 class=\"prod_popup\">ActiveLoan Pre-paid Qualifier License Options</h1>\n      <h4 class=\"prod_popup\">Block of 50</h4>\n      <p>The \"Block of 50\" license gives you 50 one-hour sessions priced at $5.50/Session, for a total of $275.00.</p>\n      <p>Each time you log in to the ActiveLoan Online Qualifier you begin 1 session (i.e. you \"use up\" 1 session), which gives you access to the Qualifier for 1 hour (eg. between 2:45pm and 3:45pm).  If you stay logged in to the Qualifier past the hour-mark, you use another of your pre-paid sessions, and so-on for as many hours as you wish to use the Online Qualifier.  Once you log out of the Qualifier, no more of your sessions are used until you log in again.</p>\n      <p>For example, let's say you buy a Block of 50 sessions.  If you then log in to the Online Qualifier at 11:23am, you are given access to the Qualifier for an hour (i.e. until 12:23pm), and your number of sessions remaining goes down by 1 (i.e. from 50 to 49).  If you do not log out before 12:23pm, you use up another session, and are now able to access the Qualifier until 1:23pm, and your number of sessions again decreased by 1 (from 49 to 48).  If you then log out of the Online Qualifier at 1:15pm, your number or remaining sessions stays at 48 until the next time you log in.</p>\n      <p>Please note also that your pre-paid sessions DO NOT expire, so you can buy as few or as many as you like, with the security of knowing that you will not have to use them up within a certain time period to get your money's worth.</p>\n      <!-- InstanceEndEditable --></td>\n  </tr>\n</table>\n</body>\n<!-- InstanceEnd --></html>\n";
    productDescs['103'] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n<html><!-- InstanceBegin template=\"/Templates/otherpages.dwt\" codeOutsideHTMLIsLocked=\"false\" -->\n<head>\n<!-- InstanceBeginEditable name=\"doctitle\" -->\n<title>ActiveLoan License Options - Block of 100 Sessions</title>\n<!-- InstanceEndEditable --><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n<style type=\"text/css\">\n<!--\nbody {\n	background-color: #FFFFFF;\n	margin-left: 0px;\n	margin-top: 0px;\n	margin-right: 0px;\n	margin-bottom: 0px;\n	font-family: Verdana, Arial, Helvetica, sans-serif;\n	font-size: 12pt;\n	font-weight: normal;\n}\n-->\n</style>\n<link href=\"activeLoanStyles.css\" rel=\"stylesheet\" type=\"text/css\">\n<!-- InstanceBeginEditable name=\"head\" --><!-- InstanceEndEditable -->\n<script type=\"text/javascript\" src=\"qualifier.js\" ></script>\n</head>\n\n<body>\n<table width=\"800\"  border=\"0\" align=\"center\" cellspacing=\"0\" bordercolor=\"#CECFCE\">\n  <tr>\n    <td><div align=\"left\"><img src=\"images/activeLoan_txt.jpg\" width=\"363\" height=\"92\"></div>\n    </td>\n    <td><div align=\"right\"><img src=\"images/banner_right.jpg\" width=\"409\" height=\"126\" align=\"right\"></div></td>\n  </tr>\n  <tr>\n    <td colspan=\"2\">\n      <!-- InstanceBeginEditable name=\"body\" -->      <br>\n      <h1 class=\"prod_popup\">ActiveLoan Pre-paid Qualifier License Options</h1>\n      <h4 class=\"prod_popup\">Block of 100</h4>\n      <p>The \"Block of 100\" license gives you 100 one-hour sessions priced at $5.00/Session, for a total of $500.00.</p>\n      <p>Each time you log in to the ActiveLoan Online Qualifier you begin 1 session (i.e. you \"use up\" 1 session), which gives you access to the Qualifier for 1 hour (eg. between 2:45pm and 3:45pm).  If you stay logged in to the Qualifier past the hour-mark, you use another of your pre-paid sessions, and so-on for as many hours as you wish to use the Online Qualifier.  Once you log out of the Qualifier, no more of your sessions are used until you log in again.</p>\n      <p>For example, let's say you buy a Block of 100 sessions.  If you then log in to the Online Qualifier at 11:23am, you are given access to the Qualifier for an hour (i.e. until 12:23pm), and your number of sessions remaining goes down by 1 (i.e. from 100 to 99).  If you do not log out before 12:23pm, you use up another session, and are now able to access the Qualifier until 1:23pm, and your number of sessions again decreased by 1 (from 99 to 98).  If you then log out of the Online Qualifier at 1:15pm, your number or remaining sessions stays at 98 until the next time you log in.</p>\n      <p>Please note also that your pre-paid sessions DO NOT expire, so you can buy as few or as many as you like, with the security of knowing that you will not have to use them up within a certain time period to get your money's worth.</p>\n      <!-- InstanceEndEditable --></td>\n  </tr>\n</table>\n</body>\n<!-- InstanceEnd --></html>\n";
    productDescs['104'] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n<html><!-- InstanceBegin template=\"/Templates/otherpages.dwt\" codeOutsideHTMLIsLocked=\"false\" -->\n<head>\n<!-- InstanceBeginEditable name=\"doctitle\" -->\n<title>ActiveLoan License Options - Block of 500 Sessions</title>\n<!-- InstanceEndEditable --><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n<style type=\"text/css\">\n<!--\nbody {\n	background-color: #FFFFFF;\n	margin-left: 0px;\n	margin-top: 0px;\n	margin-right: 0px;\n	margin-bottom: 0px;\n	font-family: Verdana, Arial, Helvetica, sans-serif;\n	font-size: 12pt;\n	font-weight: normal;\n}\n-->\n</style>\n<link href=\"activeLoanStyles.css\" rel=\"stylesheet\" type=\"text/css\">\n<!-- InstanceBeginEditable name=\"head\" --><!-- InstanceEndEditable -->\n<script type=\"text/javascript\" src=\"qualifier.js\" ></script>\n</head>\n\n<body>\n<table width=\"800\"  border=\"0\" align=\"center\" cellspacing=\"0\" bordercolor=\"#CECFCE\">\n  <tr>\n    <td><div align=\"left\"><img src=\"images/activeLoan_txt.jpg\" width=\"363\" height=\"92\"></div>\n    </td>\n    <td><div align=\"right\"><img src=\"images/banner_right.jpg\" width=\"409\" height=\"126\" align=\"right\"></div></td>\n  </tr>\n  <tr>\n    <td colspan=\"2\">\n      <!-- InstanceBeginEditable name=\"body\" -->      <br>\n      <h1 class=\"prod_popup\">ActiveLoan Pre-paid Qualifier License Options</h1>\n      <h4 class=\"prod_popup\">Block of 500</h4>\n      <p>The \"Block of 100\" license gives you 500 one-hour sessions priced at $4.40/Session, for a total of $2,200.00.</p>\n      <p>Each time you log in to the ActiveLoan Online Qualifier you begin 1 session (i.e. you \"use up\" 1 session), which gives you access to the Qualifier for 1 hour (eg. between 2:45pm and 3:45pm).  If you stay logged in to the Qualifier past the hour-mark, you use another of your pre-paid sessions, and so-on for as many hours as you wish to use the Online Qualifier.  Once you log out of the Qualifier, no more of your sessions are used until you log in again.</p>\n      <p>For example, let's say you buy a Block of 500 sessions.  If you then log in to the Online Qualifier at 11:23am, you are given access to the Qualifier for an hour (i.e. until 12:23pm), and your number of sessions remaining goes down by 1 (i.e. from 500 to 499).  If you do not log out before 12:23pm, you use up another session, and are now able to access the Qualifier until 1:23pm, and your number of sessions again decreased by 1 (from 499 to 498).  If you then log out of the Online Qualifier at 1:15pm, your number or remaining sessions stays at 498 until the next time you log in.</p>\n      <p>Please note also that your pre-paid sessions DO NOT expire, so you can buy as few or as many as you like, with the security of knowing that you will not have to use them up within a certain time period to get your money's worth.</p>\n      <!-- InstanceEndEditable --></td>\n  </tr>\n</table>\n</body>\n<!-- InstanceEnd --></html>\n";
    productDescs['105'] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n<html><!-- InstanceBegin template=\"/Templates/otherpages.dwt\" codeOutsideHTMLIsLocked=\"false\" -->\n<head>\n<!-- InstanceBeginEditable name=\"doctitle\" -->\n<title>ActiveLoan License Options - Extended Support Package</title>\n<!-- InstanceEndEditable --><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n<style type=\"text/css\">\n<!--\nbody {\n	background-color: #FFFFFF;\n	margin-left: 0px;\n	margin-top: 0px;\n	margin-right: 0px;\n	margin-bottom: 0px;\n	font-family: Verdana, Arial, Helvetica, sans-serif;\n	font-size: 12pt;\n	font-weight: normal;\n}\n-->\n</style>\n<link href=\"activeLoanStyles.css\" rel=\"stylesheet\" type=\"text/css\">\n<!-- InstanceBeginEditable name=\"head\" --><!-- InstanceEndEditable -->\n<script type=\"text/javascript\" src=\"qualifier.js\" ></script>\n</head>\n\n<body>\n<table width=\"800\"  border=\"0\" align=\"center\" cellspacing=\"0\" bordercolor=\"#CECFCE\">\n  <tr>\n    <td><div align=\"left\"><img src=\"images/activeLoan_txt.jpg\" width=\"363\" height=\"92\"></div>\n    </td>\n    <td><div align=\"right\"><img src=\"images/banner_right.jpg\" width=\"409\" height=\"126\" align=\"right\"></div></td>\n  </tr>\n  <tr>\n    <td colspan=\"2\">\n      <!-- InstanceBeginEditable name=\"body\" -->      <br>\n      <h1 class=\"prod_popup\">ActiveLoan Pre-paid Qualifier License Options</h1>\n      <h4 class=\"prod_popup\">Extended Support Package</h4>\n      <p>The \"Extended Support Package\" gives you access to unlimited technical support over the phone & through email for an entire year, priced at $199.00.</p>\n      <p>With the Extended Support Package, you are able to talk instantly<span class=\"requiredFieldMark\">*</span> to a real person about your issue, and are guaranteed priority status in having your issue resolved.  The same priority is given to any emails you send to <a href=\"mailto:support@transactive.com.au\" class=\"underlinelink\">support@transactive.com.au</a>.</p>\n      <p>Without the Extended Support license, you are still able to email any queries or problems to <a href=\"mailto:support@transactive.com.au\" class=\"underlinelink\">support@transactive.com.au</a>.</p>\n      <hr />\n      <p class=\"smallFooter\">(<span class=\"requiredFieldMark\">*</span>) - within business hours (9:00am - 5:00pm), Australian Eastern Standard Time (AEST)</p>\n      <!-- InstanceEndEditable --></td>\n  </tr>\n</table>\n</body>\n<!-- InstanceEnd --></html>\n";
    productDescs['106'] = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"http://www.w3.org/TR/html4/loose.dtd\">\n<html><!-- InstanceBegin template=\"/Templates/otherpages.dwt\" codeOutsideHTMLIsLocked=\"false\" -->\n<head>\n<!-- InstanceBeginEditable name=\"doctitle\" -->\n<title>ActiveLoan License Options - Block of 10 Sessions</title>\n<!-- InstanceEndEditable --><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n<style type=\"text/css\">\n<!--\nbody {\n	background-color: #FFFFFF;\n	margin-left: 0px;\n	margin-top: 0px;\n	margin-right: 0px;\n	margin-bottom: 0px;\n	font-family: Verdana, Arial, Helvetica, sans-serif;\n	font-size: 12pt;\n	font-weight: normal;\n}\n-->\n</style>\n<link href=\"activeLoanStyles.css\" rel=\"stylesheet\" type=\"text/css\">\n<!-- InstanceBeginEditable name=\"head\" --><!-- InstanceEndEditable -->\n<script type=\"text/javascript\" src=\"qualifier.js\" ></script>\n</head>\n\n<body>\n<table width=\"800\"  border=\"0\" align=\"center\" cellspacing=\"0\" bordercolor=\"#CECFCE\">\n  <tr>\n    <td><div align=\"left\"><img src=\"images/activeLoan_txt.jpg\" width=\"363\" height=\"92\"></div>\n    </td>\n    <td><div align=\"right\"><img src=\"images/banner_right.jpg\" width=\"409\" height=\"126\" align=\"right\"></div></td>\n  </tr>\n  <tr>\n    <td colspan=\"2\">\n      <!-- InstanceBeginEditable name=\"body\" -->      <br>\n      <h1 class=\"prod_popup\">ActiveLoan Pre-paid Qualifier License Options</h1>\n      <h4 class=\"prod_popup\">Block of 10</h4>\n      <p>The \"Block of 10\" license gives you 10 one-hour sessions priced at $9.90/Session, for a total of $99.00.</p>\n      <p>Each time you log in to the ActiveLoan Online Qualifier you begin 1 session (i.e. you \"use up\" 1 session), which gives you access to the Qualifier for 1 hour (eg. between 2:45pm and 3:45pm).  If you stay logged in to the Qualifier past the hour-mark, you use another of your pre-paid sessions, and so-on for as many hours as you wish to use the Online Qualifier.  Once you log out of the Qualifier, no more of your sessions are used until you log in again.</p>\n      <p>For example, let's say you buy a Block of 10 sessions.  If you then log in to the Online Qualifier at 11:23am, you are given access to the Qualifier for an hour (i.e. until 12:23pm), and your number of sessions remaining goes down by 1 (i.e. from 10 to 9).  If you do not log out before 12:23pm, you use up another session, and are now able to access the Qualifier until 1:23pm, and your number of sessions again decreased by 1 (from 9 to 8).  If you then log out of the Online Qualifier at 1:15pm, your number or remaining sessions stays at 8 until the next time you log in.</p>\n      <p>Please note also that your pre-paid sessions DO NOT expire, so you can buy as few or as many as you like, with the security of knowing that you will not have to use them up within a certain time period to get your money's worth.</p>\n      <!-- InstanceEndEditable --></td>\n  </tr>\n</table>\n</body>\n<!-- InstanceEnd --></html>\n";
    
    
    function submitForm()
    {
        if (checkSubmit())
        {
            document.purchaseform.submit();
        }
    }

    function checkSubmit()
    {
        if (!validate())
            return false;
        if (!confirmPurchase())
            return false;
        return true;
    }
    
    function validate()
    {
        setCheckboxValue(document.getElementById("supportCheckbox"),document.getElementById("supportValue"));
        var quantities = document.getElementsByName("quantity");
        var usernameObj = document.getElementById("username");
        
        var errMsg = "";
        var focusObj = null;
        
        if (usernameObj.value.length == 0 || usernameObj.value.toUpperCase() == usernameObj.value.toLowerCase())
        {
            errMsg += "\n * Please enter your ActiveLoan username";
            if (focusObj == null)
            {
                focusObj = usernameObj;
            }
        }
        
        for (var index = 0; index < quantities.length; index++)
        {
            var intVal = parseInt(quantities[index].value,10);
            if (isNaN(quantities[index].value) || intVal < 0)
            {
                errMsg += "\n * All quantities should be numbers that are at least zero (0)";
                if (focusObj == null)
                {
                    focusObj = quantities[index];
                }
                break;
            }
        }

        var termsCheckbox = document.getElementById("termsconds");
        if (!termsCheckbox.checked)
        {
            errMsg += "\n * You must indicate that you accept TransActive Systems' Terms and Conditions before you can continue.";
            if (focusObj == null)
            {
                focusObj = termsCheckbox;
            }
        }
        
        if (errMsg.length > 0)
        {
            errMsg = "Unable to submit purchase:" + errMsg;
            alert(errMsg);
            if (focusObj != null)
            {
                focusObj.focus();
                focusObj.select();
            }
            return false;
        }

        return true;
    }
    
    function confirmPurchase()
    {
        
        var products = document.getElementsByName("productid");
        var quantities = document.getElementsByName("quantity");
        var prices = document.getElementsByName("unitprice");
        var unitsize = document.getElementsByName("numunits");
        
        var confirmMsg = "";
        var total = 0.0;
        //alert(document.getElementById("100_desc").innerHTML);
        
        for (var index = 0; index < products.length; index++)
        {           
            var prodId = products[index].value;            
            var quan = parseInt(quantities[index].value,10);
            var desc = document.getElementById(prodId + "_desc").innerHTML;            
            var price = parseFloat(prices[index].value);
            var units = parseInt(unitsize[index].value,10);            
          //  var priceDesc = document.getElementById(prodId + "_unitprice").innerHTML;
                       
            if (quan > 0)
            {
                if ((index + 1) < products.length && units > 1)
                {
                    var queryMsg = "";
                    var nextProdId = products[index + 1].value;
                    var nextDesc = document.getElementById(nextProdId + "_desc").innerHTML;
                    var nextPrice = parseFloat(prices[index + 1].value);
                    var nextUnits = parseInt(unitsize[index + 1].value,10);
                   // var nextPriceDesc = document.getElementById(nextProdId + "_unitprice").innerHTML;
               /*     if (nextUnits > units)
                    {
                        if ((quan * units) >= nextUnits && price > nextPrice)
                        {
                            queryMsg += "You have chosen " + quan + " x " + desc + "\nIt would be cheaper to use the " + nextDesc + " product @ " + nextPriceDesc + " for some/all of your purchase.";
                            alert(queryMsg);
                        }
                    } */
                }
                
                var curPrice = price * units * quan;
                curPrice = roundToPlaces(curPrice,2);
                total += curPrice;
                if (parseInt(prodId,10) == 100)
                {
                    confirmMsg += "\n   " + quan + " Hour " + desc + " = $" + padZeros(curPrice,2);
                }
                else
                {
                    confirmMsg += "\n   " + quan + " x " + desc  + " = $" + padZeros(curPrice,2);
                }
            }
        }        
        if (confirmMsg.length > 0)
        {
            var totalStr = padZeros(total,2); 
            confirmMsg += "\n\nTotal (incl GST): $" + totalStr;
            confirmMsg = "Are you sure you would like to proceed with the following purchase?" + confirmMsg;
            if (confirm(confirmMsg))
            {
                return true;
            }
        }        
        return false;
    }
    
    function padZeros(inputDbl,numZeros)
    {
        var dblStr = String(inputDbl);
        if (dblStr.indexOf(".") < 0)
        {
            dblStr += ".";
        }
        for (index = dblStr.length - dblStr.indexOf(".") - 1; index < numZeros; index++)
        {
            dblStr += "0";
        }
        return dblStr;
    }
    
    function roundToPlaces(inputDbl,numPlaces)
    {
        tmpDbl = inputDbl * Math.pow(10,numPlaces);
        tmpDbl = Math.round(tmpDbl);
        tmpDbl = tmpDbl / Math.pow(10,numPlaces);
        return tmpDbl;
    }

    function setCheckboxValue(checkboxObj,hiddenObj)
    {
        if (checkboxObj.checked)
        {
            hiddenObj.value = 1;
        }
        else
        {
            hiddenObj.value = 0;
        }
    }

    function quantityFocus(textInputObj)
    {
        quantityTmp = textInputObj.value;
    }
    
    function quantityBlur(textInputObj)
    {
       validateQuantity(textInputObj);
       if (textInputObj.value != quantityTmp)
       {
           checkQuantities(textInputObj);
       }
    }
    
    function validateQuantity(textInputObj)
    {
        var quanVal = textInputObj.value;
        var quanValInt = parseInt(quanVal,10);
        if (isNaN(quanVal) || quanValInt < 0)
        {
            textInputObj.value = 0;
        }
        else
        {
            var quantities = document.getElementsByName("quantity");
            for (var index = 0; index < quantities.length; index++)
            {
                if (quantities[index] == textInputObj)
                {
                    var prodObj = document.getElementsByName("productid")[index];
                    if (parseInt(prodObj.value,10) == 100 && quanValInt > 8)
                    {
                        textInputObj.value = 8;
                    }
                }
            }
            textInputObj.value = String(parseInt(textInputObj.value,10));
        }
    }
    
    function checkQuantities(textInputObj)
    {
        var quantities = document.getElementsByName("quantity");
        for (var index = 0; index < quantities.length; index++)
        {
            var quan = parseInt(quantities[index].value,10);
            if (quantities[index] != textInputObj && quantities[index].type == "text" && quan != 0)
            {
                quantities[index].value = 0;
            }
            quan = parseInt(quantities[index].value,10);
            /*var curProduct = document.getElementsByName("productid")[index].value;
            if (parseInt(curProduct,10) == 100)
            {
                var unitPrice = parseFloat(document.getElementsByName("unitprice")[index].value);
                var totalPrice = roundToPlaces(unitPrice * quan,2);
                var newTotalPrice = "$" + String(padZeros(totalPrice,2));
                document.getElementById(curProduct + "_totalprice").innerHTML = newTotalPrice;
            }*/
        }
    }
    
    function openDetailWindow(productId)
    {
        var newWindow = window.open('','','location=no,menubar=no,statusbar=no,toolbar=no');
        newWindow.document.write(productDescs[productId]);
    }

