// JavaScript Document
function closeMe(divid)
{  
$('#'+divid).slideUp("fast");
}

var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);
	
 
function moveOptionscountry(id1,id2,deleteoption,countryid,domain)
{
	var selectedTextCountry = new Array();
	var countrylocationid = '';
	var j =0;
	var n = 0;
	for(k=0;k<countryid.length;k++){
		if(countryid.options[k].selected){
			if(deleteoption == 'no'){
				countrylocationid += "cid"+[j]+" = ";
				countrylocationid += countryid.options[k].value + " & ";
				j++;
			}
		}
	 
	}
 
  countrylocationid += "lengthCountry = "+j;
  getmultiselectcountry(countrylocationid,domain);
  var theSelFrom = document.getElementById(id1);
  var theSelTo =  document.getElementById(id2);
  var selLength = theSelFrom.length;
  var selToLength = theSelTo.length;

  var selectedText = new Array();
  var selectedValues = new Array();
  var selectedCount = 0;
  
  var i;
  
  // Find the selected Options in reverse order
  // and delete them from the 'from' Select.
  for(i=selLength-1; i>=0; i--)
  {
    if(theSelFrom.options[i].selected)
    {
     
	  
	  if(deleteoption == 'yes'){
	  	if(in_array(theSelFrom.options[i].text,theSelTo) == false)
		{
			selectedText[selectedCount] = theSelFrom.options[i].text;
			selectedValues[selectedCount] = theSelFrom.options[i].value;
		}
        deleteOption(theSelFrom, i);
	  }else{
	      if(theSelTo.options[0].text == "Doesn't Matter"){
		      for(j=0; j<selToLength; j++)
  				{
				    theSelTo.options[j].innerHTML = '';
				}
		  }
		     if(in_array(theSelFrom.options[i].text,theSelTo) == false)
			 {
			  selectedText[selectedCount] = theSelFrom.options[i].text;
			  selectedValues[selectedCount] = theSelFrom.options[i].value;
			 }
	      theSelFrom.options[i].selected = true;
	  
	  }
      selectedCount++;
    }
  }

  /*for(i=0; i<theSelTo.length; i++){
     alert(theSelFrom.options[i].text);
     //alert(theSelTo.options[i].text);
  }*/
  
  // Add the selected text/values in reverse order.
  // This will add the Options to the 'to' Select
  // in the same order as they were in the 'from' Select.
  for(i=selectedCount-1; i>=0; i--)
  {
   
      if(selectedValues[i] != null){
	 	 addOption(theSelTo, selectedText[i], selectedValues[i],theSelFrom);
	  }

  }
  
  if(NS4) history.go(0);
}


function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}


//////////// Express Intrest //////////////////////////////////////////////////////////////
function expressMail(id,userName,email,domain)
{
xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url=domain+"Resources/function/myFunction.php"
url=url+"?userName="+userName+"&uid="+id+"&email="+email+"&domain="+domain+"&expressMail=expressMail"
xmlHttp.onreadystatechange=viewExpressResult22;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}


function viewExpressResult22()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {  

//alert(xmlHttp.responseText);
 document.getElementById('expID11').innerHTML=xmlHttp.responseText;
   
  }
}



function acceptExpressInterest(senderName,domain,expressID,email,userName,accept)
{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/myFunction.php"
url=url+"?senderName="+senderName+"&expressID="+expressID+"&email="+email+"&userName="+userName+"&accept="+accept+"&domain="+domain
xmlHttp.onreadystatechange=expr11;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function expr11()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {  
  var ajax_response;
	ajax_response = xmlHttp.responseText;
  var split_response=ajax_response.split("###")
		
	document.getElementById("acceptID").innerHTML=split_response[0];
	document.getElementById("showrequestID").innerHTML=split_response[1];
  }
  /*else
  {
	document.getElementById("acceptID").innerHTML=split_response[0];
	document.getElementById("showrequestID").innerHTML=split_response[1];  
	  
  }*/
  
  
  
  
}



