// main.js 


	
// purpose of this script is to stop robot email harvestors by:
// 		1) hide address as a string. 
//		2) assuming adv. robot collects result of mailto click (outsmart step 1) ask for confirmation, one more step
// if they still get it, I give up. for now.
// davidbain
// href="javascript:mailtoConfirm('username','domain name','.com','subject','cc','bcc','body');"
// to omit value leave empty

function mailtoConfirm(name,company,domain,subject,cc,bcc,body) {
	var answer = confirm ("Do you want to send an Email?");
	var text = '?x=y';	
	
	if (answer) {
		if (subject.length > 0) {text = text + '&subject=' + escape(subject)};
		if (cc.length > 0) {text = text + '&cc=' + cc};
		if (bcc.length > 0) {text = text + '&bcc=' + bcc};
		if (body.length > 0) {text = text + '&body=' + escape(body)};		
		//alert(text)	
		locationstring = 'mai' + 'lto:' + name + '@' + company + '.' + domain + text;
		window.location.replace(locationstring); 
   		}
	}

