// blur links
// this gets ride of that nasty dotted line surrounding links in focus on windows machines.
function blurLinks() {
	if(navigator.platform == "Win32" && document.getElementsByTagName) {
		var lnks = document.getElementsByTagName('a');
		var i;
	    for (i = 0; i < lnks.length; i++)
	    {
	        lnks[i].onfocus = new Function("if(this.blur)this.blur()");
	    }
	}
}

function linkTarget() {
	if (!document.getElementsByTagName) return;
	var lnks = document.getElementsByTagName('a');
	var i;
	for (i = 0; i < lnks.length; i++) {
		var lnk = lnks[i];
		if (lnk.getAttribute("href") && lnk.getAttribute("rel") == "external") lnk.target = "_blank";
	}
}

// function to handle pre DOM and DOM2 document call

function doc() {
	return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;
}

// function to obtain the height of the client window.

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number')
		windowHeight = window.innerHeight;
	else
		windowHeight = doc().clientHeight;
	return windowHeight;
}

// function to obtain the width of the client window.

function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number')
		windowWidth = window.innerWidth;
	else
		windowWidth = doc().clientWidth;
	return windowWidth;
}