var ray=
{
validateInp:function()
	{
	var frm=document.getElementsByTagName('form')[0]; // Get a copy of our form
	frm.onsubmit=function()
		{
		var inps=this.getElementsByTagName('input'); // Get a copy of all the input elements
		var txtArea=this.getElementsByTagName('textarea') ; // Get a copy of all the textarea
		 for(var i=0;i<inps.length;i++) // Loop through all the textarea and input
			{
			if (inps[i].value.indexOf('http')>-1 ||
			inps[i].value.indexOf('ftp')>-1 ||
			inps[i].value.indexOf('www')>-1 ||
			inps[i].value.match(/(([\w\-]?)+\.)+([a-z]{2,4})/)
			) // If culprit detected
				{
				alert('Action not allowed.'); // Show me the message
				return false; // Don't submit the form
				}
			}
		for(var c=0;c<txtArea.length;c++)
			{
			if (txtArea[c].value.indexOf('http')>-1 ||
			txtArea[c].value.indexOf('ftp')>-1 ||
			txtArea[c].value.indexOf('www')>-1 ||
			txtArea[c].value.match(/(([\w\-]?)+\.)+([a-z]{2,4})/)
			) // If culprit detected
				{
				alert('Action not allowed.'); // Show me the message
				return false; // Don't submit the form
				}
			} // End of the for loop
		} // End of the function declaration
	} // End of the function declaration
} // End of the object

window.onload=function()
	{
		ray.validateInp(); // Call the validateInp function inside ray object
	}