$(function(){

				
                /* Dialog Link
				$('#dialog_link').click(function(){
					$('#dialog').dialog('open');
					return false;
				});*/
				
				// Dialog		
				if ( $('#dialogFE').length )
				{	
					$('#dialogFE').dialog({
					autoOpen: false,
					width: 300,modal: true
				});
		        }
				
			});
			
function ValidateChkList(source, arguments)
    {                                                    
        arguments.IsValid = ValidateTerms() ? true : false;  

    }
 function ValidateTerms()
  {
    
		
prefix ="ctl00_ContentPlaceHolder1_forum_ctl01_CreateUserWizard1_CreateUserStepContainer_"
				if(!document.getElementById(prefix+'chkTerms').checked)
			{
				//alert("Please check terms and conditions")
				return false;
			}else
				return true;
		
  }
  
function validateSearch()
{

	flag="T"
	IdPref=""
		
		if(document.getElementById(IdPref+'txtSearchForumm').value!="")
		{
		window.location.href="Forum_Search.aspx?search=" + document.getElementById(IdPref+'txtSearchForumm').value
			
		}
	return false;	
	
}
function clickButton(e, buttonid)
	{


		var bt = document.getElementById(buttonid);
		if (typeof bt == 'object')
		{
			if(navigator.appName.indexOf("Netscape")>(-1))
			{
					if (e.keyCode == 13)
					{
					//checkLongwords(e.srcElement.id)
					
					bt.click();
					return false;
					
					}
			}
			if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
			{
			
				if (event.keyCode == 13)
				{
			
				//checkLongwords(e.srcElement.id)
				bt.click();
				return false;
				}
				
			}
		}

	}
	
function validateSiteFeedback()
{

	flag="T"
	flagLong="T"
	st="Please provide value for ::";
IdPref=""
		
		
		if(document.getElementById(IdPref+'txtName').value=="")
		{
		
			st=st + "\n - Name.";
			flag="F";
		}
		else
		{
		 if(checkLongwords(IdPref+"txtName"))
			{}else
			flagLong="F"
		}
	
			if(document.getElementById(IdPref+"txtEmails"))
	        {
	        var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
		        Val=document.getElementById(IdPref+"txtEmails").value
		        if(!regex.test(Val))
		        {
		        st=st + "\n - Valid Email ID.";
		        flag="F";
		        }
	        }
		
		
		
		if(document.getElementById(IdPref+'ddSubjects').selectedIndex=="0")
		{
		
			st=st + "\n - Subject.";
			flag="F";
		}
		
		if(document.getElementById(IdPref+'txtMessage').value=="")
		{
		
			st=st + "\n - Message.";
			flag="F";
		}else
		{
		 if(checkLongwords(IdPref+"txtMessage"))
			{}else
			flagLong="F"
		}
		
			if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}

