var description = new Array();
description[0] = "Our annual subscriptions to Business Analyst Online provide your best value: unlimited access to the reports and maps for one year. Buy an annual subscription if: <br><br>- You may order 20 or more reports and maps per year. <br><br>- You might research your markets and sites using different criteria and want to preserve your work.<br><br>- You want to run many site analyses and market analyses.";
description[1] = "With our new Day Pass subscription, you are a subscriber for a day.  Buy a Day Pass if:<br><br>- You need only about five reports and maps. <br><br>- You would like the option to research your markets and sites using different criteria.<br><br>- You know what information you want but may need to experiment with how to create it.";
description[2] = "Guests can purchase individual reports and maps with a credit card. Pricing starts at $35. Choose this option if: <br><br>- You order fewer than 20 reports per year.<br><br>- You prefer to pay for each individual report.<br><br>To enter our site as a Guest, please log in above. It’s easy to create your own account if you don’t have one already."; 
description[3] = "Trial subscriptions are available as well.  If you have visited us at a trade show or event and want to try out our site, click on the link to activate your trial.";
description[4] = "Place your mouse over any one of the links above to learn more about the different types of services that we offer.";

var descriptionE = new Array();
descriptionE[0] = "Our annual subscriptions to Business Analyst Online Europe provide your best value: unlimited access to the reports and maps for one year. Buy an annual subscription if: <br><br>- You may order 20 or more reports and maps per year. <br><br>- You might research your markets and sites using different criteria and want to preserve your work.<br><br>- You want to run many site analyses and market analyses.";
descriptionE[1] = "With our new Day Pass subscription, you are a subscriber for a day.  Buy a Day Pass if:<br><br>- You need only about five reports and maps. <br><br>- You would like the option to research your markets and sites using different criteria.<br><br>- You know what information you want but may need to experiment with how to create it.";
descriptionE[2] = "Guests can purchase individual reports and maps with a credit card. Pricing starts at $140. Choose this option if: <br><br>- You order fewer than 20 reports per year.<br><br>- You prefer to pay for each individual report.<br><br>To enter our site as a Guest, please log in above. It’s easy to create your own account if you don’t have one already."; 
descriptionE[3] = "Trial subscriptions are available as well.  If you have visited us at a trade show or event and want to try out our site, click on the link to activate your trial.";
descriptionE[4] = "Place your mouse over any one of the links above to learn more about the different types of services that we offer.";

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-215788-4");
pageTracker._trackPageview();
} catch(err) {}


function onLoadInitializer(){
  document.getElementById('password').onkeypress = function (e) {handleKeyPress(e,'submitFrmLogin')};
  document.frmLogin.username.focus();
}


function submitFrmLoginOrg(queryString){
  if(document.frmLogin.editaccount.checked) {
    document.frmLogin.editAcct.value = "checked";
    document.frmLogin.editAcct.disabled = false;
  }
  else {
    if(queryString != null && queryString.length > 0 && queryString != 'null') {
      document.frmLogin.ReturnUrl.value = document.frmLogin.ReturnUrl.value + '?' + queryString;
      document.frmLogin.FailUrl.value = document.frmLogin.FailUrl.value + '?' + queryString;

    }
  document.frmLogin.submit();
}
}

function submitFrmLogin(queryString){
  if(document.frmLogin.editaccount.checked) {
    document.frmLogin.editAcct.value = "checked";
    document.frmLogin.editAcct.disabled = false;
  }

    document.frmLogin.ReturnUrl.value = document.frmLogin.ReturnUrl.value;
    document.frmLogin.FailUrl.value = document.frmLogin.FailUrl.value;

 if (document.frmLogin.username.value.length == 0)
    alert("Please enter your Username.");
  else if (document.frmLogin.password.value.length == 0)
    alert("Please enter your Password");
  else {
    if(queryString != null && queryString.length > 0 && queryString != 'null') {
	  queryString = queryString.replace("errorCode","ec");
      document.frmLogin.ReturnUrl.value = document.frmLogin.ReturnUrl.value + '?' + queryString;
      document.frmLogin.FailUrl.value = document.frmLogin.FailUrl.value + '?' + queryString;
    }
    document.frmLogin.submit();
  }
}

function clickPickUpReportButton(){
  document.getElementById('pickUpReportButtonLink').onclick();
}

  var WINDOW_REPORTS = '';

function showPreviousReportsWindow(url){
      var email = document.getElementById('emailAddress').value;
      var orderNumber = document.getElementById('orderNumber').value;
      url += '?e=' + email + '&o=' + orderNumber;
      if (!WINDOW_REPORTS.closed && WINDOW_REPORTS.location){
        WINDOW_REPORTS.location.href = url;
      }
      else{
        WINDOW_REPORTS=window.open(url,'name','scrollbars=yes,width=500,height=500,resizable=yes');
        if (!WINDOW_REPORTS.opener) WINDOW_REPORTS.opener = self;
      }
	if (window.focus) {WINDOW_REPORTS.focus()}
	return false;
  }


function handleKeyPress(e,callFunction){
    var keycode;
    if (!e){
      e = window.event;
      keycode = e.keyCode;
    }else{
      keycode = e.which;
    }
    if(keycode == 13){
      window[callFunction]();
    }
    return true;
  }
