/**
 * File: client-scripts.js
 *
 * JavaScript file with global functionality.
 */
 
 
function padIE () {
	var d = document;
	var box = d.getElementById('contentbox');
	var cHeight = box.offsetHeight;
	var mHeight = box.currentStyle.minHeight.substring(0,3);
	if (cHeight < mHeight) {
		d.getElementById('whitespace').style.height = mHeight - cHeight;
	}
}	

function _blank (a) 
{
	window.open(a.href);
	return false;
}

function setListeners()
{
  inputList = document.getElementsByTagName("INPUT");
  for(i=0;i<inputList.length;i++)
	{
    inputList[i].attachEvent("onpropertychange",restoreStyles);
    inputList[i].style.backgroundColor = "";
  }
  selectList = document.getElementsByTagName("SELECT");
  for(i=0;i<selectList.length;i++)
	{
    selectList[i].attachEvent("onpropertychange",restoreStyles);
    selectList[i].style.backgroundColor = "";
  }
}

function restoreStyles()
{
  if(event.srcElement.style.backgroundColor != "")
	{
    event.srcElement.style.backgroundColor = "";
	}
}
