function Trim(s) 
{
	return s.replace(/^\s+/g, '').replace(/\s+$/g, '');
}

function checkValid()
{
	var tomatch= "/http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/";
	with(document.frmurl)
	{
		if(vURL.value =="" )
		{
			alert("Please Enter valid Long URL!");
			vURL.focus();
			return false;
		}
	}
}
function checkValidAPI()
{
	var tomatch= "/http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/";
	with(document.frmurlapi)
	{
		if(vURL.value =="" )
		{
			alert("Please Enter valid Long URL!");
			vURL.focus();
			return false;
		}
	}
}
function alphanum(value,length)
{
	chk1="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_.";
	for(i=0;i<length;i++)
	{
		ch1=value.charAt(i);
		rtn1=chk1.indexOf(ch1);
		if(rtn1==-1)
			return false;
	}
	return true;
}