function validEmail(str)
{
	var x=document.getElementById(str).value;
	
	var patt = new RegExp("^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$");
	
	//The second regexp is supposed to match all syntactically valid addresses, even those that we don't see that often. The idea in this example is that the validator should pass those strange looking addresses but tell the user that it would probably be a good idea to double check the address. This ugly regexp is actually quite similar to the one declared earlier. The period separated character sequences in the local-part can now include all the special characters defined in the RFC. Characters "$", "*", "+" "^", "{" and "|" all have their special meanings in regular expressions so they must be escaped with a backslash. The expression now allows the domain part to end with a period followed by 2..n letters such as .museum
	var rpatt = new RegExp("^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})$");
	
	if(patt.test(x)){	
		document.getElementById('emailvalue').innerHTML='<img src="view/assets/images/icon_yes.png" height="10px" width="10px" alt=" Approved" />';
		}
	else if(rpatt.test(x)){	
		document.getElementById('emailvalue').innerHTML='<img src="view/assets/images/icon_warning.png" height="10px" width="10px" alt=" Approved" />';
		}
	else{
		document.getElementById('emailvalue').innerHTML='<img src="view/assets/images/icon_no.png" height="10px" width="10px" alt=" Required" />';
	}

}
function isset(str)
{
	var spanid = str+'value';
	var x=document.getElementById(str).value;
	if(x != '' && x != 'Subject' && x != 'Message'){	
		document.getElementById(spanid).innerHTML='<img src="view/assets/images/icon_yes.png" height="10px" width="10px" alt=" Approved" />';
		}
	else{
		document.getElementById(spanid).innerHTML='<img src="view/assets/images/icon_no.png" height="10px" width="10px" alt=" Required" />';
	}
	
}
function yesno(str)
{
	//var x=document.getElementById(if).value;
	
	if(str == 'if'){	
		document.getElementById('human').innerHTML=' <img src="view/assets/images/icon_yes.png" height="10px" width="10px" alt=" Approved" />';
		}
	else{
		document.getElementById('human').innerHTML=' <img src="view/assets/images/icon_no.png" height="10px" width="10px" alt=" Banned!" />';
	}	
}