el= document.createElement("IFRAME");
el.frameBorder=0;
el.frameSpacing=0;
el.scrolling="no";
el.style.border="none";
el.style.overflow="hidden";
el.style.height="510px";
el.style.width="660px";

var add_message = "";
var add_title = "";
var add_partner_type = "";
var trex_domain = "www.trexglobal.com";

try{if(custom_trex_message){add_message = escape(custom_trex_message)};}catch(e){}
try{if(custom_trex_title){add_title = escape(custom_trex_title)};}catch(e){}
try{if(custom_trex_domain){trex_domain = custom_trex_domain};}catch(e){}
try{if(partner_type){add_partner_type = partner_type};}catch(e){}

var url = "http://"+trex_domain+"/application/reinvestor_products_full/";

if(typeof partner_link != "undefined" && typeof trex_name == "undefined"){
	if (partner_link.indexOf("http://www.trexglobal.com/partner/") != -1){
		var trex_name = partner_link.replace("http://www.trexglobal.com/partner/", "");
	}else{
		var trex_name = null;
	}
}

if(typeof trex_name != "undefined" && trex_name != null){
	url += trex_name;
}

url += "?message="+add_message+"&title="+add_title+"&partner_type="+add_partner_type;

el.src=url;

document.write("<div id='trex_frame_container'></div>");
document.getElementById("trex_frame_container").appendChild(el);
document.write('<span style="padding-left:10;font-family:arial,helvetica,sans-serif;font-size:10px;color:#ccc"><a style="color:#ccc; text-decoration:none;" href="http://www.trexglobal.com/property-management-software" target="_blank" title="Property Management Software" rel="Property Management Software">Property Management Software</a>, <a style="color:#ccc; text-decoration:none;" href="http://www.trexglobal.com/pay-rent" target="_blank" title="Pay Rent" rel="Pay Rent">Pay Rent</a> Online for Investors.</span>')

