
// 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
}


// BT 09-10-03 commented out probably not used anymore
//function aceFILE_openWindow(theURL,winName,features) { //v1.0
//	var t = '?http_referer=' + document.URL
//	var w = window.open(theURL + t,winName,features)
//	if (w.opener == null) {
//		w.opener = window;
//		}
//	else {
//		w.focus()
//	}
//}


function ace_newWindow(url,windowName, features) {
	var link = window.open(url,windowName,features);
}


function aceDB_openWindow(theURL,winName,features) { //v1.0
	
	if (theURL.indexOf("windowName=") < 0) {
		if (theURL.indexOf("?") > 0) {
			theURL = theURL + "&";
		} else {
			theURL = theURL + "?";
		}
		theURL = theURL + "windowName=" + window.name;
	}

	if (theURL.indexOf("http_referer=") < 0) {
		if (theURL.indexOf("?") > 0) {
			theURL = theURL + "&";
		} else {
			theURL = theURL + "?";
		}
		theURL = theURL + "http_referer=" + escape(document.URL);
	}
	
	//alert(theURL);
	var w = window.open(theURL,winName,features)
	if (w.opener == null) {
		w.opener = window;
		}
	else {
		w.focus()
	}
}

function writeYear() {
	oneDate = new Date();
	var theYear = oneDate.getYear();
	if (theYear < 200 ) { theYear = theYear + 1900 } // Y2K fix
	document.write(theYear);
}

//<!--  Begin ACE Link --------------------------------------------------------------------------->

//window.name='acePageWindow'
function MM_openBrWindow(theURL,winName,features) { //v1.0
	
	if (theURL.indexOf("windowName=") < 0) {
		if (theURL.indexOf("?") > 0) {
			theURL = theURL + "&";
		} else {
			theURL = theURL + "?";
		}
		theURL = theURL + "windowName=" + window.name;
	}
	
	var w = window.open(theURL,winName,features)
	if (w.opener == null) {
		w.opener = window;
		}
	else {
		w.focus()
	}
}

//<!--  End ACE Link ---------------------------------------------------------------------------->


//<!-- ROLLOVER CODE --------------------------------------------------------------------------->

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(59,45);
				a1off.src = "/images/n1_home.gif";
				a1on= new Image(59,45);
				a1on.src = "/images/n1_home_alt.gif";
				
				b1off= new Image(88,45);
				b1off.src = "/images/n1_floor_plans.gif";
				b1on= new Image(88,45);
				b1on.src = "/images/n1_floor_plans_alt.gif";

				c1off= new Image(77,45);
				c1off.src = "/images/n1_site_plan.gif";
				c1on= new Image(77,45);
				c1on.src = "/images/n1_site_plan_alt.gif";

				d1off= new Image(90,45);
				d1off.src = "/images/n1_availability.gif";
				d1on= new Image(90,45);
				d1on.src = "/images/n1_availability_alt.gif";
				
				e1off= new Image(86,45);
				e1off.src = "/images/n1_documents.gif";
				e1on= new Image(86,45);
				e1on.src = "/images/n1_documents_alt.gif";
				
				f1off= new Image(57,45);
				f1off.src = "/images/n1_links.gif";
				f1on= new Image(57,32);
				f1on.src = "/images/n1_links_alt.gif";
				
				g1off= new Image(86,45);
				g1off.src = "/images/n1_contact_us.gif";
				g1on= new Image(86,45);
				g1on.src = "/images/n1_contact_us_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;
   }
}