function declineExpressInterest(senderName,domain,expressID,email,userName,decline)
{
/*alert(decline);
alert(domain);
alert(expressID);
alert(email);
alert(userName);*/
xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/myFunction.php"
url=url+"?senderName="+senderName+"&expressID="+expressID+"&email="+email+"&userName="+userName+"&decline="+decline+"&domain="+domain
xmlHttp.onreadystatechange=exprdecline11;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function exprdecline11()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {  
 
 //alert(xmlHttp.responseText);
 document.getElementById('showrequestID').innerHTML=xmlHttp.responseText;
   
  }
}


function removefromFavorites(favoritesID,domain)
{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/myFunction.php"
url=url+"?favoritesID="+favoritesID+"&removefavorites=removefavorites&domain="+domain
xmlHttp.onreadystatechange=exprdecline;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function exprdecline()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {  
 document.getElementById('showFavoritesID').innerHTML=xmlHttp.responseText;
   
  }
}




function getPhoto(photoID,domain)
{ 

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?photoID="+photoID;
xmlHttp.onreadystatechange=showPhoto;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function showPhoto() 
{ 
if (xmlHttp.readyState==4)
{ 
	document.getElementById("picsID").innerHTML=xmlHttp.responseText;

}
}


function showBigIMG(userID,profilepic,domain)
{ 

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  var url=domain+"Resources/function/myFunction.php?userID="+userID+"&thumbpic="+profilepic;
  
//var url="http://ls/testing/matrimony/Resources/function/myFunction.php?userID="+userID;
xmlHttp.onreadystatechange=BigPhoto;
function BigPhoto()
{
if (xmlHttp.readyState==4)
{ 
	
	document.getElementById(userID).innerHTML=xmlHttp.responseText;


}	
}
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}





function userAvailability(user,urll)
{ 

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=urll+"Resources/function/myFunction.php?user="+user;
xmlHttp.onreadystatechange=userCheck;
function userCheck()
{
if (xmlHttp.readyState==4)
{ 
	document.getElementById('usercheckID').innerHTML=xmlHttp.responseText;

}	
}
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}





function groomselect(gender,domain)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?gender="+gender;
xmlHttp.onreadystatechange=gender1;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
function gender1(){

if (xmlHttp.readyState==4)
{ 
var ajax_response;
	ajax_response = xmlHttp.responseText;
var split_response=ajax_response.split("###")
	document.getElementById("ageID").innerHTML=split_response[0];
	document.getElementById("ageID2").innerHTML=split_response[1];
}
}


}

function getCommunityh(religionid,domain,str)
{ 
xmlHttp=GetXmlHttpObject();

if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?Community=Community&religionid="+religionid;
xmlHttp.onreadystatechange=allcaste;
xmlHttp.open("GET",url,true);
   
xmlHttp.send(null);
}
function allcaste() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("rc_notify").style.display='none';
document.getElementById("caste").innerHTML=xmlHttp.responseText;


 

}else{
	document.getElementById("rc_notify").style.display='';
	
document.getElementById("rc_notify").innerHTML='Loading ...';

}
}


function getStatesh(countryid,domain)
{ 
$.get(domain+'Resources/function/myFunction.php', {'search': 'advSearch','country': 'country','countryid': countryid}, function(data) {  
$("#statesidblock").html(data);
});	
}







function allstates() 
{ 

if (xmlHttp.readyState==4)
{ 
//alert(xmlHttp.responseText);
document.getElementById("statesid").innerHTML=xmlHttp.responseText;
}
}



