// Copyright (C) 2003 by Netphoria, Inc. All Rights Reserved.

// writeemail will write the email address to the page
function writeemail(username, domain) {
	document.write( username + '@' + domain )
}

// writecloakedmailto will write a mailto link to the page.
// if linktext = "email" then the email address is written cloaked, otherwise linktext is written
function writecloakedmailto(username, domain, linktext) {
	document.write('<a href=\"mailto:' + username + '@' + domain + '\">');
	if (linktext == "email")	{ document.write(username + '@' + domain + '</a>') }
	else 						{ document.write(linktext + '</a>') }
}

// cloakmailto can be used in href to cloak a mailto like this:
// javascript:cloakmailto("hosting","netphoria.com?subject=hosting")
// This is safe to use with pages that can be edited by ACE  
function cloakmailto(username, domain) {
	window.location = "mailto:" + username + '@' + domain
}


browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) {
        version = "n3";
        }
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) {
        version = "n3";
        }
else {
        version = "n2";
}


if (version == "n3") {

				a1off= new Image(53,26);
				a1off.src = "/images/n1_home.gif";
				a1on= new Image(53,26);
				a1on.src = "/images/n1_home_alt.gif";
				
				b1off= new Image(136,26);
				b1off.src = "/images/n1_quote-request.gif";
				b1on= new Image(136,26);
				b1on.src = "/images/n1_quote-request_alt.gif";

				c1off= new Image(134,26);
				c1off.src = "/images/n1_sample-request.gif";
				c1on= new Image(134,26);
				c1on.src = "/images/n1_sample-request_alt.gif";

				d1off= new Image(91,26);
				d1off.src = "/images/n1_about-us.gif";
				d1on= new Image(91,26);
				d1on.src = "/images/n1_about-us_alt.gif";
				
				e1off= new Image(59,26);
				e1off.src = "/images/n1_faq.gif";
				e1on= new Image(59,26);
				e1on.src = "/images/n1_faq_alt.gif";
				
				f1off= new Image(131,26);
				f1off.src = "/images/n1_gallery.gif";
				f1on= new Image(131,26);
				f1on.src = "/images/n1_gallery_alt.gif";
				
				g1off= new Image(103,26);
				g1off.src = "/images/n1_mcloone.gif";
				g1on= new Image(103,26);
				g1on.src = "/images/n1_mcloone_alt.gif";
				
				
}

function img_act(imgName) {
   if (version == "n3") {
      imgOn = eval(imgName + "on.src");
      document [imgName].src = imgOn;
   }
}

function img_inact(imgName) {
   if (version == "n3") {
      imgOff = eval(imgName + "off.src");
      document [imgName].src = imgOff;
   }
}

function writeYear() {
	oneDate = new Date();
	var theYear = oneDate.getYear();
	if (theYear < 200 ) { theYear = theYear + 1900 } // Y2K fix
	document.write(theYear);
}