// 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(60,27);
				a1off.src = "/images/n1_home.gif";
				a1on= new Image(60,27);
				a1on.src = "/images/n1_home_alt.gif";
				
				b1off= new Image(112,27);
				b1off.src = "/images/n1_quote-request.gif";
				b1on= new Image(112,27);
				b1on.src = "/images/n1_quote-request_alt.gif";

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

				d1off= new Image(90,27);
				d1off.src = "/images/n1_who-we-are.gif";
				d1on= new Image(90,27);
				d1on.src = "/images/n1_who-we-are_alt.gif";
				
				e1off= new Image(91,27);
				e1off.src = "/images/n1_contact-us.gif";
				e1on= new Image(91,27);
				e1on.src = "/images/n1_contact-us_alt.gif";
				
				f1off= new Image(130,27);
				f1off.src = "/images/n1_specialty-prod.gif";
				f1on= new Image(130,27);
				f1on.src = "/images/n1_specialty-prod_alt.gif";

				g1off= new Image(109,27);
				g1off.src = "/images/n1_mcloone.gif";
				g1on= new Image(109,27);
				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;
   }
}