//
function init()
{
//		
    	var xmlDoc = "";
	window.ActiveXObject ? xmlDoc = new ActiveXObject("Microsoft.XMLDOM") 
				     :  xmlDoc = document.implementation.createDocument("","",null);
	xmlDoc.async = false;
	xmlDoc.load("master.xml");
//
	var x;
	var y;
	var x1;
	var y1;
	x = xmlDoc.getElementsByTagName('lead_recipient')[0].firstChild.data;
	y = replaceChars(x);
	document.myForm.recipient.value = y;
	document.myForm.courtesy_our_email.value = y;
//
	x="";
	y="";
	x = xmlDoc.getElementsByTagName("lead_recipient_upline")[0].firstChild.data;
	y = replaceChars(x);
	document.myForm.cc.value = y;
//
	x="";
	y="";
	x = xmlDoc.getElementsByTagName("bcc")[0].firstChild.data;
	y = replaceChars(x);
	document.myForm.bcc.value = y;
//
	document.myForm.subject.value = 'request from ' + location.href;
//
	x="";
	y="";
	z="";
	x = xmlDoc.getElementsByTagName("text_at_bottom_of_email")[0].firstChild.data;
	y = replaceChars(x);
	z = y + "\r\r" + 

"Our leaders are :\rIn the top 100 income earners in the company\rIn the Million Dollar Earners Club\rTop Ten Income Earners of the Year in Australia\rWorldwide Business Builders of the year 2001\rA few years ago they were in the top 20 people worldwide\r\r\rIf you do not want to receive future emails from us, please send a reply email asking to be taken off our email list."; 
document.myForm.courtesy_who_we_are.value = z;
//
	x="";
	y="";
	x = xmlDoc.getElementsByTagName("page_to_redirect_to")[0].firstChild.data;
	y = replaceChars(x);
	document.myForm.redirect.value = y;
//
	x="";
	y="";
	x = xmlDoc.getElementsByTagName("url_at_bottom_of_email")[0].firstChild.data;
	y = replaceChars(x);
	document.myForm.courtesy_our_url.value = y;
//
	x="";
	y="";
	x = xmlDoc.getElementsByTagName("about_me_name")[0].firstChild.data;
	y = replaceChars(x);
	document.getElementById('about_me_name').innerHTML = y;
	dispaa(y);
	 

	
	 
//
	x="";
	y="";
	x = xmlDoc.getElementsByTagName("about_me_text")[0].firstChild.data;
	y = replaceChars(x);
	 document.getElementById('about_me_text').innerHTML = y;
//
}
navigator.appName == "Microsoft Internet Explorer" ? attachEvent('onload', init, false) : addEventListener('load', init, false);	
//
function replaceChars(entry) {
out = ";"; // replace this
add = ","; // with this
temp = "" + entry; // temporary holder
//---
while (temp.indexOf(out)>-1) {
pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add + 
temp.substring((pos + out.length), temp.length));
}
return temp;
}
