function chkbloglogin()
		{
			var em=document.frmblog.txtuname.value;
			if(Trim(document.frmblog.txtuname.value)=="")
			{
				alert("Please enter the user name");
				document.frmblog.txtuname.focus();
				return false;
			}
			else if(!(/^[a-zA-Z_][a-zA-Z0-9_.-]+@[a-z]+\.[a-zA-Z]{1}/.test(em)))
			{
				alert("Please enter a valid username");
				document.frmblog.txtuname.focus();
				return false;
			}
			if(Trim(document.frmblog.txtpassword.value)=="")
			{
				alert("Please enter a password");
				document.frmblog.txtpassword.focus();
				return false;
			}
			
		}
		
function chkblogvalid()
{
	        var em=document.frmblogsignup.txtemail.value;
			if(Trim(document.frmblogsignup.txtemail.value)=="")
			{
				alert("Please enter the Email address");
				document.frmblogsignup.txtemail.focus();
				return false;
			}
			else if(!(/^[a-zA-Z_][a-zA-Z0-9_.-]+@[a-z]+\.[a-zA-Z]{1}/.test(em)))
			{
				alert("Please enter a valid Email address");
				document.frmblogsignup.txtemail.focus();
				return false;
			}
			if(Trim(document.frmblogsignup.txtpassword.value)=="")
			{
				alert("Please enter a password");
				document.frmblogsignup.txtpassword.focus();
				return false;
			}
			if(Trim(document.frmblogsignup.txtconfrmpassword.value)=="")
			{
				alert("Please enter the confirm password");
				document.frmblogsignup.txtconfrmpassword.focus();
				return false;
			}
			if(Trim(document.frmblogsignup.txtpassword.value)!=Trim(document.frmblogsignup.txtconfrmpassword.value))
		{
			alert("Password Mismatch");
			document.frmblogsignup.txtpassword.value='';
			document.frmblogsignup.txtconfrmpassword.value="";
			document.frmblogsignup.txtpassword.focus();
			return false;
		}
			var sd=(document.frmblogsignup.txtpassword.value.length);
			if(sd < "6")
			{
				alert("Please enter atleast six digits");
				document.frmblogsignup.txtpassword.value="";
				document.frmblogsignup.txtconfrmpassword.value="";
				document.frmblogsignup.txtpassword.focus();
				return false;
			}
	
}

function chkblogemail()
{
	        var em=document.frmblogemail.txtforgotemail.value;
			if(Trim(document.frmblogemail.txtforgotemail.value)=="")
			{
				alert("Please enter the Email address");
				document.frmblogemail.txtforgotemail.focus();
				return false;
			}
			else if(!(/^[a-zA-Z_][a-zA-Z0-9_.-]+@[a-z]+\.[a-zA-Z]{1}/.test(em)))
			{
				alert("Please enter a valid Email address");
				document.frmblogemail.txtforgotemail.focus();
				return false;
			}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		leftmenus_03_over = newImage("images/leftmenus_03-over.gif");
		leftmenus_04_over = newImage("images/leftmenus_04-over.gif");
		leftmenus_05_over = newImage("images/leftmenus_05-over.gif");
		leftmenus_06_over = newImage("images/leftmenus_06-over.gif");
		leftmenus_07_over = newImage("images/leftmenus_07-over.gif");
		leftmenus_07_over = newImage("images/agents_signup_over.gif");
		
		preloadFlag = true;
	}
}

/*Trim starts*/
	function Trim(TRIM_VALUE)
{
	if(TRIM_VALUE.length < 1)
	{
		return"";
	}
	TRIM_VALUE = RTrim(TRIM_VALUE);
	TRIM_VALUE = LTrim(TRIM_VALUE);
	if(TRIM_VALUE=="")
	{
		return "";
	}
	else
	{
		return TRIM_VALUE;
	}
} //End Function

function RTrim(VALUE)
{
	var w_space = String.fromCharCode(32);
	var v_length = VALUE.length;
	var strTemp = "";
	if(v_length < 0)
	{
		return"";
	}
	var iTemp = v_length -1;
	while(iTemp > -1)
	{
		if(VALUE.charAt(iTemp) == w_space)
		{
		}
		else
		{
			strTemp = VALUE.substring(0,iTemp +1);
			break;
		}
		iTemp = iTemp-1;
	} //End While
	return strTemp;
	} //End Function

	function LTrim(VALUE)
	{
		var w_space = String.fromCharCode(32);
		if(v_length < 1)
		{
			return"";
		}
		var v_length = VALUE.length;
		var strTemp = "";
		var iTemp = 0;
		while(iTemp < v_length)
		{
			if(VALUE.charAt(iTemp) == w_space)
			{
			}
			else
			{
				strTemp = VALUE.substring(iTemp,v_length);
				break;
			}
			iTemp = iTemp + 1;
		} //End While
		return strTemp;
		} //End Function
	
/*Trim ends*/
function chkhealthquote()
{
	if(Trim(document.frmcontactinf.salutation.value)=="")
	{
		alert("Please select the salutation");
		document.frmcontactinf.salutation.focus();
		return false;
	}
	if(Trim(document.frmcontactinf.txtfname.value)=="")
	{
		alert("Please enter the first name");
		document.frmcontactinf.txtfname.focus();
		return false;
	}
	if(Trim(document.frmcontactinf.txtlname.value)=="")
	{
		alert("Please enter the last name");
		document.frmcontactinf.txtlname.focus();
		return false;
	}
	if(Trim(document.frmcontactinf.txtaddr1.value)=="")
	{
		alert("Please enter the street");
		document.frmcontactinf.txtaddr1.focus();
		return false;
	}
	if(Trim(document.frmcontactinf.txtcity.value)=="")
	{
		alert("Please enter the city");
		document.frmcontactinf.txtcity.focus();
		return false;
	}
	if(Trim(document.frmcontactinf.txtzip.value)=="")
	{
		alert("Please enter the Zip");
		document.frmcontactinf.txtzip.focus();
		return false;
	}
	if(Trim(document.frmcontactinf.txtdayphone.value)=="")
	{
		alert("Please enter the Day phone");
		document.frmcontactinf.txtdayphone.focus();
		return false;
	}
	/*else  if (isNaN(document.frmcontactinf.txtdayphone.value)==true)
	{
		alert("Please enter a valid day phone");
		document.frmcontactinf.txtdayphone.focus();
		return false;
	}*/
}