function viewContact(viewerID,viewID,domain)
{ 

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?viewerID="+viewerID+"&viewID="+viewID;

xmlHttp.onreadystatechange=contactdetail;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function contactdetail() 
{ 
if (xmlHttp.readyState==4)
{ 
	
	document.getElementById("contactID").innerHTML=xmlHttp.responseText;

}
}






function contactrequestmail(toid,fromid,domain)
{ 
/*alert(toid);
alert(fromid);
alert(domain);*/

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?mailcontact=mail&toid="+toid+"&fromid="+fromid+"&domain="+domain;

xmlHttp.onreadystatechange;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}










//-------------------------Trim function in javascript added by shiv kumar -------------------------------//
function trim(str, chars) {
	return ltrim(rtrim(str, chars), chars);
}
 
function ltrim(str, chars) {
	chars = chars || "\\s";
	return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
 
function rtrim(str, chars) {
	chars = chars || "\\s";
	return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}




////////////////////////////////////////////////// MENU ////////////////////////////////////////////////////////////////////////////


function menu_ajax(domain)
{ 
//alert(domain);
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?menuID=menu";

xmlHttp.onreadystatechange=contact;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function contact() 
{ 
if (xmlHttp.readyState==4)
{ 
	//alert(xmlHttp.responseText);
	
	document.getElementById("menu2C").innerHTML=xmlHttp.responseText;

}
}



////////////////////////////////////////////////// Photo Request ////////////////////////////////////////////////////////////////////////////


function photorequst(fromid,toid,searchprofiledataname,domain)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?photorequest=1&fromid="+fromid+"&toid="+toid+"&domain="+domain+"&searchprofiledataname="+searchprofiledataname;
xmlHttp.onreadystatechange=photorequst1;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function photorequst1() 
{ 
if (xmlHttp.readyState==4)
{ 
	document.getElementById("photorequestid").innerHTML=xmlHttp.responseText;

}
}



////////////////////////////////////////////////// Age count////////////////////////////////////////////////////////////////////////////


function agereturn(day,month,year,domain)
{ 


xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?agecount=agecount&day="+day+"&month="+month+"&domain="+domain+"&year="+year;
xmlHttp.onreadystatechange=agecount;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function agecount() 
{ 
if (xmlHttp.readyState==4)
{ 
	document.getElementById("ageid").innerHTML=xmlHttp.responseText;

}
}


/////////////////////////////////////For contact request /////////////////////////////////////////
function acceptContactRequest(senderName,domain,requestID,email,userName,accept)
{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/myFunction.php"
url=url+"?senderName="+senderName+"&contactrequestID="+requestID+"&email="+email+"&userName="+userName+"&accept="+accept+"&domain="+domain
xmlHttp.onreadystatechange=expr;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function expr()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {  
  var ajax_response;
	ajax_response = xmlHttp.responseText;
  var split_response=ajax_response.split("###")
	document.getElementById("acceptID").innerHTML=split_response[0];
	document.getElementById("showrequestID").innerHTML=split_response[1];
  }
  /*else
  {
	document.getElementById("acceptID").innerHTML=split_response[0];
	document.getElementById("showrequestID").innerHTML=split_response[1];  
	  
  }*/
  
  
  
  
}



function declineContactRequest(senderName,domain,requestID,email,userName,decline)
{
/*alert(senderName);
alert(domain);
alert(requestID);
alert(email);
alert(userName);
alert(decline);*/
xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/myFunction.php"
url=url+"?senderName="+senderName+"&contactrequestID="+requestID+"&email="+email+"&userName="+userName+"&decline="+decline+"&domain="+domain
xmlHttp.onreadystatechange=contactdecline;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function contactdecline()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {  
 document.getElementById('showrequestID').innerHTML=xmlHttp.responseText;
   
  }
}

///////////////////////////////////// For match profile //////////////////////////////////////////////////////// 
//function matchprofileajax(domain,gender,height1,height2,age1,age2,religion,caste,education,city,country,mtongue)


function matchprofileajax(domain,gender,height1,height2,age1,age2,mtongue,blood_group,colour,marital,children,education,occupation_sector,income,country,state,city,religion,caste,gotra,nakshatra,rashi,veg_nonveg,smoking,drinking,education_detail)
{

/*alert('domain'+domain);
alert('gender'+gender);
alert('height1'+height1);
alert('height2'+height2);
alert('age1'+age1);
alert('age2'+age2);
alert('religion'+religion);
alert('caste'+caste);
alert('education'+education);
alert('city'+city);
alert('country'+country);
alert('mtongue'+mtongue);
alert('blood_group'+blood_group);
alert('colour'+colour);
alert('marital'+marital);
alert('children'+children);
alert('education'+education);
alert('occupation_sector'+occupation_sector);
alert('income'+income);
alert('state'+state);
alert('gotra'+gotra);
alert('nakshatra'+nakshatra);
alert('rashi'+rashi);
alert('veg_nonveg'+veg_nonveg);
alert('smoking'+smoking);
alert('drinking'+drinking);
alert('education_detail'+education_detail);*/

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/myFunction.php"
url=url+"?matchprofilediv=matchprofilediv&domain="+domain+"&gendermatch="+gender+"&age1="+age1+"&age2="+age2+"&religion="+religion+"&caste="+caste+"&education="+education+"&city="+city+"&country="+country+"&mtongue="+mtongue+"&height1="+height1+"&height2="+height2+"&blood_group="+blood_group+"&colour="+colour+"&marital="+marital+"&children="+children+"&occupation_sector="+occupation_sector+"&income="+income+"&state="+state+"&gotra="+gotra+"&nakshatra="+nakshatra+"&rashi="+rashi+"&veg_nonveg="+veg_nonveg+"&smoking="+smoking+"&drinking="+drinking+"&education_detail="+education_detail;
xmlHttp.onreadystatechange=partnermatch;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function partnermatch()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {
	
 document.getElementById('matchproid').innerHTML=xmlHttp.responseText;
 setTimeout('matchprofileajax(\''+domain+'\',\''+gender+'\',\''+age1+'\',\''+age2+'\',\''+religion+'\',\''+caste+'\',\''+education+'\',\''+city+'\',\''+country+'\',\''+mtongue+'\',\''+height1+'\',\''+height2+'\',\''+blood_group+'\',\''+colour+'\',\''+marital+'\',\''+children+'\',\''+occupation_sector+'\',\''+income+'\',\''+state+'\',\''+gotra+'\',\''+nakshatra+'\',\''+rashi+'\',\''+veg_nonveg+'\',\''+smoking+'\',\''+drinking+'\',\''+education_detail+'\')', 60000000);
  
 }
 else
 {
 
	document.getElementById("matchproid").innerHTML='<img src="'+domain+'Resources/Images/ajax_loader.gif" width="21" height="24" style="margin-top:100px; margin-left:100px;">';
	
 }	
	
}




///////////////////////////////////// For feature profile //////////////////////////////////////////////////////// 

function featureprofileajax(domain,gender)
{

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/myFunction.php"
url=url+"?featureprofilediv=featureprofilediv&domain="+domain+"&genderfeature="+gender;
xmlHttp.onreadystatechange=function()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {

 document.getElementById('featureid').innerHTML=xmlHttp.responseText;
 setTimeout('featureprofileajax(\''+domain+'\',\''+gender+'\')', 9000);
  
 }
 else
 {
	 
	document.getElementById("featureid").innerHTML='<img src="'+domain+'Resources/Images/ajax_loader.gif" width="21" height="24" style="margin-top:30px; margin-left:100px;">';
	
 }	
	
}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}










///////////////////////////////for partner prefrences Hari

function getStatesarray(countryid,domain)
{ 

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?countryarray=countryarray&countryid="+countryid;

xmlHttp.onreadystatechange=allstatearray;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function allstatearray()
{

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 

document.getElementById('statearray').innerHTML=xmlHttp.responseText;

}

}



///////////////////////////////////////////For caste in edit partener prefrence



function getCommunity(religionid,domain)
{ 

var allreligionid;

  allreligionid = "";
  for (i=0; i < document.getElementById("community_religion").length; i++) {
    if (document.getElementById("community_religion").options[i].selected == true) {
      allreligionid += 
        document.getElementById("community_religion").options[i].value + "-";
    }
  }



xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?Community_partner=Community_partner&allreligionid="+allreligionid;
xmlHttp.onreadystatechange=partnercaste;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function partnercaste() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
var ajax_response;
	ajax_response = xmlHttp.responseText
	document.getElementById("caste123").innerHTML=xmlHttp.responseText;


}
}



function getStatesarraynew(countryid,domain)
{ 


var allcountryid;

  allcountryid = "";
  for (i=0; i < document.getElementById("countryofresidence_fromarray").length; i++) {
    if (document.getElementById("countryofresidence_fromarray").options[i].selected == true) {
      allcountryid += 
        document.getElementById("countryofresidence_fromarray").options[i].value + "-";
    }
  }

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url=domain+"Resources/function/myFunction.php?getstatearraynew=getstatearraynew&allcountryid="+allcountryid;


xmlHttp.onreadystatechange=countrystate;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function countrystate() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
var ajax_response;
	ajax_response = xmlHttp.responseText
	
	
	document.getElementById("statearray").innerHTML=xmlHttp.responseText;


}
}


function featureprofile(num,domain)
{

	xmlHttp=GetXmlHttpObject()
	if(num ==1){
	  var imgname = document.getElementById("next_prv_h").getElementsByTagName("img")[0].src;
	}else{
	  var imgname = document.getElementById("next_prv_h").getElementsByTagName("img")[1].src;	
	}
	var imgname_array=imgname.split("/");
    if (imgname_array[7] == "arrow_f_h.gif"){

		document.getElementById("next_prv_h").getElementsByTagName("img")[1].src = domain+"Resources/Images/arrow_f.gif";
		document.getElementById("next_prv_h").getElementsByTagName("img")[0].src = domain+"Resources/Images/arrow_b_h.gif";
		
	}else{

		document.getElementById("next_prv_h").getElementsByTagName("img")[0].src = domain+"Resources/Images/arrow_b.gif"
		document.getElementById("next_prv_h").getElementsByTagName("img")[1].src = domain+"Resources/Images/arrow_f_h.gif";
		
	}
	
	if (xmlHttp==null){
	 alert ("Browser does not support HTTP Request");
	}
		var url=domain+"Resources/function/myFunction.php"
		url=url+"?domain="+domain+"&page="+num;
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
				document.getElementById('featureid').innerHTML=xmlHttp.responseText;
			}
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
}


