function showHint1(){
	alert ("Your browser does not support AJAX!");
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)  {  alert ("Your browser does not support AJAX!");  return;  }
	
	$dbField_Name_1 	= "patient_ID";
	$dbField_Name_2     = "DirectiveName";
	$dbField_Name_3 	= "DirectiveText";
	$dbField_Name_4 	= "Comments";
	$dbField_Name_5 	= "DirectiveLevel";
	$dbField_Name_6 	= "IsValidDirective";
	  
	tmpVar1 = document.getElementById("txtDirectiveName").value;
	tmpVar2 = document.getElementById("txtDirectiveText").value;
	tmpVar3 = document.getElementById("txtComments").value;
	tmpVar4 = document.getElementById("txtDirectiveLevel").value;	  
	tmpVar5 = document.getElementById("txtIsValidDirective").value;	  
	
	var passData = 'txtDirectiveName='+escape(tmpVar1)+'&txtDirectiveText='+escape(tmpVar2)+'&txtComments='+escape(tmpVar3)+'&txtDirectiveLevel='+escape(tmpVar4)+'&txtIsValidDirective='+escape(tmpVar5);
	var url="nadmnewpatalert.php?submit=1";
	xmlHttp.open("POST",url,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");  
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.send(passData);
} 

//Other ajax Function
function stateChanged(){ 
		if ((xmlHttp.readyState==4) || (xmlHttp.readyState=="complete")) { 
			document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
		}
	}
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;
}
var xmlHttp;
var msie = (window.ActiveXObject) ? true : false;
var moz = (document.implementation && document.implementation.createDocument) ? true : false;
function ajax_server_check(){
	try{
		xmlHttp=new XMLHttpRequest();
	}
	catch (e){
		try{			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");		}
		catch (e){
			try	{		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");		
			}
			catch (e){
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
}

function fnChange_Sub_Cat(req_no,txtTheme_ID){
	var Theme_ID;
	Theme_ID = '';
	var req_Main_ID = document.getElementById("txtMain_Category_ID").value;
	if(req_no == 2){
		if(txtTheme_ID != "") 	Theme_ID = txtTheme_ID;
		else					Theme_ID = document.getElementById("txtTheme_ID").value;
	}
	ajax_server_check();
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
			var xmlDoc	=	xmlHttp.responseText;
			document.getElementById("div_image").innerHTML	= xmlDoc;
			if (parent.document.getElementById('div_video_player')){
				parent.document.getElementById('div_video_player').style.display= 'block'; 
			}
			if (document.getElementById('div_video_player')){
				document.getElementById('div_video_player').style.display= 'block'; 
			}
			//document.getElementById("frm_upload_image").src = "Usr_Invitation_Image_Upload.asp?Submit=2&Category_ID="+req_Main_ID;
		}
	}
	var url;
	url = "Ajax_function_return_Value.asp?change_main_ID=1&main_cat_ID="+req_Main_ID+"&Theme_ID="+Theme_ID;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function fnCheck_User(){
	if(fnSubmit9()){
		var Password ="";
		User_ID = document.getElementById("txtSenderEmail").value;
		if(document.getElementById("txtPassword")) Password = document.getElementById("txtPassword").value;
		ajax_server_check();
		xmlHttp.onreadystatechange=function(){
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
				var xmlDoc	=	xmlHttp.responseText;
				if(xmlDoc == 1){
					Show_Dialog_with_url('Popup_Login_Src.asp?check=1&SenderEmail='+User_ID+'&Password='+Password,'');				
				}else{
					fnSubmit1();
				}
			}
		}
		var url;
		url = "Ajax_function_return_Value.asp?chk_user=1&User_ID="+User_ID;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);	
	}
}
function fnCheck_address_book(req_all,reqUserName){
	reqSearch = "";
	if(req_all == 0){
		reqSearch = document.getElementById("txtSearch").value;
	}
	if(req_all == 1){
		document.getElementById("txtSearch").value = "";
	}
	ajax_server_check();
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
			var xmlDoc	=	xmlHttp.responseText;
			document.getElementById("div_address_book").innerHTML	=	xmlDoc;
		}
	}
	var url;
	url = "Ajax_function_return_Value.asp?Check_address_book=1&search="+reqSearch+"&UserName="+reqUserName;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function fnreminder_mail_list(reqInvite_ID){
	req_respond_yes = 0;
	req_respond_maybe = 0;
	req_respond_notyet = 0;
	if(document.getElementById("txtMailReminder_Yes").checked == true){
		req_respond_yes = 1;
	}
	if(document.getElementById("txtMailReminder_Maybe").checked == true){
		req_respond_maybe = 1;
	}
	if(document.getElementById("txtMailReminder_Notyet").checked == true){
		req_respond_notyet = 1;
	}
	keyword1 = document.getElementById("txt_Guest_EMail").value;
	ajax_server_check();
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
			var xmlDoc	=	xmlHttp.responseText;
			document.getElementById("div_reminder_mail_list").innerHTML	=	xmlDoc;
		}
	}
	var url;
	url = "Ajax_function_return_Value.asp?keyword1="+keyword1+"&Invite_ID="+reqInvite_ID+"&reminder_mail_list=1&Yes="+req_respond_yes+"&Maybe="+req_respond_maybe+"&Notyet="+req_respond_notyet;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function fnChangeState(){
	Country = document.getElementById("cmbCountry").value;
	ajax_server_check();
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
			var xmlDoc	=	xmlHttp.responseText;
			document.getElementById("div_state").innerHTML	=	xmlDoc;
		}
	}
	var url;
	url = "Ajax_function_return_Value.asp?change_country=1&Country="+Country;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
}
function fnPrev_Next_Ecard(req_Main_ID,Ecard_no){
	display_text = "";
	if(document.getElementById("txtMessage")){
		display_text = document.getElementById("txtMessage").value;
	}
	ajax_server_check();
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
			var xmlDoc	=	xmlHttp.responseText;
			document.getElementById("div_ecard_details").innerHTML	=	xmlDoc;
			document.getElementById("txtEcard_ID").value = Ecard_no;
		}
	}
	var url;
	url = "Ajax_function_return_Value.asp?change_Prev_Next_ECard=1&main_cat_ID="+req_Main_ID+"&Ecard_ID="+Ecard_no;
	var passData = 'display_text='+escape(display_text);
	xmlHttp.open("POST",url,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");  
	xmlHttp.send(passData);
}
function GetYahooAddressBook1111(User_ID,Password,SiteURL){
	var contacts;
	ajax_server_check();
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
			var xmlDoc=xmlHttp.responseXML;
				var last_name;
				last_name = xmlDoc.getElementsByTagName('last_name');
				if(last_name.length > 0){
					for (var i=0;i<last_name.length;i++){						
						contacts[i]['email']= xmlDoc.getElementsByTagName("email")[i].firstChild.nodeValue;
						contacts[i]['last_name']= xmlDoc.getElementsByTagName("last_name")[i].firstChild.nodeValue;
						contacts[i]['first_name']= xmlDoc.getElementsByTagName("first_name")[i].firstChild.nodeValue;
						contacts[i]['middle_name']= xmlDoc.getElementsByTagName("middle_name")[i].firstChild.nodeValue;
						alert(contacts[i]['email']);
					}
				}
			return 	contacts;
		}
	}
	var url;
	url = SiteURL + "?Yahoo_Addrs_Import=1&User_ID="+User_ID+"&Password="+Password;
	xmlHttp.open("GET",url,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");  
	xmlHttp.send(null);
}
function GetYahooAddressBook(XmlStr){
	alert(XmlStr);
	var contacts;
	var xmlDoc=XmlStr.split("<abc>");
	var xmlinner;
	for (var i=0;i<xmlDoc.length-1;i++){						
		xmlinner=xmlDoc[i];
		xmlinner=xmlinner.split("<pqr>");
	    alert(xmlinner[0]+" "+xmlinner[1]);
	}
	return 	contacts;
}