function popup_window(URLname,width,height,left,top,scrollbar)
{
	var popup;
	popup=window.open(URLname, "winid", 'width='+width+', height='+height+', left='+left+', top='+top+', scrollbars='+scrollbar+',screenX=0,screenY=0,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=yes');
	popup.focus(); 
}
function popup_window_max(URLname)
{
	var popup1;
	popup1=window.open(URLname, "winid1",'554,730,scrollbars=yes');
	popup1.focus();
}

function isNotNumeric(s)
{ 
	if(isNaN(s))
	{
		return(true);
	}
	return(false);
}
function strtrim(str) //function to trim a string
{
	var temp = str;
	var obj =/^(\s*)(\w*)(\s*)$/;
	if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
	return  temp;
}
function isnotvalid(str) //funtion to check spaces in string
{
	var temp = str;
	var obj =/\w*\s+\w*/;
	return obj.test(temp); 
}
All_phonechars = " 1234567890+-.()-\/";
function isValid_Phone(s)
{
	var i;
	for(i=0;i < s.length;i++)
	{
		var currchar = s.charAt(i);
		//window.alert(All_phonechars.indexOf(currchar));
		if(All_phonechars.indexOf(currchar) == -1)
		{
			return true;
		}
	}
	return false;
}
function isvalidmail(str) //function to validate Email Address
{
	/*var temp = str;
	var obj =/^(\w|-|\.)+@(\w|-)+\.\w{1,4}(\.\w{1,4})?$/;
	return obj.test(temp); */
	if (str.indexOf ('@',0) == -1 || str.indexOf ('.',0) == -1)
	    return 1;
    else
        return 0;
}
whitespace = "\t \n\r";
function isEmptyString(s)
{
    var i;
	if((s == null) || (s.length == 0)) return true;
	for(i=0;i < s.length;i++)
	{
		var currchar = s.charAt(i);
		if(whitespace.indexOf(currchar) == -1) return false;
	}
	return true;
}
