// SpamProof jscript methods
//To be used to prevent spammers from grabbing email addresses from a website
//
//Example:
//For more information contact our <Script language="JavaScript">PrintMail('sales','hubbardone.com','Sales')</SCRIPT> department.
//results: For more information contact our sales department.
//	where sales will be a link to mailto.

function  SendMail(n,s){
		
}
function PrintMail(n,d,m){
	if(m == ""){
		m = n + '@' + d;
	}	
	document.write("<a href=\"JavaScript:SendMail('" + n + "','" + d + "'); \" onMouseOver=\"self.status='" + m + "'; return true;\" onMouseOut=\"self.status=''; return true;\">" + m + "</a>");
	return true;
}	

function PrintEmail(name, domain) { 
	document.write(name + "@" + domain) 
}

function SendEmail(n, s, b){
		
		document.location.href='mailto:' + n + '?subject=' + s + '&body=' + b;
}

function SendContact(toname, todomain, bccname, bccdomain){
	
	//- dt - removed the bcc from this email b/c WS saw that it was displayed in the email;  the bccname & bccdomain are ignored.
	document.location.href = "mailto:"+toname+"@"+todomain+"?subject=Contact Us - General"
}


//added this for support for subject
function PrintMailWithParameters(n, d, m, p) {
	if(m == ""){
		m = n + '@' + d;
	}	
	document.write("<a href=\"JavaScript:SendMailWithParameters('" + n + "','" + d + "','" + p + "'); \" onMouseOver=\"self.status='" + m + "'; return true;\" onMouseOut=\"self.status=''; return true;\">" + m + "</a>");
	return true;
}
function  SendMailWithParameters(n,d,p){
	document.location.href='mailto:' + n + '@' + d + p;
}

function checkPassword(){
	var password = document.forms[0].txtPassword.value;
	if (password != null && 
		password != 'undefined' && 
		password != "" &&
		password != ''){
		password = password.replace(/^\s*(.*?)\s*$/g, "$1");
	}
		if (password == null ||
			password == "" ||
			password == '' ||
			password == 'undefined' ||
			password != "ccs2005"
			){
				alert("The password you have entered is invalid, please try again.");
			}else{
				location.href = "http://guest.cvent.com/i.aspx?1Q,M3,60819654-7846-4a7b-b666-5cf163e5001c";
		}
}