function checkForm(theForm) {
    var why = "";
	why += checkUrl(theForm.url.value);
	why += checkName(theForm.name.value);
	why += checkEmail(theForm.email.value);
	why += checkTitle(theForm.title.value);
	why += checkDescrip(theForm.descrip.value);
	why += checkCategory(theForm.cat.value);
	
	why += checkReturn(theForm.returnurl.value);
	why += checkBanner(theForm.banner.value);
    if (why != "") {
       alert(why);
       return false;
    }
return true;
}



function checkEmail(strng) {
	var error = "";
	if (strng == "") {
   		error = "Please enter an Email Address.\n";
	}

	var emailFilter = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w+)$/;
	if (!(emailFilter.test(strng))) {
		error = "The Email Address is not valid.  Please enter a valid Email Address.\n";
	}
	return error;
}


function checkName(strng) {
	var error = "";
	if (strng == "") {
		error = "Please enter a Contact Name.\n";
	}
	var none = /\?|\!|\<|\>|\[|\]|\{|\}|\@|\$|\%|\*/;
	if (none.test(strng)) {
		error = "The Contact Name contains characters that are not allowed.  Please correct the Contact Name.\n";
	}
	return error;
}


function checkUrl(strng) {
	var error = "";
	if (strng == "") {
   		error = "Please enter a URL for your site.\n";
	}
	var urlFilter=			/^(http|https)(\:\/\/)(\w+)?(\.)?(\w+)(\-)?(\w+)?(\.)(\w+)(\/)?(\w+)?(\.\w+)?(\/\w+\.\w+)?$/;
	if (!(urlFilter.test(strng))) {
		error = "The Site URL entered is not valid.  Please re-enter the URL for your site.\n";
	}
	return error;
}

function checkTitle(strng) {
	var error = "";
	if (strng == "") {
		error = "Please enter a Title.\n";
	}
	var none = /\<|\>|\[|\]|\{|\}|\*/;
	if(none.test(strng)) {
		error = "The Title contains characters that are not allowed.  Please correct the Title.\n";
	}
	return error;
}

function checkDescrip(strng) {
	var error = "";
	if (strng == "") {
		error = "Please enter a Description.\n";
	}
	var none = /\<|\>|\[|\]|\{|\}|\*/;
	if(none.test(strng)) {
		error = "The Description contains characters that are not allowed.  Please correct the Description.\n";
	}
	return error;
}

function checkBanner(strng) {
	var error = "";
	var filter = 
/^(http|https)(\:\/\/)(\w+)?(\.)?(\w+)(\-)?(\w+)?(\.)(\w+)(\/)?(\w+)?(\.\w+)?(\/\w+)*(\.\w+)?$/;
	if (strng == "") {
		error = "";
	}
	else if ((strng != "") && (!(filter.test(strng)))) {
		error = "The Banner URL is not valid.  Please re-enter the URL for your Banner.\n";
	}
	return error;
}


function checkReturn(strng) {
	var error = "";
	if (strng == "") {
   		error = "Please enter a Reciprocal URL.\n";
	}
	//var filter = /^(http|https)(\:\/\/)(\w+)?(\.)?(\w+)(\-)?(\w+)?(\.)(\w+)(\/)?(\w+)?(\.\w+)?(\/\w+)*(\.\w+)?$/;
	//if (!(filter.test(strng))) {
	//	error = "The Reciprocal URL is not valid.  Please re-enter your Reciprocal URL.\n";
	//}
	return error;
}

function checkCategory(strng) {
	var error = "";
	if (strng == "") {
		error = "Please select a Category.\n";
	}
	return error;
}
		
































