/*
************************************************************************************
		THIS ENTIRE COPYRIGHT NOTICE MUST REMAIN IF ANY PART OF THIS CODE IS USED

Script name: e-CHO main program scripts
Author: Colin Bell
Version: 1.3
Release date: 01/09/2004

				Copyright 2004 GateWest New Media. All rights reserved.
*************************************************************************************
*/

var whichField = "";
var activeField = "";
var objWordTarget;

function choose_other(item, itemHeight,itemWidth){

	var myParent = parent.opener.document.GENERATE.Gholder.value;
	var myParentHeight = myParent + "_height";
	var myParentWidth = myParent + "_width";
  
  	if (myParent != ""){
  	var myParent  =eval("parent.opener.document.GENERATE." + myParent);
  	var myParentHeight  =eval("parent.opener.document.GENERATE." + myParentHeight);
  	var myParentWidth  =eval("parent.opener.document.GENERATE." + myParentWidth);
	myParent.value = item;
	myParentHeight.value = itemHeight;
	myParentWidth.value = itemWidth;
    self.close();   
    
   }
 }
 
 
function doPageLink(item){
	var myParent = parent.opener.document.GENERATE.Gholder.value;
	myParent  =eval("parent.opener.document.GENERATE." + myParent);
	qid = parent.opener.document.GENERATE.qid.value;
	myParent.value = item;
	
	parent.opener.pAnswer(qid, item,'','C');

}

function insertFile(item){

	var myParent = parent.opener.document.GENERATE.Gholder.value;
  
  	if (myParent != ""){
  	var myParent  =eval("parent.opener.document.GENERATE." + myParent);
	myParent.value = myParent.value + URLDecode(item);
    self.close();   
   }
 }
 
function changeFocus(field, formName){
	whichField = field;
	var currentField = eval("document."+ formName +".Gholder");
	currentField.value = whichField.name;
	activeField = eval("document."+ formName +"." + whichField.name);

}

//For finding the cursor position in textareas
//ONLY WORKS ON IE
// ====================================================================
function storeCaret(textEl){
	if (textEl.createTextRange){
		textEl.caretPos = document.selection.createRange().duplicate();
	}
	else{
		//not supported on this platform
		//alert("No createTextRange");
	}
}

function insertAtCaret(textEl, text){
	if (textEl.createTextRange && textEl.caretPos) {
		var caretPos = textEl.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
	}
	else{
         textEl.value  = textEl.value + " " + text;
         }
}

//ENCODE AND DECODER FUNCTIONS
// ====================================================================
function URLEncode(plaintext)
{
	// The Javascript escape and unescape functions do not correspond
	// with what browsers actually do...
	var SAFECHARS = "0123456789" +					// Numeric
					"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +	// Alphabetic
					"abcdefghijklmnopqrstuvwxyz" +
					"-_.!~*'()";					// RFC2396 Mark characters
	var HEX = "0123456789ABCDEF";

	var encoded = "";
	for (var i = 0; i < plaintext.length; i++ ) {
		var ch = plaintext.charAt(i);
	    if (ch == " ") {
		    encoded += "+";				// x-www-urlencoded, rather than %20
		} else if (SAFECHARS.indexOf(ch) != -1) {
		    encoded += ch;
		} else {
		    var charCode = ch.charCodeAt(0);
			if (charCode > 255) {
			    alert( "Unicode Character '" + ch + "' cannot be encoded using standard URL encoding.\n" +
				        "(URL encoding only supports 8-bit characters.)\n" +
						"A space (+) will be substituted." );
				encoded += "+";
			} else {
				encoded += "%";
				encoded += HEX.charAt((charCode >> 4) & 0xF);
				encoded += HEX.charAt(charCode & 0xF);
			}
		}
	} // for
	return(encoded);
};

function URLDecode(encoded)
{
   // Replace + with ' '
   // Replace %xx with equivalent character
   // Put [ERROR] in output if %xx is invalid.
   var HEXCHARS = "0123456789ABCDEFabcdef"; 
   var plaintext = "";
   var i = 0;
   while (i < encoded.length) {
       var ch = encoded.charAt(i);
	   if (ch == "+") {
	       plaintext += " ";
		   i++;
	   } else if (ch == "%") {
			if (i < (encoded.length-2) 
					&& HEXCHARS.indexOf(encoded.charAt(i+1)) != -1 
					&& HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) {
				plaintext += unescape( encoded.substr(i,3) );
				i += 3;
			} else {
				alert( 'Bad escape combination near ...' + encoded.substr(i) );
				plaintext += "%[ERROR]";
				i++;
			}
		} else {
		   plaintext += ch;
		   i++;
		}
	} // while
   return(plaintext);
};


