	function validate_email(this_str){
		if(this_str.length != 0){
			var spacer = 3;									//this is the minimum distance between the identifying characters, ie @ and .
			var at = this_str.indexOf("@");
			var dot = this_str.indexOf(".", at+spacer);
			var ok = 0;
			
			if( at != -1 && dot != -1 ){
				if (at >=1 && at+spacer<=dot && dot+spacer<=this_str.length){
					ok = 1
				}
			}
		}
		return ok
	}

	function validate_radios(fm, el){
		/*
			This simple interates through the radio elements in the specified form element.
			If one is selected then returns the value of that radio otherwise returns -1.
			If the value is null/undefined returns 1
		*/
		this_el = document[fm][el];
		var found = -1;		
		for(var i=0;i<this_el.length;i++){ 
			if(this_el[i].checked){
				if (""+this_el[i].value =="undefined"){
					found = 1;
				} else {
					found = this_el[i].value;
				}
			}
		}
		return found;
	}
	
