function addHTML (html) {
	document.getElementById('syndication_ad').innerHTML = html;
}

function ppFeaturedAd(type, maxRows, orientation, countryCodes){
	var returnFunction = 'addHTML';
	var additionalVars = "";
	
	if(maxRows)
		additionalVars = '&maxRows=' + maxRows;
	
	if(orientation)
		additionalVars += '&orientation=' + orientation;
	
	if(countryCodes)
		additionalVars += '&countryCodes=' + countryCodes;
	
	document.write('<span id="syndication_ad"></span>');
	httpRequest('/Scripts/pp_featured_ad.cfm?type=' + type + additionalVars, returnFunction);
}

function recordClick(linkURL, refererURL, ID, IP){
	httpRequest('/Scripts/pp_featured_ad_log.cfm?linkURL=' + linkURL + "&refererURL=" + refererURL + "&ID=" + ID + "&IP=" + IP);
}

var bgOrigTable, bgOrigTableWrapper;
	
function OnPPfeatAdMouseOver(id) {
	tbl = document.getElementById(id);
	tblWrapper = document.getElementById(id + 'Wrapper');
	
	bgOrigTable = tbl.style.backgroundColor;
	bgOrigTableWrapper = tblWrapper.style.backgroundColor;
	
	tbl.style.backgroundColor = '#ffffff';
}

function OnPPfeatAdMouseOut(id) {
	tbl = document.getElementById(id);
	tblWrapper = document.getElementById(id + 'Wrapper');

	tbl.style.backgroundColor = bgOrigTable;
	tblWrapper.style.backgroundColor = bgOrigTableWrapper;
}