function drawIcon(whatField) {
	//if they are on a mac or netscape they cant use the word function
	if (is_ie4up && is_win)
		{
	//document.write("<IMG ALIGN=\\"top\\" SRC=\\"/$echoconfig{'theSiteFolderName'}/echo/images/word.gif\\" onClick=\\"JavaScript: objWordTarget='"+ whatField +"'; wordfile.click(); WordConvert();\\">");
		}
	
	}	
	
	function Insert( objItem, strLeftText, strRightText, intLoop)
	{
		if (objItem.createTextRange && objItem.caretPos)
		{
			var caretPos = objItem.caretPos;
			caretPos.text = strLeftText+caretPos.text+strRightText;
			caretPos.select();
		}
	}
	
	function WordConvert()
	{
		var objWord;
		var objDoc;
		var objNewDoc;
		var strTxt;
		var intFmt;
		var intLoop;

		objWord=new ActiveXObject('Word.Application');
		
		for(intLoop=1;intLoop<16;intLoop++)
		{
			if (objWord.FileConverters(intLoop).ClassName=='HTML') intFmt=objWord.FileConverters(intLoop).SaveFormat;
		}
			
		if (intFmt==-1)
			alert('Your copy of word does not support HTML');
		else
		{
			objDoc = objWord.Documents.Open(wordfile.value, false, true);
			objDoc.Content.Copy();
			objNewDoc = objWord.Documents.Add();
			objNewDoc.SaveAs('c:\\webword.txt', intFmt);
			objNewDoc.Content.Paste();
			objNewDoc.SaveAs('c:\\webword.txt', intFmt);
			objNewDoc.Close();
			objDoc.Close();
			delete objDoc;
			delete objNewDoc;
			objDoc = objWord.Documents.Open('c:\\webword.txt', false, true);
			strTxt=objDoc.Content.Text;
			objDoc.Close();
			delete objDoc;
		}
		
		objWord.Quit(false);

		delete objWord;
		
		strTxt=strTxt.substring( strTxt.indexOf( '<BODY' )+5 );
		strTxt=strTxt.substring( strTxt.indexOf( '>' )+1 );
		strTxt=strTxt.substring( 0, strTxt.indexOf('</BODY>')-7 );
		// This is due to a bug in IE!!!
		strTxt=strTxt.replace('\<P ALIGN="CENTER"\>','');
		
		objWordTarget.value=strTxt;
	}

function x () {

}

function changeField(fieldName){
document.GENERATE.Gholder.value = fieldName;

}

    function validateFileEntry(validString, field) {
        var isCharValid = true;
        var i, invalidChar;
        for (i=0; i<validString.length; i++) {
            if (validString.charAt(0) == '.') {
                isCharValid = false;
                validString = validString.substr(1, validString.length-1);
                i = validString.length;
            }
            if (validateCharacter(validString.charAt(i)) == false) {
                isCharValid = false;
                invalidChar = validString.charAt(i);
                validString = validString.substr(0, i) + validString.substr(i+1, validString.length-1);
                i = validString.length;
            }
        }
        if (i < 1) { return false; }
        if (isCharValid == false) {
            if (invalidChar) alert("Invalid filename. Can't contain '" + invalidChar + "'. Filename adjusted.");
            else alert('Invalid filename. Filename adjusted.');
            if (field) {
                field.value = validString;
                field.focus();
                field.select();
            }
            return false;
        }
        return true;
    }

    function validateCharacter(character) {
       if ((character >= 'a' && character <= 'z') || ( character >='A' && character <='Z') || ( character >= '0' && character <= '9') || ( character =='-') || ( character == '.') || ( character == '_')) return true; 
       else return false;
    }
    