//////////// Add To Favorites //////////////////////////////////////////////////////////////


function addToFavorites(UserId,LoginUserId,domain)
{
	
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/ajaxFunction.php"
url=url+"?addToFavorites=addToFavorites&UserId="+UserId+"&LoginUserId="+LoginUserId+"&domain="+domain

xmlHttp.onreadystatechange=addToFavoritesResult;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function addToFavoritesResult()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  { 
var ajax_response= xmlHttp.responseText
var split_response=ajax_response.split("##");
/*document.getElementById("closeFavrate_"+split_response[1]).style.display = ''; 
document.getElementById("FavoritesResp_"+split_response[1]).innerHTML=split_response[0];
  */
  }
}


///////////////////////////////////// END  Add To Favorites//////////////////////////////////////////////////////// 


//////////// Add To Express Interest //////////////////////////////////////////////////////////////


function addToExpressInterest(UserId,LoginUserId,domain)
{

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/ajaxFunction.php"
url=url+"?addToExpressInterest=addToExpressInterest&UserId="+UserId+"&LoginUserId="+LoginUserId+"&domain="+domain

xmlHttp.onreadystatechange=addToExpressInterestResult;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function addToExpressInterestResult()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {  
var ajax_response= xmlHttp.responseText

var split_response=ajax_response.split("##");
/*document.getElementById("closeExpress_"+split_response[1]).style.display = '';
document.getElementById("ExpressInterestResp_"+split_response[1]).innerHTML=split_response[0];
*/
  }
}


