/*--------------------------------------------------
Please declare all javascript functions that needed
inside this global.js
--------------------------------------------------*/

function confirm_url(durl)
{
 var where_to= confirm("Do you really want to perform this action ?");
 if (where_to== true)
 {
   window.location=durl;
 }
}

function validate_email(field)
{
apos=field.indexOf("@");
dotpos=field.lastIndexOf(".");
if (apos<1||dotpos-apos<2) 
  {return false;}
else {return true;}
}

function subWindows(url, height, width){	
	var left = parseInt((screen.availWidth/2) - (width/2));
	var top = parseInt((screen.availHeight/2) - (height/2));	
	window.open(url, '_blank', 'width='+width+',height='+height+',resizable=no,scrollbars=yes,top='+top+',left='+left);
}