function validateMessage()
{

	flag="T"
	flagLong="T"
	st="Please provide value for ::";
IdPref=""
		
	
			if(document.getElementById(IdPref+"txtSenderEmail"))
	        {
	        var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
		        Val=document.getElementById(IdPref+"txtSenderEmail").value
		        if(!regex.test(Val))
		        {
		        st=st + "\n - Valid Email ID.";
		        flag="F";
		        }
	        }
		
		
		
		
		if(document.getElementById(IdPref+'txtResume').value=="")
		{
		
			st=st + "\n - Message.";
			flag="F";
		}else
		{
		 if(checkLongwords(IdPref+"txtResume"))
			{}else
			flagLong="F"
		}
		
			if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}

	function setMenuByPage()
	{
		var URL=window.location.href.toLowerCase()
		
		if(URL.indexOf("account_home.aspx")!=-1)
		{
			setClassOfList("li_account_home")
			return;
		}
		if(URL.indexOf("account_setting.aspx")!=-1)
		{
			setClassOfList("li_account_setting")
			return;
		}
		if(URL.indexOf("prof_setting.aspx")!=-1)
		{
			setClassOfList("li_prof_setting")
			return;
		}
		if(URL.indexOf("change_password.aspx")!=-1)
		{
			setClassOfList("li_change_password")
			return;
		}
		if(URL.indexOf("manage_softwares.aspx")!=-1)
		{
			setClassOfList("li_software")
			setClassOfList("li_manage_softwares")
			return;
		}
		if(URL.indexOf("upload_softwares.aspx")!=-1)
		{
			setClassOfList("li_software")
			setClassOfList("li_upload_softwares")
			return;
		}
		if(URL.indexOf("manage_opportunities.aspx?job=1")!=-1)
		{
			setClassOfList("li_summer")
			setClassOfList("li_manage_summer")
			return;
		}
		if(URL.indexOf("upload_opportunities.aspx?job=1")!=-1)
		{
			setClassOfList("li_summer")
			setClassOfList("li_upload_summer")
			return;
		}	
		if(URL.indexOf("manage_opportunities.aspx?cons=1")!=-1)
		{
		setClassOfList("li_consulting")
			setClassOfList("li_manage_consulting")
			return;
		}
		if(URL.indexOf("upload_opportunities.aspx?cons=1")!=-1)
		{
			setClassOfList("li_consulting")
			setClassOfList("li_upload_consulting")
			return;
		}
		
	}
	function setClassOfList(id)
	{
		document.getElementById(id).className="glossymenuSelected";
	}
	function confirmDelete()
	{
		return confirm("Are you sure you want to Delete it?")
	}
	function confirmDeleteForum()
	{
		return confirm("All the subCategories/Post belonging to it will also be deleted with this. Are you sure you want to Continue?")
	}
	function SwapVisiblity(id)
	{
		if(document.getElementById(id).style.display=="none")
		{
			if(document.getElementById("Header1_SignStatus").value=="false")
			{	if(confirm("You must Login to post a message. click OK to log in "))
				{
					window.location.href="index.aspx"
				}
				else
				{
					return
				}
			}else
				document.getElementById(id).style.display="block"
		}
		else
			document.getElementById(id).style.display="none"
	}
		function showRowCV(id)
	{
		if(document.getElementById(id).style.display=="none")
		{
			document.getElementById(id).style.display="block"
		}
		else
			document.getElementById(id).style.display="none"
	}
	function checkLongwords(id)
	{
	
		var array=document.getElementById(id).value.split(" ");
		var part_num=0;
		while (part_num < array.length)
		{
		if(array[part_num].length > 50)
		{
		//	alert("You can Type Continous word of more then 50 characters.")
			document.getElementById(id).value="";
			return false
		}
		part_num+=1;
	}
		return true

	}
	
	
function ValidateEmail()
{

	flag="T"
	flagLong="T"
	st="Please provide value for ::";

		// functions starts here
		
		// Validation for Registration page starts

		
	
		if(document.getElementById('txtUserName'))
		{
		var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			Val=document.getElementById('txtUserName').value
			if(!regex.test(Val))
			{
			st=st + "\n - Valid Email ID.";
			flag="F";
			}
		}
		
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}


function ValidateSoftwareFields()
	{
	flag="T"
	flagLong="T"
	st="Please provide value for ::";

		// functions starts here
		
		// Validation for Registration page starts

		if(document.getElementById('txtSWname').value=="")
		{
		
			st=st + "\n - Software Name.";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtSWname"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('txtCOName').value=="")
		{
		
			st=st + "\n - Company Name.";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtCOName"))
			{}else
			flagLong="F"
		}
		
		/*if(document.getElementById('txtCOURL').value=="" || document.getElementById('txtCOURL').value=="http://")
		{
		
			st=st + "\n - Company URL.";
			flag="F";
		}*/
		
		
		if(document.getElementById('txtDesc').value=="")
		{
		
			st=st + "\n - Description.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtDesc"))
			{}else
			flagLong="F"
		}
	
		/*
       if(document.getElementById('txtFilesoftware').value=="" || document.getElementById('txtFilesoftware').value=="http://")
		{
		
			st=st + "\n - Software link.";
			flag="F";
		}
	*/
			
		
	// Validation for Registration page ends
		
		
		
		//functions ends here
		
		if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
	}
	
	function ValidateloginUser()
	{
	flag="T"
	flagLong="T"
	st="Please provide value for ::";

		// functions starts here
		
		// Validation for Registration page starts

		if(document.getElementById('txtUserName').value=="")
		{
		
			st=st + "\n - User Name.";
			flag="F";
		}
		
		
		
		
		if(document.getElementById('txtPassword'))
		{
			if(document.getElementById('txtPassword').value=="")
			{
			
				st=st + "\n - Password.";
				flag="F";
			}
		}
	
			
		
	// Validation for Registration page ends
		
		
		
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
	}
	
