function checkform (form)
{
	if (form.longURL.value == "")
	{
		alert ("Please type or paste a web address to shorten into the input box.");
		form.longURL.focus();
		return false;
	}
	var found = false;
	
	if(form.longURL.value.length > 2000)
	{
		alert ("URL should not exceed 2000 chatacters");
		form.longURL.focus();
		return false;
	}

	for (var i=0;i<form.longURL.value.length;i++)
	{
		var chr = form.longURL.value.charAt(i);
		if(chr=='.')
		{
			found = true;
			break;
		}
	}
	if (found == false)
	{
		alert ("Please type or paste a valid web address into the input box.");
                form.longURL.focus();
                return false;
	}
	return true;
}
function focusbox() {
	el = document.getElementById('longURL');
	el.focus();
}

