//Validating Login Details
function validateLoginDetails()
{
		with(document.formobject)
		{		
				if (txtUserName.value=="")
				{
					alert("Please Enter the Username");
					txtUserName.focus();
					return false;
				}else if(txtPassword.value=="")
				{
					alert("Please Enter the Password");
					txtPassword.focus();
					return false;
				}
				eventflag.value="true";
		}
	return true;
}


//Validating User Group
function ValidateUserGroup()
{
		with(document.formobject)
		{		
				if (txtGroupName.value=="")
				{
					alert("Please Enter the Group Name");
					txtGroupName.focus();
					return false;
				}
				ValidateUserGroupeventflag.value="true";
		}
	return true;
}

//Validating Group Permissions
function ValidateGrouPermissions()
{
		with(document.formobject)
		{		
				ValidateGrouPermissionsflag.value="true";
		}
	return true;
}



//Checking User Name
function checkUserName()
{
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		{
			alert ("Your browser does not support AJAX!");
			return false;
		}
		username=document.formobject.txtUserName.value;	 
		var url='CheckUserName.php';
		url=url+"?username="+username;		
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);		
		xmlHttp.send(null);
		return false;
	
}

function stateChanged() 
{ 
		if (xmlHttp.readyState==4)
		{ 	
				document.getElementById("usernamecheck").innerHTML=xmlHttp.responseText;
				if(xmlHttp.responseText=="Username Available")
				{
					document.formobject.usernamehiddencheck.value=1;
				}else if(xmlHttp.responseText=="Username Unavailable")
				{
					document.formobject.usernamehiddencheck.value=0;
				}
		}
}
//Ajax Main Function
function GetXmlHttpObject()
{
		var xmlHttp=null;
		try
		{
			// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{
		// Internet Explorer
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		return xmlHttp;
}
//Validating System Users
function ValidateSystemUser(flag)
{
		with(document.formobject)
		{		
				if (GroupID.value==-1)
				{
					alert("Please Select the User Group");
					GroupID.focus();
					return false;
				}else if (txtUserName.value=="")
				{
					alert("Please Enter the User Name");
					txtUserName.focus();
					return false;
				}else if(txtFirstName.value=="")
				{
					alert("Please Enter the First Name");
					txtFirstName.focus();
					return false;
				}else if(txtLastName.value=="")
				{
					alert("Please Enter the Last Name");
					txtLastName.focus();
					return false;
				}else if(Gender.value==-1)
				{
					alert("Please Select the Gender");
					Gender.focus();
					return false;
				}else if(txtEmail.value=="")
				{
					alert("Please Enter the Email");
					txtEmail.focus();
					return false;
				}else if(!(isEmail(txtEmail.value)))
				{
					alert("Please Enter the Email (abc@abc.com)");
					txtEmail.focus();
					return false;
				}else if(AccountStatus.value==-1)
				{
					alert("Please Select the Account Status");
					AccountStatus.focus();
					return false;
				}else if(flag==0)
				{
						if(txtPassword.value=="")
						{
							alert("Please Enter the Password");
							txtPassword.focus();
							return false;
						}
				}
				ValidateSystemUserflag.value="true";
		}
	return true;	
}

//Validating User Permissions

function ValidateUserPermissions()
{
		with(document.formobject)
		{		
				ValidateUserPermissionsflag.value="true";
		}
	return true;
}


//Validating CMS
function ValidateCmsPage()
{
		with(document.formobject)
		{		
			
				if(AssignURL.value=="")
				{
							if (MasterLinkID.value==-1)
							{
								alert("Please Select the Master Link");
								MasterLinkID.focus();
								return false;
							}else if (txtLinkTitle.value=="")
							{
								alert("Please Enter the Link Title");
								txtLinkTitle.focus();
								return false;
							}else if(txtPageTitle.value=="")
							{
								alert("Please Enter the Page Title");
								txtPageTitle.focus();
								return false;
							}else if(Sequence.value=="")
							{
								alert("Please Enter the Page Sequence");
								Sequence.focus();
								return false;
							}else if(MetaTitle.value=="")
							{
								alert("Please Enter the Page Title");
								MetaTitle.focus();
								return false;
							}else if(UrlKeyword.value=="")
							{
								alert("Please Enter the URL Keyword");
								UrlKeyword.focus();
								return false;
							}else if(txtImage.value.length>5)
							{
									if(ImagePositionID.value==-1)
									{
										alert("Please Select the Image Position");
										ImagePositionID.focus();
										return false;
									}
							}
				}else
				{
							if (MasterLinkID.value==-1)
							{
								alert("Please Select the Master Link");
								MasterLinkID.focus();
								return false;
							}else if (txtLinkTitle.value=="")
							{
								alert("Please Enter the Link Title");
								txtLinkTitle.focus();
								return false;
							}else if(Sequence.value=="")
							{
								alert("Please Enter the Page Sequence");
								Sequence.focus();
								return false;
							}
				}
				ValidateCmsPageflag.value="true";
		}
	return true;	
}

//Validating News Articles
function ValidateNews()
{
		with(document.formobject)
		{		
				if(txtNewsTitle.value=="")
				{
					alert("Please Enter the News Title");
					txtNewsTitle.focus();
					return false;
				}else if(txtNewsDate.value=="")
				{
					alert("Please Enter the News Date");
					txtNewsDate.focus();
					return false;
				}else if(!(isDate(txtNewsDate.value)))
				{
					alert("Please Enter the News Date (YYYY-MM-DD)");
					txtNewsDate.focus();
					return false;
				}else if(BriefDescription.value=="")
				{
					alert("Please Enter the Breif Description");
					BriefDescription.focus();
					return false;
				}else if(txtImage.value.length>5)
				{
						if(ImagePositionID.value==-1)
						{
							alert("Please Select the Image Position");
							ImagePositionID.focus();
							return false;
						}
				}
				ValidateNewsflag.value="true";
		}
	return true;	
}

//Validating Uploads

function ValidateUploads()
{
		with(document.formobject)
		{		
				ValidateUploadsflag.value="true";
		}
	return true;		
}

//Validating CMS Data
function validateotherdata()
{
	with(document.formobject)
	{		
				otherdataflag.value="true";
	}
	return true;	
}

//Loading Other CMS Data
function loadcmscontents()
{
	document.formobject.submit();
}

//Validating Website Configuration
function ValidateWebsiteConfiguration()
{
	with(document.formobject)
	{		
				ValidateWebsiteConfigurationflag.value="true";
	}
	return true;	
}
//Validating Change Password
function ValidateChangePassword()
{
		with(document.formobject)
		{
					if(txtOldPassword.value=="")
					{
							alert("Please Enter the Old Password");
							txtOldPassword.focus();
							return false;
					}else if(txtNewPassword.value.length<8)
					{
							alert("Please Enter the New Password(Minimum 8 Characters)");
							txtNewPassword.focus();
							return false;
					}else if(txtNewPassword.value!=txtConfirmPassword.value)
					{
							alert("New Password doesnt Match , Please reconfirm");
							txtNewPassword.focus();
							return false;
					}
				
				ValidateChangePasswordflag.value="true";
	}
	return true;	
}



//Validate Links

function ValidateLinks()
{
		with(document.formobject)
		{		
				if (LinkTypeID.value==-1)
				{
					alert("Please Select the Link Type");
					LinkTypeID.focus();
					return false;
				}else if (LinkTitle.value=="")
				{
					alert("Please Enter the Link Title");
					LinkTitle.focus();
					return false;
				}else if(URL.value=="")
				{
					alert("Please Enter the URL");
					URL.focus();
					return false;
				}
				ValidateLinksflag.value="true";
		}
	return true;	
}

//Validate Faqs
function ValidateFaqs()
{
		with(document.formobject)
		{		
				if (txtQuestion.value=="")
				{
					alert("Please Enter the Question");
					txtQuestion.focus();
					return false;
				}else if(Sequence.value=="")
				{
					alert("Please Enter the Sequence");
					Sequence.focus();
					return false;
				}
				ValidateFaqsflag.value="true";
		}
	return true;	
}

//Validate Meeting Planner

function ValidateMeetingPlanner()
{
	var flag=0;
	var i=0;
	with(document.meetingplannerform)
	{		
			if(txtEventDateTime.value=="")
			{
				alert("What date and time is your event scheduled?");
				txtEventDateTime.focus();
				return false;
			}else if(EventSite.value=="")
			{
				alert("Please enter the City/Site of the event");
				EventSite.focus();
				return false;
			}else if(txtOrganization.value=="")
			{
				alert("What is your organization and/or type of business?");
				txtOrganization.focus();
				return false;
			}else if(txtAudience.value=="")
			{
				alert("Who is your audience?");
				txtAudience.focus();
				return false;
			}
			//Validating Audience Size	
			for(i=0;i<audiencesize.length;i++)
			{
				if(audiencesize[i].checked)
				{
					flag=1;
					break;	
				}	
			}
			if(flag==0)
			{
				alert("Please Select your Audience size");
				return false;
			}
		/*
			if(programs.value=="")
			{
				alert("How many programs will you have?");
				programs.focus();
				return false;
			}else if(NoSpeakers.value=="")
			{
				alert("How many speakers are you looking for?");
				NoSpeakers.focus();
				return false;
			}else if(PresentationLength.value=="")
			{
				alert("What is the length of presentation?");
				PresentationLength.focus();
				return false;
			}
		
			//Validating Event Format	
			flag=0;
			for(i=0;i<eventformat.length;i++)
			{
				if(eventformat[i].checked)
				{
					flag=1;
					break;	
				}	
			}
			if(flag==0)
			{
				alert("Please Select your Event FOrmat");
				return false;
			}
		
			//Validating Budget
			flag=0;
			for(i=0;i<budget.length;i++)
			{
				if(budget[i].checked)
				{
					flag=1;
					break;	
				}	
			}
			if(flag==0)
			{
				alert("What is your budget range for the ideal speaker?");
				return false;
			}
			
			if(effectimpact.value=="")
			{
				alert("What effect/ impact do you want the speaker(s) to have on your audience?");
				effectimpact.focus();
				return false;
			}else if(qualitiesdescription.value=="")
			{
				alert("What qualities are you looking for in a speaker?");
				qualitiesdescription.focus();
				return false;
			}
			
			//Validating Most Important Thing
			flag=0;
			for(i=0;i<important.length;i++)
			{
				if(important[i].checked)
				{
					flag=1;
					break;	
				}	
			}
			if(flag==0)
			{
				alert("What is most important about the speaker you need?");
				return false;
			}
			
			if(BadQualities.value=="")
			{
				alert("What qualities are you *not* looking for in a speaker?");
				BadQualities.focus();
				return false;
			}
			
			//Validating Speaker Type
			flag=0;
			for(i=0;i<speakertype.length;i++)
			{
				if(speakertype[i].checked)
				{
					flag=1;
					break;	
				}	
			}
			if(flag==0)
			{
				alert("What type of speaker are you most interested in?");
				return false;
			}
			
			if(themeofevent.value=="")
			{
				alert("What is the theme of your event?");
				themeofevent.focus();
				return false;
			}
			*/
			if(txtFirstName.value=="")
			{
				alert("Please enter your First Name");
				txtFirstName.focus();
				return false;
			}else if(txtLastName.value=="")
			{
				alert("Please enter your Last Name");
				txtLastName.focus();
				return false;
			}else if(txtCountry.value=="")
			{
				alert("Please enter your Country");
				txtCountry.focus();
				return false;
			}else if(txtPhone.value=="")
			{
				alert("Please Enter the Contact Number");
				txtPhone.focus();
				return false;
			}else if(txtEmail.value=="")
			{
				alert("Please Enter the Email");
				txtEmail.focus();
				return false;
			}else if(!(isEmail(txtEmail.value)))
			{
				alert("Please Enter the Email (abc@abc.com)");
				txtEmail.focus();
				return false;
			}
			
			ValidateMeetingPlannerflag.value="true";
	}
	return true;	
}

//Managing Faqs

function ManageFaqs(control)
{
	if(document.getElementById(control).style.display=="none")
	{
		document.getElementById(control).style.display="block";
	}else
	{
		document.getElementById(control).style.display="none";
	}
}


//Validating Contact Us Form
function ValidateContactUs()
{
		with(document.contactusform)
		{		
				if (txtName.value=="")
				{
					alert("Please Enter your Name");
					txtName.focus();
					return false;
				}else if(txtTelephone.value=="")
				{
					alert("Please Enter your Contact Number");
					txtTelephone.focus();
					return false;
				}else if(txtEmail.value=="")
				{
					alert("Please Enter the Email");
					txtEmail.focus();
					return false;
				}else if(!(isEmail(txtEmail.value)))
				{
					alert("Please Enter the Email (abc@abc.com)");
					txtEmail.focus();
					return false;
				}else if(txtSubject.value=="")
				{
					alert("Please Enter the Subject of this Inquiry");
					txtSubject.focus();
					return false;
				}else if(inquiry.value=="")
				{
					alert("Please Enter the inquiry Details");
					inquiry.focus();
					return false;
				}
				contactusformflag.value="true";
		}
	return true;	
}


//Validate Resource

function ValidateResource()
{
		with(document.formobject)
		{		
				if(CategoryID.value==-1)
				{
					alert("Please Select the Resource Category");
					CategoryID.focus();
					return false;
				}else if(Title.value=="")
				{
					alert("Please Enter the Resource Title");
					Title.focus();
					return false;
				}else if(Sequence.value=="")
				{
					alert("Please Enter the Sequence");
					Sequence.focus();
					return false;
				}else if(flag==0)
				{
					if(ResourceFile.value.length<5)
					{
							alert("Please Upload the Resource");
							ResourceFile.focus();
							return false;
					}
				}	
				ValidateResourceflag.value="true";
		}
	return true;	
}


//Validate Speakers Registration

function ValidateSpeakersRegistration()
{
		var flag=0;
		var i=0;
		with(document.speakerregistrationform)
		{		
				if(ProfileURL.value=="")
				{
					alert("Please Enter your Profile URL");
					ProfileURL.focus();
					return false;
				}else if(txtUserName.value=="")
				{
					alert("Please Enter your Username");
					txtUserName.focus();
					return false;
				}else if(txtPassword.value.length<8)
				{
					alert("Please Enter your password (Minimum Eight Characters)");
					txtPassword.focus();
					return false;
				}else if(txtFirstName.value=="")
				{
					alert("Please enter the First Name");
					txtFirstName.focus();
					return false;
				}else if(txtLastName.value=="")
				{
					alert("Please Enter the Last Name");
					txtLastName.focus();
					return false;
				}else if(txtAddress1.value=="")
				{
					alert("Please Enter your Address");
					txtAddress1.focus();
					return false;
				}else if(txtCity.value=="")
				{
					alert("Please Enter your City");
					txtCity.focus();
					return false;
				}else if(country.value==-1)
				{
					alert("Please Select the Country");
					country.focus();
					return false;
				}else if(txtPhone.value=="")
				{
					alert("Please Enter your Contact Number");
					txtPhone.focus();
					return false;
				}else if(txtEmail.value=="")
				{
					alert("Please Enter the Email");
					txtEmail.focus();
					return false;
				}else if(!(isEmail(txtEmail.value)))
				{
					alert("Please Enter the Email (abc@abc.com)");
					txtEmail.focus();
					return false;
				}
				
				//Validate Language
				flag=0;
				for(i=0;i<languages.length;i++)
				{
					if(languages[i].checked)
					{
						flag=1;
						break;	
					}	
				}
				if(flag==0)
				{
					alert("Please select the Languages you can deliver the speech in");
					return false;
				}
					
				if(Description.value=="")
				{
					alert("Please describe yourself");
					Description.focus();
					return false;
				}else if(TopicsInterest.value=="")
				{
					alert("Please enter your Area of Expertise");
					TopicsInterest.focus();
					return false;
				}
				if(applicationclearance.value==0)
				{
					alert(message.value);	
					return false;
				}
				if(txtOrganization[0].value=="")
				{
					alert("Please enter your Reference - Organization Name");
					txtOrganization[0].focus();
					return false;
				}else if(txtContact[0].value=="")
				{
					alert("Please enter your Reference - Contact Name");
					txtContact[0].focus();
					return false;
				}else if(txtTelephone[0].value=="")
				{
					alert("Please enter your Reference - Telephone");
					txtTelephone[0].focus();
					return false;
				}
				
				//Validate Category
				flag=0;
				for(i=0;i<category.length;i++)
				{
					if(category[i].checked)
					{
						flag=1;
						break;	
					}	
				}
				if(flag==0)
				{
					alert("Please select the Categories in which you want to register yourself");
					return false;
				}
				if(ProfileImage.value.length<5)
				{
					alert("Please upload your Profile Image");
					ProfileImage.focus();
					return false;
				}else if(biography.value.length<5)
				{
					alert("Please upload your Biography");
					biography.focus();
					return false;
				}
				
				/*
				else if(biography.value.length<5)
				{
					alert("Please upload your Biography");
					biography.focus();
					return false;
				}else if(Topics.value.length<5)
				{
					alert("Please upload your Topics");
					Topics.focus();
					return false;
				}else if(txtSpeakingFees.value=="")
				{
					alert("What is your speaking fee?");
					txtSpeakingFees.focus();
					return false;
				}else if(txtGeographicLimitation.value=="")
				{
					alert("Do you have any geographic limitations?");
					txtGeographicLimitation.focus();
					return false;
				}else if(txtConstraints.value=="")
				{
					alert("Do you have any time constraints?");
					txtConstraints.focus();
					return false;
				}else if(txtAudioVisual.value=="")
				{
					alert("What audio/visual equipment do you require?");
					txtAudioVisual.focus();
					return false;
				}else if(txtSpeakingEngagement.value=="")
				{
					alert("What type of speaking engagement do you prefer?");
					txtSpeakingEngagement.focus();
					return false;
				}
				*/
				ValidateSpeakersRegistrationflag.value="true";
		}
	return true;	
}



//Validate Video

function ValidateSpeakerVideos()
{
		with(document.formobject)
		{		
				if(VideoTitle.value=="")
				{
					alert("Please Enter the Video Title");
					VideoTitle.focus();
					return false;
				}	
				ValidateSpeakerVideosflag.value="true";
		}
	return true;	
}


//Validate Speeches
function ValidateSpeakerSpeeches()
{
		with(document.formobject)
		{		
				if(SpeechTitle.value=="")
				{
					alert("Please Enter the Speech Title");
					SpeechTitle.focus();
					return false;
				}	
				ValidateSpeakerSpeechesflag.value="true";
		}
	return true;	
}

function ValidateSpeakerArticles()
{
		with(document.formobject)
		{		
				if(ArticleTitle.value=="")
				{
					alert("Please Enter the Article Title");
					ArticleTitle.focus();
					return false;
				}	
				ValidateSpeakerArticlesflag.value="true";
		}
	return true;	
}




//Validate Admin Speaker

function ValidateAdminSpeaker()
{
		with(document.formobject)
		{		
				if(!(isDate(ApprovalDate.value)))
				{
					alert("Please Enter the Approval Date");
					ApprovalDate.focus();
					return false;
				}
				if(!(isDate(ExpiryDate.value)))
				{
					alert("Please Enter the Expiry Date");
					ExpiryDate.focus();
					return false;
				}
				ValidateAdminSpeakerflag.value="true";
		}
	return true;	
}


//Validating Speaker Login

function validateSpeakerLogin()
{
		with(document.loginform)
		{		
				if(txtUserName.value=="")
				{
					alert("Please Enter the Username");
					txtUserName.focus();
					return false;
				}else if(txtPassword.value=="")
				{
					alert("Please Enter the Username");
					txtPassword.focus();
					return false;
				}
				loginformflag.value="true";
		}
			document.loginform.submit();
}

//Validate Speaker Password
function ValidateSpeakerPassword()
{
		with(document.changepasswordobject)
		{		
				if(txtOldPassword.value=="")
				{
					alert("Please Enter the Old Password");
					txtOldPassword.focus();
					return false;
				}else if(txtNewPassword.value.length<8)
				{
					alert("Please Enter the New Password (Minimum Eight Characters)");
					txtNewPassword.focus();
					return false;
				}else if(txtNewPassword.value!=txtConfirmPassword.value)
				{
					alert("New Password doesnt match");
					txtNewPassword.focus();
					return false;
				}
				ValidateSpeakerPasswordflag.value="true";
		}
	return true;	
}

//Validate Speaker Profile

function ValidateSpeakerProfile()
{
		with(document.profileformobject)
		{		
				if(txtFirstName.value=="")
				{
					alert("Please Enter the First Name");
					txtFirstName.focus();
					return false;
				}else if(txtLastName.value=="")
				{
					alert("Please Enter the Last Name");
					txtLastName.focus();
					return false;
				}else if(txtAddress1.value=="")
				{
					alert("Please Enter the Primary Address");
					txtAddress1.focus();
					return false;
				}else if(txtCity.value=="")
				{
					alert("Please Enter the City");
					txtCity.focus();
					return false;
				}else if(country.value==-1)
				{
					alert("Please select the country");
					country.focus();
					return false;
				}else if(txtPhone.value=="")
				{
					alert("Please Enter the Phone Number");
					txtPhone.focus();
					return false;
				}else if(txtEmail.value=="")
				{
					alert("Please Enter the Email");
					txtEmail.focus();
					return false;
				}else if(!(isEmail(txtEmail.value)))
				{
					alert("Please Enter the Email (abc@abc.com)");
					txtEmail.focus();
					return false;
				}
				//Validate Language
				flag=0;
				for(i=0;i<languages.length;i++)
				{
					if(languages[i].checked)
					{
						flag=1;
						break;	
					}	
				}
				if(flag==0)
				{
					alert("Please select the Languages you can speak");
					return false;
				}
				ValidateSpeakerProfileflag.value="true";
		}
	return true;	
}


function ValidateUploadProfileImage()
{
		with(document.profilepicture)
		{		
				if(txtProfilePicture.value.length<5)
				{
					alert("Please attach the Profile Picture");
					txtProfilePicture.focus();
					return false;
				}
				ValidateUploadProfileImageflag.value="true";
		}
	return true;	
}



//Validate Search

function ValidateSpeakerSearch()
{
		with(document.speakersearchform)
		{		
				ValidateSpeakerSearchflag.value="true";
		}
	return true;	
}

//Validate Request Password

function ValidateRequestPassword()
{
		with(document.requestpasswordform)
		{		
				if(txtUserName.value=="")
				{
					alert("Please Enter the User Name");
					txtUserName.focus();
					return false;
				}else if(txtEmail.value=="")
				{
					alert("Please Enter the Email");
					txtEmail.focus();
					return false;
				}else if(!(isEmail(txtEmail.value)))
				{
					alert("Please Enter the Email (abc@abc.com)");
					txtEmail.focus();
					return false;
				}
				ValidateRequestPasswordflag.value="true";
		}
}

//Validate Speaker Application Status

function ChangeApplicationStatus(status)
{
	if(status==1)
	{
		if(confirm("Are you sure you want to reject this Speaker?"))
		{
			document.formobject.ValidateApplicationStatus.value="true";
			document.formobject.ApplicationStatus.value=status;
			document.formobject.submit();
		}
	}else if(status==2)
	{
		if(confirm("Are you sure you want to approve this Speaker?"))
		{
			if(!(isDate(document.formobject.ApprovalDate.value)))
			{
				alert("Please Enter the Approval Date");
				document.formobject.ApprovalDate.focus();
				return;
			}
			if(!(isDate(document.formobject.ExpiryDate.value)))
			{
				alert("Please Enter the Expiry Date");
				document.formobject.ExpiryDate.focus();
				return;
			}
			document.formobject.ValidateApplicationStatus.value="true";
			document.formobject.ApplicationStatus.value=status;
			document.formobject.submit();
		}
	}
}

//Checking Speaker Details
function CheckSpeakerDetails(flag)
{
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		{
			alert ("Your browser does not support AJAX!");
			return false;
		}
		username=document.speakerregistrationform.txtUserName.value;	
		email=document.speakerregistrationform.txtEmail.value;	
		var url='CheckSpeakerUserName.php';
		url=url+"?username="+username;		
		url=url+"&email="+email;		
		url=url+"&flag="+flag;		
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=CheckSpeakerDetailsstateChanged;
		xmlHttp.open("GET",url,true);		
		xmlHttp.send(null);
		return false;
}

//Ajax function for Speaker Details
function CheckSpeakerDetailsstateChanged()
{
		if (xmlHttp.readyState==4)
		{ 	
				var result=xmlHttp.responseText;
				var resultarray=result.split("----------!!!!!!________RSI_________!!!!!!!!--------");
				if(resultarray[1]=="cleared")
				{
					if(document.speakerregistrationform.applicationclearance.value==0)
					{
						document.speakerregistrationform.applicationclearance.value=1;
					}
				}else
				{
					document.speakerregistrationform.message.value=resultarray[1];
				}
		}
}

//Validate Speaker General Search

function ValidateSpeakerGeneralSearch()
{
		with(document.speakergeneralsearch)
		{		
				searchtype.value="generalsearch";
		}
}

//Validate Link Type

function ValidateLinkType()
{
	with(document.formobject)
	{		
				ValidateLinkTypeflag.value="true";
	}
	return true;	
}

function SpeakerSearchTextBox(control)
{
	if(control.value=="")
	{
		control.value="search by name";
	}
}

