function processExternals(){
	strHost = document.location.hostname;
	clLnks = document.links;
	for (i=0;i<clLnks.length;i++) {
		if ((clLnks[i].href.search(strHost) == -1 && clLnks[i].href.search('mailto:') == -1) && clLnks[i].href.search('http://') != -1){
			clLnks[i].target = "_blank";
		}
	}
	//NOTE: clLnks[i].href.search('http://') != -1 is because Safari only returns script name and not host name, leading to all Links opening in a new window
}

function adjustColHeights() {
	getDocSize();
	iLeft = document.getElementById("leftcol").clientHeight;
	iMiddle = document.getElementById("middlecol").clientHeight;
	iRight = document.getElementById("rightcol").clientHeight;
	iOffset = document.getElementById("top").clientHeight + document.getElementById("footer").clientHeight;


	//alert("height = " + myHeight);
	//alert("left = " + iLeft);
	//alert("middle = " + iMiddle);
	//alert("offset = " + document.getElementById("footer").clientHeight);

	if (iLeft < myHeight - iOffset && iMiddle < myHeight - iOffset && iRight < myHeight - iOffset) {
		document.getElementById("leftcol").style.height = myHeight - iOffset + "px";
		document.getElementById("middlecol").style.height = myHeight - iOffset + "px";
		//alert("done");
	}
	else if (iLeft < iRight && iMiddle < iRight) {
		document.getElementById("leftcol").style.height = iRight + "px";
		document.getElementById("middlecol").style.height = iRight + "px";
	}
	else if (iLeft > iMiddle) {
		document.getElementById("middlecol").style.height = iLeft + "px";
	}
	else if (iLeft < iMiddle) {
		document.getElementById("leftcol").style.height = iMiddle + "px";
	}
}


function highlight_OLD(asId){
	obj = document.getElementById(asId).firstChild;
	obj.src = obj.src.replace(new RegExp("_0\\b"), "_1");
}

function highlight(asId,aiNum){
	//alert(document.getElementById(asId).firstChild.src.indexOf(arySrc[aiNum][2].src));
	if(document.getElementById(asId).firstChild.src.indexOf(arySrc[aiNum][2].src) == -1) {
		//alert('highlight');
		obj = document.getElementById(asId).firstChild;
		obj.src = arySrc[aiNum][1].src;
	}
}

function dehighlight(asId,aiNum){
	if(document.getElementById(asId).firstChild.src.indexOf(arySrc[aiNum][2].src) == -1) {
		obj = document.getElementById(asId).firstChild;
		//obj.src = obj.src.replace(new RegExp("_1\\b"), "_0");
		obj.src = arySrc[aiNum][0].src;
	}
}

function selectButton(asId,aiNum){
	obj = document.getElementById(asId).firstChild;
	//obj.src = obj.src.replace(new RegExp("_1\\b"), "_on");
	obj.src =  arySrc[aiNum][2].src;
}

function getDocSize() {
 // var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
}