// JavaScript Document
function fnDescLen()
{
		var str = new String();
		str = document.ADDWEB.DESCRIPTION.value;
		var varLen = str.length;

		if (varLen > 256)
		{
				alert ("Description is more \nthan 256 characters!\nInput has been truncated.");
				str = str.substr(0,256);
				document.ADDWEB.DESCRIPTION.value = str;
				document.ADDWEB.DESCRIPTION.focus();
		}
}

function countChars(varObj)
{
		str = varObj;
		var varlen = str.length;
		
		window.status = "number of characters = " + varlen;
}

function validateForm()
{
		var str = new String();
		
		str = document.ADDWEB.EMAIL.value;
		if(str.length == "")
		{
			alert ("Please enter your contact Email");
			document.ADDWEB.EMAIL.focus();
			return false;	
		}	
		str = document.ADDWEB.WEB_URL.value;
		if(str.length == "")
		{
			alert ("Please enter site URL eg: www.yourdomain.com");
			document.ADDWEB.WEB_URL.focus();
			return false;	
		}	
		str = document.ADDWEB.URL_TO_US.value;
		if(str.length == "")
		{
			alert ("Please enter reciprocal link URL.");
			document.ADDWEB.URL_TO_US.focus();
			return false;	
		}	
		str = document.ADDWEB.TITLE.value;
		if(str.length == "")
		{
			alert ("Please enter your site's title");
			document.ADDWEB.TITLE.focus();
			return false;	
		}	
		str = document.ADDWEB.DESCRIPTION.value;
		if(str.length == "")
		{
			alert ("Please enter your site's description");
			document.ADDWEB.DESCRIPTION.focus();
			return false;	
		}	

}