// made by: Nic's JavaScript Page - http://www.javascript-page.com

var currentdate = 0;
var core = 0;
var Banner = "";


///large banners
/////////////////////////////////////////////////////////////////////
function initArray() {

this.length = initArray.arguments.length;
  for (var i = 0; i < this.length; i++) {
  this[i] = initArray.arguments[i];
  }
}



///just incase we miss a WriteBanner() when modifying webpages, it will 
///automatically display the credit report banners
function WriteBanners() {
    WriteBanners("creditreport");
}



//http://www.creditinfocenter.com/loans/

////send variable BannerType to the function
//// WriteBanners("creditreport");
function WriteBanners(BannerType) {

    
    //////Depending on what type of banner we want, 
    //////here are the variables based what banner type
    switch (BannerType){
    case "creditreport":
        link = new initArray(
        "http://www.credit.com/r2/credit-reports/af=p4794&c=198243-78327d4359&ag=rotatingbanner",
        "http://www.credit.com/r/click-my-credit/af=p4794&ag=rotatingbanner"
        );
        image = new initArray(
        "http://www.creditinfocenter.com/images/creditcom/creditcom_468x60.gif",
        "http://www.creditinfocenter.com/images/banners/ClickMyCredit468x60.gif"
        );
        text = new initArray(
        "Credit.com",
        "Click My Credit"
        );
        break;
    case "creditrepair":
        link = new initArray(
        "http://www.creditinfocenter.com/repair/lexingtonlaw.html"
        );
        image = new initArray(
        "http://www.creditinfocenter.com/images/Lex/NewLexBanner_468x100.png"
        );
        text = new initArray(
        "Lexington Law"
        );
        break;
    case "creditscore":
        link = new initArray(
        "http://www.credit.com/r2/credit-reports/af=p4794&c=198243-78327d4359&ag=rotatingbanner",
        "http://www.credit.com/r/click-my-credit/af=p4794&ag=rotatingbanner"
        );
        image = new initArray(
        "http://www.creditinfocenter.com/images/creditcom/creditcom_468x60.gif",
        "http://www.creditinfocenter.com/images/banners/ClickMyCredit468x60.gif"
        );
        text = new initArray(
        "Credit.com",
        "Click My Credit"
        );
        break;
    case "rebuild":
        link = new initArray(
        "http://www.credit.com/r2/credit-cards/af=p4794&c=184312-7141452e49&ag=rotatingbanner",
        "http://www.credit.com/r2/credit-cards/af=p4794&c=196169-7c65086528&ag=rotatingbanner"
        );
        image = new initArray(
        "http://www.creditinfocenter.com/images/banners/CreditDotCom/orchard468.gif",
        "http://www.creditinfocenter.com/images/banners/CreditDotCom/UPSidePrePaidVisa.jpg"
        );
        text = new initArray(
        "Orchard Bank",
        "UPside Visa Prepaid Card"
        );
        break;
    case "bankruptcy":
        link = new initArray(
        "http://www.totalbankruptcy.com/affiliates/default/?aff=webn&subid=rotatingbanner",
        "http://www.totalbankruptcy.com/affiliates/default/?aff=webn&subid=rotatingbanner"
        );
        image = new initArray(
        "http://www.creditinfocenter.com/images/banners/bankruptcy.evaluation_468 x60.gif",
        "http://www.creditinfocenter.com/images/banners/bankruptcy.foreclosure_468 x60.gif"
        );
        text = new initArray(
        "Total Bankruptcy",
        "Total Bankruptcy Foreclosure"
        );
        break;
    case "debt":
        link = new initArray(
        "http://centertrk.com/?a=353&c=1473&s1=rotatingbanner" 
        );
        image = new initArray(
	"http://www.creditinfocenter.com/images/banners/DebtSettlement-BannerAd-468x60 3.jpg"
	);
        text = new initArray(
        "Debt Settlement"
        );
        break;
    case "identitytheft":
        link = new initArray(
        "http://www.credit.com/r2/credit-reports/af=p4794&c=162959-63060f6302&ag=rotatingbanner"
        );
        image = new initArray(
        "http://www.creditinfocenter.com/images/banners/CreditDotCom/IDLookout_468x60.gif"
        );
        text = new initArray(
        "Identity Lookout" 
        );
        break;
    case "loan":
        link = new initArray(
        "http://www.credit.com/r2/loans/af=p4794&c=192627-0c1f101e41&ag=rotatingbanner",
        "http://www.credit.com/r2/loans/af=p4794&c=151443-62617b4359&ag=rotatingbanner"
        );
        image = new initArray(
        "http://www.creditinfocenter.com/images/banners/CreditDotCom/personalloan.jpg",
        "http://www.creditinfocenter.com/images/banners/CreditDotCom/militaryloan.gif"
        );
        text = new initArray(
        "Credit.com Loan",
        "Military Loan"
        );
        break;
    default : 
	link = new initArray(
        "http://www.filitrac.com/Click.aspx?tid=E8AC6FB46303950E4E96A1970A11E20914A2615084688B58&FiliAff=23589&sid=rotatingbanner",
        "http://www.credit.com/r2/credit-reports/af=p4794&c=198243-78327d4359&ag=rotatingbanner"
        );
        image = new initArray(
        "http://www.creditinfocenter.com/images/banners/Monetize/RealTimeCreditScore_468x60.gif",
        "http://www.creditinfocenter.com/images/creditcom/creditcom_468x60.gif"
        );
        text = new initArray(
        "Real Time Credit Score",
        "Credit.com"
        );
        break;
    }  //end of switch
	
    
	var currentdate = new Date();
    var core = currentdate.getSeconds() % image.length;
	
    var ranlink  = link[core];
    var ranimage = image[core];
    var rantext  = text[core];
    
    document.writeln('<a href=\"' +ranlink+ '\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');

}  //end of function



