function confDel(confStr) {

    var conf = confirm(confStr);
    if(conf) {
        return true;
    }
    else {
        return false;
    }
}

<!--
//------------------FORM VALIDATION-----------------
var error_string;
var first_errorObj;
function chk_error(objName,errMsg){
        if(trim_str(objName.value)==''){
            error_string=error_string+errMsg+'\n';
            if(first_errorObj==null)
                {
                  first_errorObj=objName;
                }
            objName.focus();
        }
}


function checkEmail(str){

  //var str=document.validation.emailcheck.value
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
  if (filter.test(str)){
     return true;
  }
  else
  {
      alert("Please input a valid email address!");
      return false;
  }
}

function checkEmailNoAlert(str){
  //var str=document.validation.emailcheck.value
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i  
  return  filter.test(str); 
}

function chk_number(objName,errMsg){
        if(!isNan(objName.value)){
            error_string=error_string+errMsg+'\n';
            if(first_errorObj==null)
                {
                  first_errorObj=objName;
                }
            objName.focus();
        }
}



//Funtion to trim the variable. Lines 18
function trim_str(variable){
	var icount=0;
	var var_len=variable.length;
	for (icount=0;icount<=var_len;icount++){
		if(variable.charAt(0)==' '){
			variable=variable.substring(1,variable.length);
		}
	}
	var_len=variable.length;
	for (icount=0;icount<=var_len;icount++){
		if (variable.charAt(variable.length-1)==' '){
			variable=variable.substring(0,variable.length-1);
		}
	}
	return variable;
}

//End of funtion to trim the variable
/*
in html pages use the function below.
function validate_form(frm) {
    error_string='';
    first_errorObj=null;
    chk_error(frm.client_loginid,"Login Id cannot be blank.");
    if (error_string!="")
    {
        alert(error_string);
        first_errorObj.focus();
        return (false);
    }
}
*/

//------------------xxxxxxx-----------------
//CREATE AJEX OBJECT
function getAjexObject(){
  try { return new XMLHttpRequest(); } catch(e) {}
  try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
  try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}  
  alert("XMLHttpRequest not supported");
  return null;
}

// OPEN NEW WINDOW //
function NewWindow(mypage,myname,w,h,scrol){

        LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
        TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
        settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrol+',resizable=1, toolBar=0, menu=0';
        var win = window.open(mypage,myname,settings);
		return win;

}

// MENU
var submenu=new Array()


submenu[0]='<a href="chinmayamission.php" class="main_links1">The Mission</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="swami-tapovan.php" class="main_links1">Sw Tapovan Maharaj</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="swami-chinmayananda.php" class="main_links1">Sw Chinmayananda</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="swami-tejomayananda.php" class="main_links1">Sw Tejomayananda</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="acharyas.php" class="main_links1">Acharyas</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="album.php" class="main_links1">Photos</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="logos.php" class="main_links1">Logos</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="cm-pledge.php" class="main_links1">Pledge</a></b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'

submenu[1]='<a href="activities.php" class="main_links1">Activities</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="courses.php" class="main_links1">Courses</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="projects.php" class="main_links1">Projects</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="schools-and-colleges.php" class="main_links1">Schools & Colleges</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="institutes.php" class="main_links1">Institutes</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></font>'

submenu[2]='&nbsp;&nbsp;<a href="centres.php" class="main_links1" class="main_links1">Centres</a><img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="ashrams.php" class="main_links1" class="main_links1">Ashrams</a><img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="temples.php" class="main_links1" class="main_links1">Temples & Shrines</a><img src="images/dash-white.jpg" width="5" height="14" hspace="2" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></font>'

submenu[3]='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="news-view.php" class="main_links1">News</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="events.php" class="main_links1">Events</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="i.php" class="main_links1">Itineraries</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></font>'

submenu[4]='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="publications.php" class="main_links1">Publications</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="magazines.php" class="main_links1">Magazines</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <!-- a href="newsletters.php" class="main_links1">Newsletters</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /--> <!--<a href="audio-video.php" class="main_links1">Audio/Video</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /--> <a href="scriptures.php" class="main_links1">Articles</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /--> <a href="webcast.php" class="main_links1">Webcast</a> </b></font>'

submenu[5]='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="login.php?act=logout" class="main_links1">Logout</a> <img src="images/dash.jpg" width="5" height="14" hspace="2" /> <a href="profile.php" class="main_links1">My Profile</a> </b></font>'

//Set delay before submenu disappears after mouse moves out of it (in milliseconds)
var delay_hide=400

/////No need to edit beyond here


function showit(which){
clear_delayhide()
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
menuobj.innerHTML=thecontent
else if (document.layers){
menuobj.document.write(thecontent)
menuobj.document.close()
}
}

function resetit(e){
	if (document.all&&!menuobj.contains(e.toElement))
		delayhide=setTimeout("showit(-1)",delay_hide)
	else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhide=setTimeout("showit(-1)",delay_hide)
}

function clear_delayhide(){
if (window.delayhide)
clearTimeout(delayhide)
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""


/* window 'load' attachment */
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}
/* Short Cut for getElementById*/
function $(element){
    if (typeof element == 'string') {
        if (document.getElementById) {
            element = document.getElementById(element);
        } else if (document.all) {
            element = document.all[element];
        } else{
            element = false;
        }
    } else {
        element = false;
    }
    return element;
}