function imgpopup(myHREF) {
	//alert(myHREF)	
	myHREF = "/inc/pic.asp?img=" + myHREF
	window.open(myHREF, 'imgpopup', 'width=640,height=480')
}

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";
		} else if ((anchor.getAttribute("href") && anchor.getAttribute("rel") == "imgpopup")) {
			myHREF = anchor.getAttribute("href")
			anchor.href = "javascript:imgpopup('" + myHREF + "')";
		}
	}
}
window.onload = externalLinks;

function isnumeric(strString)
// check for valid numeric strings
{
var strValidChars = "0123456789";
var strChar;
var blnResult = true;

if (strString.length == 0) return false;

// test strString consists of valid characters listed above
for (i = 0; i < strString.length && blnResult == true; i++)
{
strChar = strString.charAt(i);
if (strValidChars.indexOf(strChar) == -1)
{
blnResult = false;
}
}
return blnResult;
}

sfHover = function() {
	var sfEls = document.getElementById("topmenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