function ValidateRegisterUser()
{

	flag="T"
	flagLong="T"
	st="Please provide value for ::";

		// functions starts here
		
		// Validation for Registration page starts

	/*	if(document.getElementById('txtUniqueID').value.length<"6" || document.getElementById('txtUniqueID').value.length>"24")
		{
		
			st=st + "\n - Unique-ID must be between 6-24 chars.";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtUniqueID"))
			{}else
			flagLong="F"
		}
		*/
		if(document.getElementById('txtName').value=="")
		{
		
			st=st + "\n - First Name.";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtName"))
			{}else
			flagLong="F"
		}
		if(document.getElementById('txtLastName').value=="")
		{
		
			st=st + "\n - Last Name.";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtLastName"))
			{}else
			flagLong="F"
		}
	/*	if(document.getElementById('txtAddress').value=="")
		{
		
			st=st + "\n - Address.";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtAddress"))
			{}else
			flagLong="F"
		}
		*/
		if(document.getElementById('txtCity').value=="")
		{
		
			st=st + "\n - City.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtCity"))
			{}else
			flagLong="F"
		}
		
		
		if(document.getElementById('ddCountries').selectedIndex=="0")
		{
		
			st=st + "\n - Country.";
			flag="F";
		}
		/*if(document.getElementById('ddstates').selectedIndex=="0")
		{
		
			st=st + "\n - State.";
			flag="F";
		}*/
		if(document.getElementById('txtEmail'))
		{
		var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			Val=document.getElementById('txtEmail').value
			if(!regex.test(Val))
			{
			st=st + "\n - Valid Email ID.";
			flag="F";
			}
		}
		
		if(document.getElementById('txtPassword'))
		{
	if(document.getElementById('txtPassword').value=="")
		{
		
			st=st + "\n - Password.";
			flag="F";
		}else
		if(document.getElementById('txtConfirmPassword').value=="")
		{
		
			st=st + "\n - Confirm Password.";
			flag="F";
		}else		
		if(document.getElementById('txtPassword').value!=document.getElementById('txtConfirmPassword').value)
		{
		
			st=st + "\n - Password Mismatch.";
			flag="F";
		}
		}
	
		
		
	// Validation for Registration page ends
		
		
		
		//functions ends here
		
		if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
				if(!document.getElementById('chkTerms').checked)
			{
				alert("Please check terms and conditions")
				return false;
			}else
				return true;
		}
}

	
function ValidateProfUser()
{

	flag="T"
	flagLong="T"
	st="Please provide value for ::";

		// functions starts here
		
		// Validation for Registration page starts

        if(document.getElementById('txtCity').value=="")
		{
		
			st=st + "\n - City.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtCity"))
			{}else
			flagLong="F"
		}
		
		
		if(document.getElementById('ddCountries').selectedIndex=="0")
		{
		
			st=st + "\n - Country.";
			flag="F";
		}
		/*if(document.getElementById('ddstates').selectedIndex=="0")
		{
		
			st=st + "\n - State.";
			flag="F";
		}*/
		
		if(document.getElementById('txtCompanyName').value=="")
		{
		
			st=st + "\n - Company Name.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtCompanyName"))
			{}else
			flagLong="F"
		}
		if(document.getElementById('txtPosition').value=="")
		{
		
			st=st + "\n - Position.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtPosition"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('ddDegrees').selectedIndex=="0")
		{
		
			st=st + "\n - Level of Education.";
			flag="F";
		}
		if(document.getElementById('ddMarital').selectedIndex=="0")
		{
		
			st=st + "\n - Professional Status.";
			flag="F";
		}
		
	/*	if(document.getElementById('txtChildren').value!="")
		{
		
		var regex = /^\d+$/;
				Val=document.getElementById('txtChildren').value
				if(!regex.test(Val))
			{
				st=st + "\n - Numeric value for Children ";
				flag="F";
			}
		
		}
		*/
		
		if(document.getElementById('txtprof_Specialty').value=="")
		{
		
			st=st + "\n - Professional Specialty.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtprof_Specialty"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('txtHobbies').value=="")
		{
		
			st=st + "\n - Areas Of Interest.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtHobbies"))
			{}else
			flagLong="F"
		}
		
		
	
	
			
		
	// Validation for Registration page ends
		
		
		
		//functions ends here
		
		if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}