function fileServerFileName() {

		var fileName = window.document.GENERATE.URL.value.toLowerCase();
		var inName = 'layer1';
		var is_Amac  = ((fileName.indexOf('file:///')!=-1));

       //netscape6 does not like this
        if (!is_nav5){window.document.GENERATE.URL.value = fileName.substring(fileName.lastIndexOf("\\\\") + 1,fileName.length);}
  		
    }
    
function serverFileName() {

		var fileName = window.document.GENERATE.URL.value.toLowerCase();
		var inName = 'layer1';
		var is_Amac  = ((fileName.indexOf('file:///')!=-1));

		// mac handles file names a little different
	
		if (is_Amac){var inText = '<img name="sizeimage" src="file://' + fileName + '">';}
		else {var inText = '<img name="sizeimage" src="file:/' + fileName + '">';}
		
		
//var agt=navigator.userAgent.toLowerCase(); 
		//alert(agt);
		pWriteDiv(inName,inText);
       
       //netscape6 does not like this
        if (!is_nav5){window.document.GENERATE.URL.value = fileName.substring(fileName.lastIndexOf("\\\\") + 1,fileName.length);}
  		
  		
  		myTimer=setTimeout("setHandW()",500);
  		clearTimeout("myTimer")
    }
    
      function setHandW()
  {
  	if (is_nav4){
  		window.document.GENERATE.pHeight.value = document.layer1.document.sizeimage.height;
  		window.document.GENERATE.pWidth.value = document.layer1.document.sizeimage.width;
 	 }
 	 
 	 if (is_ie4){
  		window.document.GENERATE.pHeight.value = document.all['layer1'].document.sizeimage.height;
  		window.document.GENERATE.pWidth.value = document.all['layer1'].document.sizeimage.width;
 	 }
 	 
 	 if (is_5up){
  		window.document.GENERATE.pHeight.value = document.getElementById('layer1').document.sizeimage.height;
  		window.document.GENERATE.pWidth.value = document.getElementById('layer1').document.sizeimage.width;
 	 }
  
  }
  
  function pWriteDiv(inName,inText){
	var tDoc;
	if(is_nav4){
	eval("tDoc=document." + inName + ".document");
	tDoc.open();
	tDoc.write(inText);
	tDoc.close();
	}
	if  (is_ie4){document.all[inName].innerHTML=inText;	}
	if  (is_5up){document.getElementById(inName).innerHTML=inText;	}  
} 

function setAutonomyBirthDate(whichField){
	var currentField = eval("document.GENERATE." + whichField);
	var whichDayField = eval("document.GENERATE." + whichField + "Day");
	var whichMonthField = eval("document.GENERATE." + whichField + "Month");
	var whichYearField = eval("document.GENERATE." + whichField + "Year");
	
	//check to make sure that dates are correct ie nov only has 30 days
	// or else this results in a date parse error
	var thisMonth = whichMonthField.value;
	var thisDay = whichDayField.value;
	if ((thisMonth == 1) || (thisMonth == 3) || (thisMonth == 5) || (thisMonth == 7) || (thisMonth == 9) || (thisMonth == 11)){
		if(thisDay > 30){
			thisDay = 30;
			whichDayField.selectedIndex = (whichDayField.selectedIndex-1);
			alert("Invalid Date\nThe month you have selected only has 30 days ");
		}
	}
	
	//sort out feb
	if (thisMonth == 2){
		if(thisDay > 28){
			thisDay = 28;
			whichDayField.selectedIndex = (whichDayField.selectedIndex-2);
			alert("Invalid Date\nThe month you have selected only has 28 days ");
		}
	}
	
	//make sure the date is not older than today
	var today = new Date();
	
	var sYear = whichYearField.value;
	var s = new Date(sYear,thisMonth - 1,thisDay);
	
	if(s.getTime() > today.getTime()){
		alert("The date you have chosen is newer than today, it has been reset");
		//reset the fields to days date
		whichYearField.selectedIndex = whichYearField.selectedIndex - (sYear - today.getFullYear());
		whichMonthField.selectedIndex = whichMonthField.selectedIndex - ((thisMonth-1) - today.getMonth());
		whichDayField.selectedIndex = whichDayField.selectedIndex - ((thisDay) - today.getDate());
		}
	
	var date = whichYearField.value +"-" + whichMonthField.value + "-" + thisDay;
	currentField.value = date;

}

