/*
=======================================================================
Copyright W3Now Web Design, Inc.  
W3WebForms.com    W3Now.com   W3SiteBuilder.com   W3WebTemplates.com
This information must remain in tact as presented here

Visit http://W3WebForms.com/  
to easily generate functional online forms for your web pages. 

The form information can be emailed to you or stored in a CSV file in your web site directory
Making an online form for your web page is easy...just log in, make a few entries, then copy the 
generated HTML code into your web page for a fully functional, spam-proof online form 

Forms generated by W3WebForms.com are spam-proof and fully functional.

=======================================================================
*/

function validURL(thisURL) {  
   firstSeven1= thisURL.substring(0,7); 
   firstSeven= firstSeven1.toLowerCase();
	if (firstSeven != 'http://' && firstSeven != 'https:/') {
	// alert("here1" + firstSeven);
		return false;
	} 
	validChars = ":/.-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ~_=?+"; 
	spaces=0;
	dots=0;
	letters=0;
	for (z=0; z<thisURL.length; z++) { 
		charOK=false;
		for (i=0; i<validChars.length; i++) {
				if (thisURL.charAt(z)== validChars.charAt(i) ) { 
					charOK=true;
					break;
				}  
		}
		if (!charOK)  {
	// alert("here2");
		return false;
	} 
		letters++ 
		if (thisURL.charAt(z)==".") dots++
	} 
	if (letters <11) {
	// alert("here3");
		return false;
	} 
	if (dots ==0) {
	 //alert("here4");
		return false;
	} 
	
	return true;
}
