function confirmSubmit(msg) {
	var agree=confirm(msg);
	if (agree)
		return true;
	else
		return false;
}

function popUpWin(theurl,xwidth,yheight) {

	window.open(theurl, 'new','height='+yheight+',width='+xwidth+',scrollbars=yes,status=no,toolbar=no,copyhistory=no')

}

function pageRedirect(targ,selObj,restore) {
        if (selObj.options[selObj.selectedIndex].value != "0")
                eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
        if (restore) selObj.selectedIndex=0;
}

function textCounter(field, countfield, maxlimit) {
  if (field.value.length > maxlimit) { // if too long...trim it!
    field.value = field.value.substring(0, maxlimit);
  } // otherwise, update counter
  else {
    countfield.value = maxlimit - field.value.length;
  }
}

function hideElement(element_id) 
{
   if (document.getElementById &&
         document.getElementById(element_id) &&
         document.getElementById(element_id).style)
      document.getElementById(element_id).style.visibility="hidden";
}

function showElement(element_id) 
{
   if (document.getElementById &&
         document.getElementById(element_id) &&
         document.getElementById(element_id).style)
      document.getElementById(element_id).style.visibility="visible";
}



var oncolor='#e7e8ea';
var outcolor='';

function over(obj)
{
  obj.style.backgroundColor=oncolor;
}

function out(obj)
{
  obj.style.backgroundColor=outcolor;
}