function setDate(whichField){
	//'YYYYMMDD hh:mn:ss.mil' should be compatible wth all dbs
	var currentField = eval("document.GENERATE." + whichField);
	var whichDayField = eval("document.GENERATE." + whichField + "Day");
	var whichMonthField = eval("document.GENERATE." + whichField + "Month");
	var whichYearField = eval("document.GENERATE." + whichField + "Year");
	
	//check to make sure that dates are correct ie nov only has 30 days
	// or else this results in a date parse error
	var thisMonth = whichMonthField.value;
	var thisDay = whichDayField.value;
	if ((thisMonth == 1) || (thisMonth == 3) || (thisMonth == 5) || (thisMonth == 7) || (thisMonth == 9) || (thisMonth == 11)){
		if(thisDay > 30){
			thisDay = 30;
			whichDayField.selectedIndex = (whichDayField.selectedIndex-1);
			alert("Invalid Date\nThe month you have selected only has 30 days ");
		}
	}
	
	//sort out feb
	if (thisMonth == 2){
		if(thisDay > 28){
			thisDay = 28;
			whichDayField.selectedIndex = (whichDayField.selectedIndex-2);
			alert("Invalid Date\nThe month you have selected only has 28 days ");
		}
	}
	
	var date = whichYearField.value +"" + whichMonthField.value + "" + thisDay + " 00:00:00";
	currentField.value = date;

}

function setDateTime(whichField){
	//'YYYYMMDD hh:mn:ss.mil' should be compatible wth all dbs
	var currentField = eval("document.GENERATE." + whichField);
	var whichDayField = eval("document.GENERATE." + whichField + "Day");
	var whichMonthField = eval("document.GENERATE." + whichField + "Month");
	var whichYearField = eval("document.GENERATE." + whichField + "Year");
	var whichHourField = eval("document.GENERATE." + whichField + "Hour");
	var whichMinuteField = eval("document.GENERATE." + whichField + "Minute");
	
	//check to make sure that dates are correct ie nov only has 30 days
	// or else this results in a date parse error
	var thisMonth = whichMonthField.value;
	var thisDay = whichDayField.value;
	if ((thisMonth == 1) || (thisMonth == 3) || (thisMonth == 5) || (thisMonth == 7) || (thisMonth == 9) || (thisMonth == 11)){
		if(thisDay > 30){
			thisDay = 30;
			whichDayField.selectedIndex = (whichDayField.selectedIndex-1);
			alert("Invalid Date\nThe month you have selected only has 30 days ");
		}
	}
	
	//sort out feb
	if (thisMonth == 2){
		if(thisDay > 28){
			thisDay = 28;
			whichDayField.selectedIndex = (whichDayField.selectedIndex-2);
			alert("Invalid Date\nThe month you have selected only has 28 days ");
		}
	}
	
	var date = whichYearField.value +"" + whichMonthField.value + "" + thisDay + " " + whichHourField.value + ":" + whichMinuteField.value + ":00";
	currentField.value = date;

}

function setAutonomyDate(whichField){
	var currentField = eval("document.GENERATE." + whichField);
	var whichDayField = eval("document.GENERATE." + whichField + "Day");
	var whichMonthField = eval("document.GENERATE." + whichField + "Month");
	var whichYearField = eval("document.GENERATE." + whichField + "Year");
	var date = whichDayField.value +"/" + whichMonthField.value + "/" + whichYearField.value;
	currentField.value = date;

}