function validateResume()
{

	flag="T"
	flagLong="T"
	st="Please provide value for ::";

		// functions starts here
		
		// Validation for Registration page starts

        if(document.getElementById('txtNickname').value=="")
		{
		
			st=st + "\n - Nickname.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtNickname"))
			{}else
			flagLong="F"
		}
		
		
				
		if(document.getElementById('txtEmail'))
		{
		var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			Val=document.getElementById('txtEmail').value
			if(!regex.test(Val))
			{
			st=st + "\n - Valid Email ID.";
			flag="F";
			}
		}
		
		
		if(document.getElementById('txtLocation').value=="")
		{
		
			st=st + "\n - Location.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtLocation"))
			{}else
			flagLong="F"
		}
		if(document.getElementById('txtCareerObjective').value=="")
		{
		
			st=st + "\n - Career Objective.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtCareerObjective"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('ddEducation').selectedIndex=="0")
		{
		
			st=st + "\n - Level of Education.";
			flag="F";
		}
		if(document.getElementById('ddExp').selectedIndex=="0")
		{
		
			st=st + "\n - Experience.";
			flag="F";
		}
			
		
		
		
	
	
			
		
	// Validation for Registration page ends
		
		
		
		//functions ends here
		
		if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}


function ValidatejobopeningsADD()
{

	flag="T"
	flagLong="T"
	st="Please provide value for ::";

		// functions starts here
		
		// Validation for Registration page starts

		
		
	
		
		if(document.getElementById('txtJobCode').value=="")
		{
		
			//st=st + "\n - Job Code.";
			//flag="F";
		}
		else
		{
		 if(checkLongwords("txtJobCode"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('txtJobTitle').value=="")
		{
		
			st=st + "\n - Title.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtJobTitle"))
			{}else
			flagLong="F"
		}
		
	  
		
		
		
		
		if(document.getElementById('txtJobLevel').value=="")
		{
		
			st=st + "\n - Location.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtJobLevel"))
			{}else
			flagLong="F"
		}
		
	
	if(document.getElementById('txtJobProfile').value=="")
		{
		
			st=st + "\n - Description.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtJobProfile"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('txtJobEligibility').value=="")
		{
		
			//st=st + "\n - Eligibility.";
		//	flag="F";
		}else
		{
		 if(checkLongwords("txtJobEligibility"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('txtContactName').value=="")
		{
		
			st=st + "\n - Contact Person.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtContactName"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('txtContactPhone').value=="")
		{
		
			st=st + "\n - Contact Phone.";
			flag="F";
		}else
		{
		 if(checkLongwords("txtContactPhone"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('txtCompanyName').value=="")
		{
		
			st=st + "\n - Company Name.";
		flag="F";
		}else
		{
		 if(checkLongwords("txtCompanyName"))
			{}else
			flagLong="F"
		}
			
		if(document.getElementById('txtEmail'))
		{
		var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			Val=document.getElementById('txtEmail').value
			if(!regex.test(Val))
			{
			st=st + "\n - Valid Email ID.";
			flag="F";
			}
		}
		
		
		if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}

function ValidateChangePwd()
{

	flag="T"
	st="Please provide value for ::";

		// functions starts here
		
		// Validation for Registration page starts

		if(document.getElementById('txtOldPwd').value=="")
		{
		
			st=st + "\n - Old Password.";
			flag="F";
		}
		
		
	if(document.getElementById('txtpassword').value=="")
		{
		
			st=st + "\n - Password.";
			flag="F";
		}else
		if(document.getElementById('txtConfirmPassword').value=="")
		{
		
			st=st + "\n - Confirm Password.";
			flag="F";
		}else		
		if(document.getElementById('txtpassword').value!=document.getElementById('txtConfirmPassword').value)
		{
		
			st=st + "\n - Password Mismatch.";
			flag="F";
		}
	
	// Validation for Registration page ends
		
		
		
		//functions ends here
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}

function ValidateLoginControls()
{
flag="T"
	st="Please provide value for ::";

			
	if(document.getElementById('UcSignIN1_txtEmailID'))
	{
		if(document.getElementById('UcSignIN1_txtEmailID').value=="")
		{
		
			st=st + "\n - Email ID.";
			flag="F";
		}
	}
			
	if(document.getElementById('UcSignIN1_txtpassword'))
	{
		if(document.getElementById('UcSignIN1_txtpassword').value=="")
		{
		
			st=st + "\n - Password.";
			flag="F";
		}
	}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}

}

function isLoginJQ()
{
flag="T"
	st="";

			
	if(document.getElementById('Footer1_hdStatus'))
	{
	    if(document.getElementById('Footer1_hdStatus').value=="0")
	    {
	          
	            
	            $(function(){
				  $('#dialogFE').dialog('open');

    			});
			
	        //document.getElementById('AnonyUserMsg').style.display="block"
		    return false;
		}else return true;
	}
	
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}

}

function isLogin()
{
flag="T"
	st="";

			
	if(document.getElementById('Footer1_hdStatus'))
	{
	    if(document.getElementById('Footer1_hdStatus').value=="0")
	    {
	    
	        document.getElementById('AnonyUserMsg').style.display="block"
		    return false;
		}else return true;
	}
	
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}

}
function ProvideEmailID()
{
flag="T"
	st="";

			
	if(document.getElementById('UcSignIN1_txtEmailID'))
	{
		if(document.getElementById('UcSignIN1_txtEmailID').value=="")
		{
		
			st="Please provide Email ID.";
			flag="F";
		}
	}
	
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}

}

