function sendText(e, text)
{
  e.value += text
} 
function ShowOrHide(d1, d2) {
  if (d1 != '') DoDiv(d1);
  if (d2 != '') DoDiv(d2);
}
function DoDiv(id) {
  var item = null;
  if (document.getElementById) {
	item = document.getElementById(id);
  } else if (document.all){
	item = document.all[id];
  } else if (document.layers){
	item = document.layers[id];
  }
  if (!item) {
  }
  else if (item.style) {
	if (item.style.display == "none"){ item.style.display = ""; }
	else {item.style.display = "none"; }
  }else{ item.visibility = "show"; }
}
function checkAll(cbList) {
  for (var i=0; i<cbList.length; i++) {
    cbList[i].checked = !(cbList[i].checked) 
    cbList[i].selected = !(cbList[i].selected)
  }
}
function college_confirm(url) {
 var where_to= confirm("Are you sure?\n Once you select Accepted or Rejected,\n you will NOT be able to change your status.");
 if (where_to== true)
 {
   window.location=url;
 }
}
function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 