function pAction(action) {
	var newText;
	var currentText = whichField.value;
	
	if (whichField == ""){
	alert("You must select a field in which to type");
	return;
	}
	
	else{
	
	if (action == "url") {
	var thisURL = prompt("Enter the complete URL for the link you wish to add.", "http://");
	var thisTitle = prompt("Now enter the title of the web page you wish to reference.  For instance, if you are linking to the URL for infopop, you might use the title Infopop Homepage.", "web page");
	var urlEchoText = "<A HREF="+thisURL+">"+thisTitle+"</A>";
	insertAtCaret(whichField, urlEchoText);
	whichField.focus();
	return;
	}
	
	if (action == "flashurl") {
	var thisMeta = prompt("Enter the metadata to link too.", "");
	var thisTitle = prompt("Now enter the title of the link you wish to reference.", "Title");
	var urlEchoText = "<A HREF=\"asfunction:_root.openRelatedPage,"+thisMeta+"\">"+thisTitle+"</A>";
	insertAtCaret(whichField, urlEchoText);
	whichField.focus();
	return;
	}
	
	if (action == "directflashurl") {
	var thisMeta = prompt("Enter the page to link too.", "xmldata.xml");
	var thisTitle = prompt("Now enter the title of the link you wish to call.", "Title");
	var urlEchoText = "<A HREF=\"asfunction:_root.callDirectUrl,"+thisMeta+"\">"+thisTitle+"</A>";
	insertAtCaret(whichField, urlEchoText);
	whichField.focus();
	return;
	}
	
	if (action == "addanchor") {
	var thisANCHOR = prompt("Enter the name for this anchor, please make a note of it as you will need to reference it later", "");
	var urlEchoText = "<A NAME="+thisANCHOR+"></A>";
	insertAtCaret(whichField, urlEchoText);
	whichField.focus();
	return;
	}
	
	if (action == "refanchor") {
	var thisURL = prompt("Enter the name for the anchor you wish to reference", "");
	var thisTitle = prompt("Now enter the name you would like to call this link.", "");
	var urlEchoText = "<A HREF=#"+thisURL+">"+thisTitle+"</A>";
	insertAtCaret(whichField, urlEchoText);
	whichField.focus();
	return;
	}
	
	if (action == "menuUrl") {
	window_open('/echo/createpage.jsp?action=pagelink',600,450);
	return;
	}
	
	if (action == "email") {
	var thisURL = prompt("Enter the complete email address that you wish to add.", "");
	var thisEmail = prompt("Now enter the name of the person you wish to reference.", "Name");
	var urlEchoText = "<A HREF=mailto:"+thisURL+">"+thisEmail+"</A>";
	insertAtCaret(whichField, urlEchoText);
	whichField.focus();
	return;
	}
	
	if (action == "colouredText") {
	window_open('formatter.jsp?action=show',400,250);
	return;
	}

	if (action == "bold") {
	var thisBold = prompt("Enter the text that you wish to make bold.", "");
	var boldEchoText = "<B>"+thisBold+"</B>";
	insertAtCaret(whichField, boldEchoText);
	whichField.focus();
	return;
	}

	if (action == "italics") {
	var thisItal = prompt("Enter the text that you wish to italicize.", "");
	var italEchoText = "<I>"+thisItal+"</I>";
	insertAtCaret(whichField, italEchoText);
	whichField.focus();
	return;
	}

	if (action == "image") {
	var thisImage = prompt("Enter the complete URL for the image you wish to display.", "http://");
	var imageEchoText = "[IMG]"+thisImage+"[/IMG]";
	insertAtCaret(whichField, imageEchoText);
	whichField.focus();
	return;
	}

	if (action == "code") {
	var codeEchoText = "<SCRIPT>  </SCRIPT>";
	insertAtCaret(whichField, codeEchoText);
	whichField.focus();
	return;
	}

	if (action == "liststart") {
	var liststartEchoText = "<ul>";
	insertAtCaret(whichField, liststartEchoText);
	whichField.focus();
	return;
	}

	if (action == "listend") {
	var listendEchoText = "</ul>";
	insertAtCaret(whichField, listendEchoText);
	whichField.focus();
	return;
	}
	
	if (action == "listitem") {
	var thisItem = prompt("Enter the new list item.  Note that each list group must be preceeded by a List Start and the entire list group must end with a List End (in order to display properly).", "");
	var itemEchoText = "<li>"+thisItem;
	insertAtCaret(whichField, itemEchoText);
	whichField.focus();
	return;
	}

	if (action == "teletype") {
	var codeEchoText = "[TT]  [/TT]";
	newText = currentText+codeEchoText;
	insertAtCaret(whichField, newText);
	whichField.focus();
	return;
	}

	if (action == "color") {
	var codeEchoText = "<COLOR=red> </COLOR>";
	newText = currentText+codeEchoText;
	insertAtCaret(whichField, newText);
	whichField.focus();
	return;
	}
}
	}
	
	
	// HISTORY WINDOW
