// affiliate.js
//

function writeCode (cType) {

//alert('in writeCode');

   var cHTML = "";
   var cDiv = '<hr width="90%">'

   var cCC = buildLink('http://a.websponsors.com/c/s=61350/c=25169/','Discover® Platinum Card - 0% Intro APR!','No-Annual-Fee, Up to 2% Cashback, 100% Fraud Protection, Up to $50,000 Credit Limit, and more.');  // Expires Aug 31, 2004
   cCC = cCC+buildLink('http://a.websponsors.com/c/s=61350/c=31018/','Cash Rewards MasterCard®','Earn 1% Cash Reward; 0% Intro APR* and No Annual Fee.');  // Expires Aug 20, 2004
   cCC = cCC+buildLink('http://a.websponsors.com/c/s=61350/c=30859/','5% Earnings GM Card','No annual fee, 0% APR Balance Transfers*, 5% Earnings from every purchase*</a>');  // Expires Feb 28, 2005


   var cEarn = buildLink('http://www.moneyiscoming.com/cgi/at.cgi?a=296793','How to Awaken the Millionaire Within','Learn the insider secrets of creating streams of income from your ideas!</a>');  // Affiliate - No Expiration\
   cEarn = cEarn+buildLink('http://a.websponsors.com/c/s=61350/c=38846/','Additional Income','Supplement your income without risking your money.</a>');  // Expires Feb 24, 2005
   cEarn = cEarn+buildLink('http://a.websponsors.com/c/s=61350/c=38854/','Increase Your Income','Why some people are 100x more successful and will make 1000x more than you do!');  // Expires Feb 24, 2005
   cEarn = cEarn+buildLink('http://a.websponsors.com/c/s=61350/c=38889/','Make Money - Work For Yourself','I will show you how to make 10x more money working for yourself.');  // Expires Feb 25, 2005

//var cDebt = '';
   var cDebt = buildLink('http://a.websponsors.com/c/s=61350/c=39466','Don’t consolidate debt. Eliminate it!','ONE minute is all it takes to get started. We can help you get out of debt for good!');  // Expires March 31, 2005

//var cMort = '';
   var cMort = buildLink('http://a.websponsors.com/c/s=61350/c=41937/','Bad Credit Loan Specialists','Find out what Pick A Mortgage can do for you!  Get free, no obligation quotes!');  // Expires Dec 31, 2004
   cMort = cMort+buildLink('http://a.websponsors.com/c/s=61350/c=3344/','Free Instant Mortgage Quotes','Free rate and payment quotes on refinance, cash-out, debt consolidation loans.');  // Expires Jan 31, 2005

   if (isEmpty(cType)) { cType = ""; }
   else { cType = cType.toLowerCase() }

//   if (isEmpty(cType)) {
//      cHTML = cEarn+cDiv+cCC+cDiv+cMort+cDiv+cDebt; }
//   else if (cType=="cc") {
//      cHTML = cCC+cDiv+cDebt+cDiv+cEarn+cDiv+cMort; }
//   else if (cType=="debt") {
//      cHTML = cDebt+cDiv+cMort+cDiv+cEarn+cDiv+cCC; }
//   else if (cType=="mgt") {
//      cHTML = cMort+cDiv+cDebt+cDiv+cEarn+cDiv+cCC; }

cHTML = cEarn;

//alert('cHTML is '+cHTML);

   document.writeln(cHTML+'<br>');

}


function buildLink (cHref,cTitle,cText) {

   return '<table width="100%" align="center" cellspacing="0px" cellpadding="5px" border="0"><tr><td><a href="'+
      cHref+'" class="menulink3" target="_blank">'+cTitle+'</a><br><span class="menutitle3">'+cText+'</span></td></tr></table>';
}


function isEmpty (cInput) {
   
   if (cInput == null || cInput == "") {
      return true;
   }
   return false;
}