navHover = function() {

	var lis = document.getElementById("navmenu-h").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

navHover1 = function() {

	var lis = document.getElementById("navmenu-hh").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover1);

	function newsletter_email(){ 
				var email=document.getElementById('textfield').value;
				if(email==''){
					document.getElementById('errormsg').innerHTML='<div style="color:red;">Please enter the email id</div>';
				} else if (!isValidEmail(email)) {
					document.getElementById('errormsg').innerHTML='<div style="color:red;">Please enter the valid email id</div>';
				}else {
					document.frm.submit();					
					}
		}
function trim(nStr){
		return nStr.replace(/(^\s*)|(\s*$)/g, "");
		
	}
function isValidEmail(pmEmail)	{
		/* Function will check whether the given email is valid or not. */
		if (!pmEmail) return false;
		pmEmail = trim(pmEmail);
		pmEmail = pmEmail.replace(/\r\n|\r|\n/g, ''); 
		
		if (isRegExpSupported()) {
			var vPattern = "^[A-Za-z0-9](([_\\.\\-]?[a-zA-Z0-9_]+)*)@([A-Za-z0-9]+)(([\\_.\\-]?[a-zA-Z0-9]+)*)\\.([A-Za-z]{2,3})$";
			var vRegExp = new RegExp(vPattern);
			return (vRegExp.test(pmEmail));
		} else	{
			if(pmEmail.indexOf('@') == -1 || pmEmail.indexOf('.') == -1 || pmEmail.indexOf(' ') != -1) return false;
			else {
				var vSplit = pmEmail.split("@");
				if(vSplit.length > 2) return false;
				else 	{
					var vDomain = vSplit[1].split('.');
					var vLength = vDomain.length;
					for(var vLoop = 0; vLoop < vLength; vLoop++)
						if(vDomain[vLoop].length <= 0)	return false;
					return true;
				}
			} 
		}
	}
	
	function isRegExpSupported() {
		/* Function will check whether the regular expression supported by the browser */
		if (window.RegExp)	{
			var vTempStr = "a";
			var vTempReg = new RegExp(vTempStr);
			return (vTempReg.test(vTempStr));
		}
		return false;
	} 