function historyWindow(url) {
	window.open(url,"History","scrollbars=1,menubar=1,status=1,width=500,height=400");
	}

//FIELD VALIDATION FUNCTIONS
// ====================================================================

function emailCheck(emailStr) {

//stop if the string is empty we check for empy fields elsewhere
if(emailStr.length == 0){
	return true;
}

var errMessage;

var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")


var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
  /* Too many/few @'s or something; basically, this address doesn't
     even fit the general mould of a valid e-mail address. */
	errMessage = "Email address seems incorrect (check @ and .'s)";
	return errMessage;
}
var user=matchArray[1]
var domain=matchArray[2]

// See if "user" is valid 
if (user.match(userPat)==null) {
    // user is not valid
    errMessage = "The username doesn't seem to be valid."
    return errMessage;
}

// if the e-mail address is at an IP address (as opposed to a symbolic host name) make sure the IP address is valid.
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
    // this is an IP address
	  for (var i=1;i<=4;i++) {
	    if (IPArray[i]>255) {
	        errMessage = "Destination IP address is invalid!";
		return errMessage;
	    }
    }
    return errMessage;
}

// Domain is symbolic name
var domainArray=domain.match(domainPat)
if (domainArray==null) {
	errMessage = "The domain name doesn't seem to be valid."
    return errMessage;
}

/* Now we need to break up the domain to get a count of how many atoms
   it consists of. */
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 || 
    domArr[domArr.length-1].length>3) {
   // the address must end in a two letter or three letter word.
   errMessage = "The address must end in a three-letter domain, or two letter country.";
   return errMessage;
}

// Make sure there's a host name preceding the domain.
if (len<2) {
   errMessage = "This address is missing a hostname!";
   return errMessage;
}

// If we've gotten this far, everything's valid!
return true;
}


function  validateNumeric(strValue) {
/******************************************************************************
DESCRIPTION: Validates that a string contains only valid numbers.

PARAMETERS:
   strValue - String to be tested for validity

RETURNS:
   True if valid, otherwise false.
******************************************************************************/
  var objRegExp  =  /(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/;

  //check for numeric characters
  var test = objRegExp.test(strValue);
  
  //if the string had length
	if(strValue.length > 0){
		if(test == false){return("This field may only contain numbers");}
		else{return(true);}
		}
	else{
		return(true);
	}
}

function checkForEmptyString(Str){
	if(Str.length > 0){
		return(true);
	}
	else{
		return("This field is empty");
	}
}
	
function lettersOnly(Str){
	if(Str.indexOf("#") != -1){return("Please remove the \"#\"");}
	if(Str.indexOf("@") != -1){return("Please remove the \"@\"");}
	if(Str.indexOf("!") != -1){return("Please remove the \"!\"");}
	if(Str.indexOf("£") != -1){return("Please remove the \"£\"");}
	if(Str.indexOf("$") != -1){return("Please remove the \"$\"");}
	if(Str.indexOf("%") != -1){return("Please remove the \"%\"");}
	if(Str.indexOf("&") != -1){return("Please remove the \"&\"");}
	if(Str.indexOf("(") != -1){return("Please remove the \"(\"");}
	if(Str.indexOf(")") != -1){return("Please remove the \")\"");}
	if(Str.indexOf("+") != -1){return("Please remove the \"+\"");}
	if(Str.indexOf("=") != -1){return("Please remove the \"=\"");}
	if(Str.indexOf("?") != -1){return("Please remove the \"?\"");}
	if(Str.indexOf("<") != -1){return("Please remove the \"<\"");}
	if(Str.indexOf(">") != -1){return("Please remove the \">\"");}
	if(Str.indexOf("|") != -1){return("Please remove the \"|\"");}
	if(Str.indexOf("{") != -1){return("Please remove the \"{\"");}
	if(Str.indexOf("}") != -1){return("Please remove the \"}\"");}
	if(Str.indexOf("[") != -1){return("Please remove the \"[\"");}
	if(Str.indexOf("]") != -1){return("Please remove the \"]\"");}
	
	if(Str.indexOf("1") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("2") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("3") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("4") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("5") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("6") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("7") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("8") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("9") != -1){return("No numbers are allowed in this field");}
	if(Str.indexOf("0") != -1){return("No numbers are allowed in this field");}
	
	
	return(true);
}