	/**************************************************
	FILE DEPENDENCIES:
	http://news.elliemae.com/js/functions.js
		CreateHabib(int);
		getRand(int,int);
		openWindow(href,ref_obj,width,height)
	***************************************************/

	function CreatePartnerPromotions(){ // called from http://news.elliemae.com/index.asp - window.onload.init();
		var oLI,sHTML,sImg;
		var oPromo = document.getElementById("promo"); //ID must exist
		var srcPdfIcon = "<img src=\"http://www.elliemae.com/images/icons_light_pdf.gif\" border=\"0\" align=\"right\" width=\"21\" height=\"23\">";
		var srcSpacer = "<img src=\"images/spacer.gif\" border=\"0\" align=\"right\" width=\"21\" height=\"23\">";
		
		var aPromo = new Array();
		//aPromo[x][1] = [0 | 1 | 2]
		// 0 = pdf
		// 1 = html
		// 2 = habib

		aPromo[0] = new Array("/elqNow/elqRedir.htm?ref=http://www.elliemae.com/newsletter/july2006/complianceeas_july2006.pdf",0,"Complimentary compliance audits for Encompass users - ComplianceEase");
		aPromo[1] = new Array("/elqNow/elqRedir.htm?ref=http://www.elliemae.com/newsletter/july2006/dartappraisal_july2006.pdf",0,"Order your appraisals online and save up to $250 - Dart Appraisal");
		aPromo[2] = new Array("/elqNow/elqRedir.htm?ref=http://www.elliemae.com/newsletter/july2006/housevalues_july2006.pdf",0,"Encompass users: Get your first 10 leads free - The Loan Page, Inc.");
		aPromo[3] = new Array("/elqNow/elqRedir.htm?ref=http://www.elliemae.com/newsletter/july2006/indymac_july2006.pdf",0,"Construction loans are a great way to expand your business - Indymac Bank");
		
		// anchor text and href are returned as one string from news.elliemae.com/js/functions.js - CreateHabib()
		aPromo[4] = new Array(CreateHabib(getRand(0,10)),2,"");
		
		oPromo.style.width = "220px";
		
		for(var i = 0;i<aPromo.length;i++){ // loop through aPromo array
			sImg = (aPromo[i][1] == 0) ? srcPdfIcon : srcSpacer; // pdf icon
		
			if(aPromo[i][1] == 2){ // habib link contains single string for href and anchor text
				sHTML = aPromo[i][0];
			}else{ // all others
//				sHTML = "<a href=\"javascript:void(openWindow('"+aPromo[i][0]+"',this,500,450));\" class=\"a2\" name=\"epass\">" + sImg + aPromo[i][2]+"</a>";
				sHTML = "<a href=\"#\" onClick=\"openWindow('"+aPromo[i][0]+"',this,700,450);\" class=\"a2\" name=\"epass\">" + sImg + aPromo[i][2]+"</a>";
			}
			
			oLI = document.createElement("LI");
			oLI.className = "li2";
			oLI.style.width="220px";
			oLI.innerHTML = sHTML;

			oPromo.appendChild(oLI);
		}

	}

