function radioJump(url) {
	window.location = url;
}

function toggleVis(id, state) {
	var tempID = document.getElementById(id);
	if(state == "on") {
		tempID.style.display = "block";
	}
	if(state == "off") {
		tempID.style.display = "none";
	}
}

function isEmailAddr(Email)
{
 	var result = false
 	var theStr = new String(Email)
	var index = theStr.indexOf("@");
	if (index > 0) {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
 	result = true;
  }
 return result;
}

function removeWhitespace(item)
{
  var tmp = "";
  var item_length = item.value.length;
  var item_length_minus_1 = item.value.length - 1;
  for (index = 0; index < item_length; index++)
  {
    if (item.value.charAt(index) != ' ')
    {
      tmp += item.value.charAt(index);
    }
    else
    {
      if (tmp.length > 0)
      {
        if (item.value.charAt(index+1) != ' ' && index != item_length_minus_1)
        {
          tmp += item.value.charAt(index);
        }
      }
    }
  }
  item.value = tmp;
}

function emailStrip(input) {
	var badChar = '\'';
	input.value = replace(input.value,badChar,'');
}

function hoverRow(whichrow, rowstate) {
	var current = document.getElementById(whichrow).className;
	
	if(current.indexOf("roweven") != -1) {
		var currentClass = "roweven";
	}
	
	if(current.indexOf("rowodd") != -1) {
		var currentClass = "rowodd";
	}
	
	if(rowstate == 'on') {document.getElementById(whichrow).className += " tr_hover";}
	if(rowstate == 'off') {document.getElementById(whichrow).className = currentClass;}
	
}

function setClassName(objId, className) {
	document.getElementById(objId).className = className;
}