// 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(74,25);
				a1off.src = "/images/n1_home.gif";
				a1on= new Image(74,25);
				a1on.src = "/images/n1_home_alt.gif";
				
				b1off= new Image(75,25);
				b1off.src = "/images/n1_quote-request.gif";
				b1on= new Image(75,25);
				b1on.src = "/images/n1_quote-request_alt.gif";

				c1off= new Image(120,25);
				c1off.src = "/images/n1_sample-request.gif";
				c1on= new Image(120,25);
				c1on.src = "/images/n1_sample-request_alt.gif";

				d1off= new Image(96,25);
				d1off.src = "/images/n1_about-Us.gif";
				d1on= new Image(96,25);
				d1on.src = "/images/n1_about-Us_alt.gif";
				
				e1off= new Image(87,25);
				e1off.src = "/images/n1_contact.gif";
				e1on= new Image(87,25);
				e1on.src = "/images/n1_contact_alt.gif";
				
				f1off= new Image(86,12);
				f1off.src = "/images/n1_other-Products.gif";
				f1on= new Image(86,12);
				f1on.src = "/images/n1_other-Products_alt.gif";
				
				g1off= new Image(76,12);
				g1off.src = "/images/n1_mcloone.gif";
				g1on= new Image(76,12);
				g1on.src = "/images/n1_mcloone_alt.gif";
				
				h1off= new Image(72,12);
				h1off.src = "/images/n1_prices.gif";
				h1on= new Image(72,12);
				h1on.src = "/images/n1_prices_alt.gif";
				
				i1off= new Image(121,25);
				i1off.src = "/images/n1_dyo.gif";
				i1on= new Image(121,25);
				i1on.src = "/images/n1_dyo_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);
}