// functions for ADMIN Login sections starts  here
function ValidateAdminLogin()
{
tempstname=""
tempst=""
flag="T"
	flagLong="T"
	st="Please provide ::";
	
	   if(document.getElementById('txtUserName').value=="")
		{
		
			st=st + "\n - Username.";
			flag="F";
		}
		   if(document.getElementById('txtPassword').value=="")
		{
		
			st=st + "\n - Password.";
			flag="F";
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}


function ValidatNewPassword()
{
tempstname=""
tempst=""
flag="T"
	flagLong="T"
	st="Please provide ::";
	
	   if(document.getElementById('txtPassword').value=="")
		{
		
			st=st + "\n - Provide Password.";
			flag="F";
		}else
		if(document.getElementById('txtConfirmPassword').value=="")
		{
		
			st=st + "\n - Confirm your Password.";
			flag="F";
		}else		
		if(document.getElementById('txtPassword').value!=document.getElementById('txtConfirmPassword').value)
		{
		
			st=st + "\n - Password Mismatch.";
			flag="F";
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}

function ValidatModifyiInfo()
{
tempstname=""
tempst=""
flag="T"
	flagLong="T"
	st="Please provide ::";
	
	    if(document.getElementById('txtName'))
		{		
		    if(document.getElementById('txtName').value=="")
		    {
    		
			    st=st + "\n - Name.";
			    flag="F";
		    }
		}
		
		 if(document.getElementById('txtEmail'))
		{		
		    var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			Val=document.getElementById("txtEmail").value
			if(!regex.test(Val))
			{
			     st=st +="\n - valid Email ID.";
			    flag="F";
			}
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}
function ValidatPost()
{
	flag="T"
	flagLong="T"
	
		
		if(document.getElementById('txtPost').value=="")
		{
		
			st= " Please provide Message to post.";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtPost"))
			{}else
			flagLong="F"
		}
		
		if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}
function ValidatTopic()
{
	flag="T"
	flagLong="T"
	st="Please provide value for ::";

		if(document.getElementById('txtTopic').value=="")
		{
		
			st=st + "\n - Topic.";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtTopic"))
			{}else
			flagLong="F"
		}
		
		if(document.getElementById('txtPost').value=="")
		{
		
			st=st + " \n - Message";
			flag="F";
		}
		else
		{
		 if(checkLongwords("txtPost"))
			{}else
			flagLong="F"
		}
		
		if(flagLong=="F")
		{
		alert("You cannot type word with more tham 50 characters")
		return false;
		}
		
	if (flag=="F")
		{
			alert(st);
			return false;
		}
		else
		{
		 return true;
		}
}

