// JavaScript Document
function hideInner(tag){
tag.getElementsByTagName("div")[0].style.display = 'none';
}

function showInner(tag){
tag.getElementsByTagName("div")[0].style.display = 'block';
}

function doubleCheck(id, Page, PageNo) {
	var x=window.confirm("Are you sure you want to delete this entry?")
	if (x)
		location.href = 'index.php?Page='+Page+'&View=Delete&Id='+id+'&PageNo='+PageNo;
}

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

//function to check valid email address
function isValidEmail(){
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
  strEmail = document.forms[0].ema_email.value;

   // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) 
   {
      alert('A valid e-mail address is required.\nPlease amend and retry');
      return false;
    } 
    return true; 
}

function showArea(x, v){
	areaV = x;
	areaX = v;
	if(document.getElementById(areaV).style.display == "none"){
		document.getElementById(areaV).style.display = "block";
		document.getElementById(areaX).value = '0';
	}
	else{
		document.getElementById(areaV).style.display = "none";
		document.getElementById(areaX).value = '';
	}
}