function DisplayMail(Server, Login, Display, Subject){
  var txtLink = "";
  
  txtLink = "<a class='MainLinks' href=" + "'mai" + "lto:" + Login + "@" + Server;
  
  if(Subject.length != 0){
    txtLink += "?subject=" + Subject;
  }
  
  txtLink += "'>";
  if ((Display.length == 0) || (Display.indexOf('@')+1)){
     txtLink += Login + "@" + Server;
  }else{
    txtLink += Display;
  }

  txtLink += "</a>";

  document.write(txtLink);
}


function DisplayMailMap(Server, Login, Display, Subject, Coords){
  var txtLink = "";
  
  txtLink = "<area shape='rect' coords=" + Coords + " href=" + "'mai" + "lto:" + Login + "@" + Server;
  
  if(Subject.length != 0){
    txtLink += "?subject=" + Subject;
  }
  
  txtLink += "'";
  if ((Display.length == 0) || (Display.indexOf('@')+1)){
     txtLink +=  "alt='" + Login + "@" + Server + "'";
  }else{
    txtLink += "alt='" + Display + "'";
  }

  txtLink += "</area>";

  document.write(txtLink);
}

function buildOptionList(tdObject, listName, event, xmlFile){
	var strHTML = "";
	var xml = null;
	var xsl = null;
	
	try{
		// Create an xml document object, and load the server's response
		xml = new ActiveXObject("Microsoft.XMLDOM");
		xml.async = false;
		
		// Send the request string and read the result into the XMLDOM object
		xml.load(xmlFile);
		
		// Create an xml document object for the XSL stylesheet.
		xsl = new ActiveXObject("Microsoft.XMLDOM");
		xsl.async = false;
		
		// Send the request string and read the result into the XMLDOM object
		xsl.load("optionList.xsl");
		
		tdObject.innerHTML = "<select name = \"" + listName + "\" " + event 
			+ " style=\"width:100%\">" + xml.transformNode(xsl) + "</select>";
	}catch(e){
		// Catch error, but don't do anything about it since the user doesn't 
		// need to know that the "Automation server can't create object."
		// MJ 5/30/2006
	}
}

function openRemote(pageName, props){
	// If the child window is already open, first close it so that we can reopen it 
	// witth different properties.
	if(winRemote != null){
		if(!winRemote.closed){
			winRemote.close();
		}
		winRemote = null;
	}
	
	// Open the child window.
	winRemote = window.open(pageName, null, props);
}