// _lib/functions.js

// verify action

function verify() {
        if (confirm("Are you sure?")) {
            return true;
        } else {
            return false;
        }
    }

function verify2() {
        if (confirm("Confirm logging out ?")) {
            return true;
        } else {
            return false;
        }
    }
	
function validate(frm) {
        msg = "Your search need an input ";
		x = 0;
		for (i=0; i<frm.elements.length; i++ ) {
		    if(/^\s*$/.test(frm.elements[i].value)) {
			       msg += frm.elements[i].name+"\n";
				   x = 1;
				   }
	     }
		 if (x == 1) {
		         alert (msg);
				 return false;
		 }		 
}

function openWindow(callURL) {
 if (navigator.appName == "Microsoft Internet Explorer") {
 thiswin = window.open(callURL, 'wU' ,'width=700, height=545, top=0, screenY=0, toolbar=no, menubar=no, srollbars=no, resizable=no, location=no, directories=no, status=no');
 }
 else {
 thiswin = window.open(callURL, 'wU', 'width=700,height=540,toolbar=no, menubar=no, srollbars=no, resizable=no, location=no, directories=no, status=no');
 }
 thiswin.focus();
 }

