//<!--

var loaded = false;
var loadProcs = new Array();

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

function openWindow(_url, _name, _features) {
  top.window[_name] = window.open(_url, _name, _features);
  if (top.window[_name] != null) {
    top.window[_name].focus();
  }  
}

function argFromURL(url) {
  var args = String(url).split("#");
  if (args.length > 1) {
    return args[1];
  } 
  else {
    return ""; 
  }  
}

function swap(obj) {
  var strSrc = obj.src.slice(0, -4);
  if (strSrc.slice(-5) == "_over") {
    obj.src = strSrc.slice(0, -5) + ".gif";
  }
  else {
    obj.src = strSrc + "_over" + ".gif";
  }
}
 
function showPopUp(srcElement, windowName, features) {
  var featuresString;
  
  if (features != null) {
    featuresString = features;
  }
  else {
    featuresString = "left=100,top=100,height=477,width=607,scrollbars=yes,resizable=yes";
  }
  _url = srcElement.getAttribute("href");
  openWindow(_url, windowName, featuresString);
}

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('content').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'absolute';
				footerElement.style.top = (windowHeight - footerHeight) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}

	
function addEvent(obj, evType, fn) { 
	if (obj.addEventListener) { 
		obj.addEventListener(evType, fn, true); 
		return true; 
	}	
	else if (obj.attachEvent) { 
		var r = obj.attachEvent("on"+evType, fn); 
		return r; 
	} 
	else { 
		return false; 
	} 
}

//-->