//////////// Contact Request //////////////////////////////////////////////////////////////

function ContactRequest(UserId,LoginUserId,domain)
{

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=domain+"Resources/function/ajaxFunction.php"
url=url+"?sendContactRequest=sendContactRequest&UserId="+UserId+"&LoginUserId="+LoginUserId+"&domain="+domain

xmlHttp.onreadystatechange=ContactRequestResult123;
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function ContactRequestResult123()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  { 

var ajax_response= xmlHttp.responseText

var split_response=ajax_response.split("##");
/*document.getElementById("closeContact_"+split_response[1]).style.display = '';
document.getElementById("ContactRequestResp_"+split_response[1]).innerHTML=split_response[0];*/
   if(split_response[0]!='')
   {
   $(share1).animate({ height: 'hide'}, 'fast');
   }

  }
}



function closeFavrates(id)
{

 document.getElementById("closeFavrate_"+id).style.display = 'none';

}


function closeExpressInterest(id)
{
 document.getElementById("closeExpress_"+id).style.display = 'none';
}

function closeContactRequest(id)
{
 document.getElementById("closeContact_"+id).style.display = 'none';
}

function getmultiselectcountry(str,domain){
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
       
	   var url=domain+"Resources/function/myFunction.php?cid = "+str+" & domain = "+domain;
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
			 document.getElementById('stateidarray').innerHTML=xmlHttp.responseText;
			}
		}
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	
	
}




///////////////////////////////////// END //////////////////////////////////////////////////////// 


