// JavaScript Document

function PrintText(text) {
	// This function prints text; it can be used to print text that should only
	// be displayed if javascript is enabled.
	return(document.write(text));
}

function MailMe(addr1, addr2, subject, text) {
	// return (document.write(subject));

	var atsign = "@";
	var dotcom = ".com"
	var Mail2 = "mailto:";
	
	//
	// The next line is the onmouseover line placed into the
	// browser's status line."
	//

	var Ovr = " onmouseover=\"window.status='Send us an email'; return true;\"";
	
	// The next line clears the browser's status line when the mouse is no longer over the link text
	var Out = " onmouseout=\"window.status=''\"";

	// if addr2 is null, substitue TMW's domain
	if (addr2 == "") {
	  addr2 = "TriangleMicroWorks";
	}
	  	// if text is null, print the email address
	if (text == "") {
	  text = addr1+atsign+addr2+dotcom;
	}
	

	// This line returns the completed <a href=mailto line to 
	// the web page and prints it into the HTML page
	return(document.write( "<a href=",Mail2+addr1+atsign+addr2+dotcom+"?subject="+subject+Ovr+Out, ">", text, "</a>"));
}

function RefStart(addr1, addr2, subject) {
	// return (document.write(subject));

	var atsign = "@";
	var dotcom = ".com"
	var Mail2 = "mailto:";
	
	//
	// The next line is the onmouseover line placed into the
	// browser's status line."
	//

	var Ovr = " onmouseover=\"window.status='Send us an email'; return true;\"";
	
	// The next line clears the browser's status line when the mouse is no longer over the link text
	var Out = " onmouseout=\"window.status=''\"";

	// if addr2 is null, substitue TMW's domain
	if (addr2 == "") {
	  addr2 = "TriangleMicroWorks";
	}
	// This line returns the completed <a href=mailto line to 
	// the web page and prints it into the HTML page
	return(document.write( "<a href=",Mail2+addr1+atsign+addr2+dotcom+"?subject="+subject+Ovr+Out, ">"));
}

var popupHandle

function displayPopup(url, name, height, width, evnt) {
  var properties = "toolbar=0,location=0,height="+height
  properties = properties+",width="+width
  if(evnt != null) {
      properties=properties+",left="+(evnt.screenX+10);
      properties=properties+",top="+(evnt.screenY + 10);
  }
  popupHandle=open(url,name,properties);
 }
 
 function closePopup() {
   if(popupHandle !=null && !popupHandle.closed) popupHandle.close()
 }


