function specialPrice(basePrice){
 var p = basePrice+premium();
 return(p.toFixed(2));
}

function boldPrice(basePrice){
 return("<b><font color=\"#800000\">$"+specialPrice(basePrice)+"</font></b>");
}

function premium(){
 var curdate = new Date();
 var mday = curdate.getDate()-1;
 return(mday*2.41);
}

function dayofMonth(){
 var curdate = new Date();
 return(curdate)
}
 
function getPrice(fltCurPrice,fltNewPrice,strDate){
 var Today = new Date();
 var Date = new Date(strDate);
 var today = Today.getDate();
 var date = Date.getDate();
 if (date >= today)
  return(fltCurPrice);
 else 
  return(fltNewPrice);
}

function screenName(img,button,id){
 var btnText="";
 var capText="";
 i1 = new Image();
 i1.src="http://www.ordergen.com/2000/poscreen.gif";
 i2 = new Image();
 i2.src="http://www.ordergen.com/images/prodscrn.jpg";
 i3 = new Image();
 i3.src="http://www.ordergen.com/images/vendscrn.jpg";
 i4 = new Image();
 i4.src="http://www.ordergen.com/images/transcrn.jpg";
 i5 = new Image();
 i5.src="http://www.ordergen.com/images/statscrn.jpg";
 isource=img.src;
 if (isource.indexOf("poscreen.")>0){
  btnText="Next > Vendor List..."
  capText="A Product Listing Report";
  img.alt="Product Listing Report -- click to view Vendor Listing Report";
  img.src= i2.src;
 }
 else if (isource.indexOf("prodscrn.")>0){
  btnText="Next > Transaction Report...";
  capText="A Vendor Listing Report";
  img.alt="Vendor Listing Report -- click to view Transaction Listing Report";
  img.src= i3.src;
 }
 else if (isource.indexOf("vendscrn.")>0){
  btnText="Next > Order Status Report...";
  capText="A Transaction History Report";
  img.alt="Transaction Listing Report -- click to view Status Report";
  img.src= i4.src;
 }
 else if (isource.indexOf("transcrn.")>0){
  btnText="Next > Purchase Order...";
  capText="An Order Status Report";
  img.alt="Order Status Report -- click to view Purchase Order";
  img.src= i5.src;
 }
 else{
  btnText="Next > Product List...";
  capText="A Completed Purchase Order";
  img.alt="Purchase Order -- click to view Product List Report";
  img.src= i1.src;
 }
 if (button!=null)
  button.value=btnText;
 if (id!=null){
  capText="<b><font face=\"Verdana\" size=\"1\">"+capText+"</font></b><br/>&nbsp;";
  document.getElementById(id).innerHTML=capText;
 }
 return img.src;
} 
// -->

function askquestion(){
 void(0);
}

function norefunds(){
var msg="Version Tested ON Windows 98, ME, 2000, XP(SP1, SP2 & SP3), and Vista...\n\n";
msg+="This product costs $149.97. It is mailed on CD and it ";
msg+="includes a *permanent* license code. This product is ";
msg+="NON-Refundable.\n\n";
msg+="Please DO NOT purchase a CD + license if you have not yet ";
msg+="installed and tested a trial version on your computer. ";
msg+="Instead, you should order a 120-day trial on CD, and then ";
msg+="purchase a $129.97 permanent license code once you have ";
msg+="tested the software and are satisfied that it works properly ";
msg+="on your computer system, particularly if you are using Vista.\n\n";
msg+="You will be able to continue using any data you enter into ";
msg+="the trial version once you purchase a permanent license.\n\n";
msg+="\"OK\" to order CD + license, \"Cancel\" to order 120-day trial.";

return(window.confirm(msg));
}

function livehelp(v){
 showWindow('http://support.appliedanalyticsystems.com/cslivehelp/livehelp.php?department=2',640,480,'no');
 return true;
}

function securePurchase(s){
 purchase(s);
}

function purchase(s){
 if (s=='download')
  parent.document.location="https://www.paypal.com/xclick/business=sales%40sohosoftware.com&undefined_quantity=1&item_name=OrderGen+2000+Single-User+License+Instant+Download&item_number=4379&amount=129.97&cancel_return=http://www.ordergen.com/2000/&cn=Questions&currency_code=USD&lc=US";
 else if (s=='special')
  parent.document.location="https://www.paypal.com/xclick/business=sales%40sohosoftware.com&undefined_quantity=1&item_name=OrderGen+Single-User+License+September+2006+Pricing+Study+Instant+Download&item_number=4379&amount="+specialPrice(49.97)+"&cancel_return=http://www.ordergen.com/2000/&cn=Questions&currency_code=USD&lc=US";
 else  if (s=='unlimited')
  parent.document.location="https://www.paypal.com/xclick/business=sales%40sohosoftware.com&undefined_quantity=1&item_name=OrderGen+2000+Single-User+Unlimited-Department+License+by+Instant+Download&item_number=4380&amount=189.97&cancel_return=http://www.ordergen.com/2000/&cn=Questions&currency_code=USD&lc=US";
 else  if (s=='netcd')
  parent.document.location="https://www.paypal.com/xclick/business=sales%40sohosoftware.com&undefined_quantity=1&item_name=OrderGen+2000+Network+License+CD+Mailed+by+USPS&item_number=4381&amount=369.97&cancel_return=http://www.ordergen.com/2000/&cn=Questions&currency_code=USD&lc=US";
 else  if (s=='nettrial')
  parent.document.location="https://www.paypal.com/xclick/business=sales%40sohosoftware.com&undefined_quantity=1&item_name=OrderGen+2000+Network+Trial+CD+Mailed+by+USPS&item_number=4381-0&amount=34.97&cancel_return=http://www.ordergen.com/2000/&cn=Questions&currency_code=USD&lc=US";
 else {
  if (norefunds())
   parent.document.location="https://www.paypal.com/xclick/business=sales%40sohosoftware.com&undefined_quantity=1&item_name=OrderGen+2000+Single-User+License+CD+Mailed+by+USPS+(NON-Refundable)&item_number=4379c&amount=149.97&cancel_return=http://www.ordergen.com/2000/&cn=Questions&currency_code=USD&lc=US";
  else
   trial(s)
 } 
}  

function trial(s){
 if (s=='download')
  parent.document.location="https://www.paypal.com/xclick/business=sales%40sohosoftware.com&undefined_quantity=1&item_name=OrderGen+2000+One+Hundred+and+Twenty+Day+Trial+Instant+Download&item_number=4315-1&amount=14.95&cancel_return=http://www.ordergen.com/2000/&cn=Questions&currency_code=USD&lc=US";
 else  
  parent.document.location="https://www.paypal.com/xclick/business=sales%40sohosoftware.com&undefined_quantity=1&item_name=OrderGen+2000+One+Hundred+and+Twenty+Day+Trial+CD+Mailed+by+USPS&item_number=4315c&amount=19.95&cancel_return=http://www.ordergen.com/2000/&cn=Questions&currency_code=USD&lc=US";
}  

function downloadDemo(sKeys){
 document.location="http://www.aasdt.com/cgi-bin/track/download.cgi?site=ordgen2k.zip&keywords="+sKeys;
}