		var problem_element;
		//var warning_message="It appears that you might be trying to put contact information in your posting. Maybe an email address?";
                 var warning_message="Our system detected a banned symbol, abbreviation or commercial phrase. If you're not trying to sell anything or hack our system for spam, then you probably typed some contact info like an email, website or link to another profile. You may also have mistyped or misspelled something or used an improper emoticon. Please check your message again and delete anything that could be flagging our system. Sorry for the inconvenience. Thanks.";

		// use this function to validate the input data
		function validateForm(form)
		{
	           // need to check to see that the textarea doesn't contain email addresses
	           //var values_to_test = new Array(document.myform.mytext, document.myform.yourtext);
		   var values_to_test = getTextAreas(form);

		   //alert ("There are " + values_to_test.length + " values.");

		   // now create a regular expression
		   var result = validate(values_to_test);
		   if (!result)
		   {
		           var username = document.usernameform.username.value;
			   alert (warning_message );
			   document.mojo.ContactInfoViolation.value=username;
		   }
		   return result;
	        }

		// figure out which input elements on the form
		// are text areas
		function getTextAreas(f)
		{
			//alert ("Calling getTextAreas(); length=" + f.length);
		        var ta = new Array();
			for (i=0;i<f.length;i++)
			{
				var x = f.elements[i];
				if (x.type == "text" || x.type == "textarea")
				{
			            //alert ("found: " + x.name);
				    ta.push(x);
			        }
			}
			return ta;
		}
		
		function validate(values)
		{
		   //alert("Calling validate().");
                   //var banned_list = new Array("@", "AIM", "YIM",   "MSN", "msn", "aol", "AOL", "\.com", "dot", "www", "http:");
                   // .com is causing a problem because the '.' is picking up everything need to figure out how to use a
                   // a dot as just a dot in regex's
                   var banned_list = new Array("@", "AIM", "YIM",   "MSN", "msn", "aol", "AOL",  "dot", "www", "http:");

		   var result=true;
		   //var re = new RegExp("@");
		   //var re2 = new RegExp("fuck");
		   //var regexs=new Array(re, re2);
		   var temp;
		   var i=0;
		   //for (i in regexs)
		   for (i in banned_list)
		   {
			   //alert("testing " + i);
                           var re = new RegExp(banned_list[i]);
			   //temp = validateForRegEx(values, regexs[i]);
			   temp = validateForRegEx(values, re);
			   //alert("tested " + i + "; temp: " + temp);
			   if (!temp) return false;
		   }
		   return true;
		}

		// returns true if everything's ok, false if the
		// data is not valid
		function validateForRegEx(values, re)
		{
		   var result=false;
		   var i=0;
		   for (i in values)
		   {
		           //alert("Testing: " + values[i].name);
			   if (values[i].value.match(re))
			   {
				   result = true;
				   x=values[i];
                                   //alert("Problem: " + values[i].value + ", " + re);
				   break;
			   };
		   }
		   //alert ("returning for regex: " + !result);
	           return !result;
		}


/* bust out of frames always */
function RemoveFrames()
{
	if (self.location != top.location) top.location = self.location;
}

/**********************************************************************************/


function launch(url,name)
{
	launchWindow(url, name, 750, 550, "status=yes,scrollbars=yes,resizable=yes,menubar=no,location=no,directories=no,toolbar=no");
}

function launchWindow(url, name, intWidth, intHeight, strProperties) 
{
	newWindow(url, name, intWidth, intHeight, strProperties);
}

function newWindow(url, name, intWidth, intHeight, strProperties)
{
	var mywin;
	var intVersion;
	var dummyDate = new Date(); 

	intVersion = navigator.appVersion.substring(0,1);
	if (strProperties == "") {
		strProperties = "scrollbars=yes,resizable=yes,menubar=no,location=no,directories=no,toolbar=no";
	}
	
	strProperties = "status=yes,height=" + intHeight + ",width=" + intWidth + "," + strProperties;

	// replace all non-alphacharacters with X
	if(name.replace)
		name = name.replace(/\W/g,"X");
	
	// lower case the string
	name = name.toLowerCase();
	
	mywin = window.open(url, name, strProperties);
	// check for NULL in case we are in a popup blocker
	if(mywin) {
		mywin.name = name
		if (mywin.opener == null) mywin.opener = self;
	} else {
		url = url.replace("PageType=2", "PageType=8");
		url = url.replace("PageType=4", "PageType=8");
		window.document.location = url;
	}

	
	// return handle to caller
	return mywin;
}


function popUp(url){
				window.open(url,"pop","width=500,height=470,toolbars=0,scrollbars=1")
			}

