var ordnum = Math.random()*10000000000000000;

/* Extra stuff to enable nav hovers in lame IE */
//  
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);
//
 
/* POPUPS */
//
Popup = new Object ();

Popup.open = function (url, width, height, toolbar, scroll, center) {
	var name = new Date ();
	name = name.getTime ();
	name = name.toString ();
	toolbar = toolbar ? "yes" : "no";
	scroll = scroll ? "yes" : "no";
	status = status ? "yes" : "no";
	var features = "toolbar="+toolbar+",menubar="+toolbar+",location="+toolbar+",status="+toolbar+",status="+status+",scrollbars="+scroll+",resizable="+scroll;
	if (width) features += ",width="+width;
	if (height) features += ",height="+height;
	if (center) {
		if (width && window.screen.availWidth) {
			var x = Math.round ((window.screen.availWidth - parseInt (width)) / 2);
			features += ",screenX="+x+",left="+x;
		}
		if (height && window.screen.availHeight) {
			var y = Math.round ((window.screen.availHeight - parseInt (height)) / 2);
			features += ",screenY="+y+",top="+y;
		}
	}
	window.open (url, name, features);
}
Popup.center = function (url, width, height) {
	this.open (url, width, height, false, false, true);
}
Popup.centerChrome = function (url, width, height) {
	this.open (url, width, height, true, false, true);
}
Popup.centerScroll = function (url, width, height) {
	this.open (url, width, height, false, true, true);
}
Popup.centerChromeScroll = function (url, width, height) {
	this.open (url, width, height, true, true, true);
}
Popup.centerStatus = function (url, width, height) {
	this.open (url, width, height, false, false, true);
}
//

// open top link -- this replaces target="_top" link attribute with rel="section" for each top frame link 

function topLinks() {
 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") == "section")
     anchor.target = "_top";
 }
}
window.onload = topLinks;

//

// open new window -- this replaces target="_blank" link attribute with rel="external" for each external link 

function newLinks() {
 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 = newLinks;

//

// drop-down anchor link script 

function doSelChange(obj) {
    var optval = obj.options[obj.selectedIndex].value;
    if (isNaN(optval)) {
        window.location = optval;
    } else {
        show_syspicker_popup(optval);
    }
}

//

// blocks spambots from harvesting email addresses


function m_sfcon (u) {
    pre = "mail";
    url = pre + "to:" + u;
    document.location.href = url + "@donposgate.com";
}

//		




