	function trim(value) {
		var temp = value;
		var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
		 if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
		 var obj = / +/g;
		temp = temp.replace(obj, " ");
		if (temp == " ") { temp = ""; }
		 return temp;
	}
	
	function ValidateEmail(object_value)
	{		
		email_pattern=new RegExp("^[a-zA-Z0-9]+(([_]|\\.|-)?[a-zA-Z0-9])*@([a-zA-Z0-9]+([_]|-?[a-zA-Z0-9])*(\\.))+[a-zA-Z]{2,4}$");
		return object_value.search(email_pattern);
	}
	
	function isInt(){	
		if (
		(event.keyCode > 47 && event.keyCode < 58) 
		) event.returnValue = true;
		else event.returnValue = false;
	}
	
	function openWindow(sUrl,title,toolbar,scrollbars,location,statusbar,menubar,resizable,left,top,width,height) 
	{
		var newWindow;
		newWindow = eval("window.open('"+sUrl+"','"+title+"','toolbar="+toolbar+",scrollbars="+scrollbars+",location="+location+",statusbar="+statusbar+",menubar="+menubar+",resizable="+resizable+",left="+left+",top="+top+",width="+width+",height="+height+"')");		
	}; 