
function mouseover(id)
{
document.getElementById(id).src ="images/button/"+id+"2.jpg";
}

function mouseout(id)
{
document.getElementById(id).src ="images/button/"+id+".jpg";
}

function confirm_save()
{
var r=confirm("Do you want to make the change?");
if (r==true)
  {
  return true;
  }
else
  {
  return false;
  }
}



function validate_email(field,alerttxt)

{

with (field)

  {

  apos=value.indexOf("@");

  dotpos=value.lastIndexOf(".");

  if (apos<1||dotpos-apos<2)

    {alert(alerttxt);return false;}

  else {return true;}

  }

}



function validate_Required(field,alerttxt)

{

with (field)

  {

  if (value==null||value=="")

    {

    alert(alerttxt);return false;

    }

  else

    {

    return true;

    }

  }

}

function validate_phone(field,alerttxt)
{
	with (field)
  {
		var stripped = value.replace(/[\(\)\.\-\ ]/g, '');
		//strip out acceptable non-numeric characters
		if (isNaN(parseInt(stripped))) {
		   alert(alerttxt);return false;
		}else if (!(stripped.length == 10)) {
			alert(alerttxt);return false;
		}else
		{
			return true;
			}
  }
}
function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
    el.style.color = "#000000"
}
function SetDefault(el) {
if (el.value=="") {el.value = el.defaultValue
el.style.color = "#ac9a8a"}
 
}
