//HE DEFINITIONS 
//  (link style and definition style & location are in stylesheets)
//Based on a script by Martin Webb, http://www.irt.org/

//function show(object) { if (document.layers && document.layers[object]) document.layers[object].visibility = //'visible'; else if (document.all) document.all[object].style.zIndex = 100, //document.all[object].style.visibility = 'visible'; }

//function hide(object) { if (document.layers && document.layers[object]) document.layers[object].visibility = //'hidden'; else if (document.all) document.all[object].style.visibility = 'hidden'; }




/// NS7 COMPATIBLE SHOW/HIDE

var ns4 = (document.layers)? true:false
var ie = (document.all)? true:false
var ns7 = (!document.all && document.getElementById);

function show(id) {
if (ns4) document.layers[id].visibility = "show"
if (ns7) document.getElementById(id).style.visibility = "visible";
else if (ie) document.getElementById(id).style.display = "inline";
}

function hide(id) {
if (ns4) document.layers[id].display = "none"
if (ns7) document.getElementById(id).style.visibility = "hidden";
else if (ie) document.getElementById(id).style.display = "none";
}

function statusy() { self.status=''; return true }
function statusn() { self.status=''; return true }
function statusyn() { self.status='brings up navigation bar'; return true }
function statusynw() { self.status='opens in new window'; return true }




// OPEN IN NEW TAB, WINDOW OR TARGETED FRAME FOR HTML4 STRICT

function externalLinks() {  
if (!document.getElementsByTagName) return;  
var anchors = document.getElementsByTagName("a");  
for (var i=0; i<anchors.length; i++) {  
var anchor = anchors[i];  
if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")  anchor.target = "_blank";  
}  
}  
window.onload = externalLinks;  

// in document write <a href="http://www.xxx.com" rel="external" onfocus="if(this.blur)this.blur()" title="(opens in new tab or window)">





//ANTI-SPAMBOT E-MAIL

function contactMe (theName, theHost, theContact)
{
  document.write("<a class='bs' href=" + "mailto:" + theName + "@" + theHost + " onFocus='if(this.blur)this.blur();'" + ">" + theContact + "</a>");
}

//in doc write this: <script type='text/javascript'>contactMe('xx','xx.com','Contact Us');</script>




// EXPAND DIV (or other element) TO FULL HEIGHT/WIDTH


var screenW = 640, screenH = 480;
if (parseInt(navigator.appVersion)>3) {
 screenW = screen.width;
 screenH = screen.height;
}
else if (navigator.appName == "Netscape" 
    && parseInt(navigator.appVersion)==3
    && navigator.javaEnabled()
   ) 
{
 var jToolkit = java.awt.Toolkit.getDefaultToolkit();
 var jScreenSize = jToolkit.getScreenSize();
 screenW = jScreenSize.width;
 screenH = jScreenSize.height;
}

// in doc write this at relevant spot: 
/* 
 <script type="text/javascript">
document.write(
 "<div id='content' style='height: "+screenH+"'>"
)
</script> 
*/



