// ==========================================================
// Hide mail address from spiders
//
// Parms: name      - left hand side of the @           									required
//        text      - displayed value (defaults to full email address     optional
//        classname - css class to control display      									optional
//        subject   - text for subject line of email    									optional
//        vrhs      - override standard right hand side 									optional
//
// Example:
// <script language="JavaScript" type="text/javascript">mail("info","","mail")</script>
// ==========================================================
function mail(name,text,classname,subject,vrhs)

{

var rhs = "vancouverselfstorage.net";
var add = name + "@" + rhs;
var classtag = "";

// Set optional parameters to blank if they are not passed
if (text==null) {
	text = "";
}

if (classname==null) {
	classname = "";
}

if (subject==null) {
	subject = "";
}

if (vrhs==null) {
	vrhs = "";
}

// If the vrhs field is not specified use the basic rhs
if (vrhs!="") {
	add = name + "@" + vrhs;
}

// If the text field is not specified use the basic address
if (text=="") {
	text = add;
}

// Build the subject code if required
if (subject!="") {
	add = add + "?subject=" + subject;
}

// Build the class code if required
if (classname!="") {
	classtag = "class='" + classname + "'";
}

// Write out the completed mail to reference
document.write("<a " + classtag + " href='" + "mail" + "to:" + add + "'>" + text + "</a>");

}

function setMenu()
{
	id=document.location; 
	
	re=/\w+\./i; 
	rf=/\w+/i
	
	id=re.exec(id); 
	id=rf.exec(id)+"";
	
	styleObj = document.getElementById(id).style;
	
	styleObj.background="#bdbfc1"; 
}

