// JavaScript Document

/* Statr Function to changed index page featured profile box on mouse over event. By-Shriram Chaudhari, Date:27/11/2010 */



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;

}



var xmlhttp;	

    var active_image_var;

	

	function change_active_state(fetr_userid)

	{

		active_image_var=document.getElementById(fetr_userid).id;		

	}

	function change_profile_featured_box(fetr_userid)

		{			

			document.getElementById(active_image_var).className='';

			document.getElementById(fetr_userid).className='active';

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      	  var url="ajax_php_files/index_pg_featured_profile_box_changed.php";

				      url=url+"?user_id="+fetr_userid;						

					  xmlhttp.onreadystatechange=stateChanged_featurebox;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

	   }

							

			function stateChanged_featurebox()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							  a = xmlhttp.responseText;

						  	 

							  document.getElementById('featured_profiles_allinfo').innerHTML=a;							  

							}

					}

					else

					{

						document.getElementById('featured_profiles_allinfo').innerHTML='<img src="images/loding1.gif"   />';

					}

				}

				

/* End Function to changed index page featured profile box on mouse over event. */



/* Statr Function of index page featured profile box for NEXT button on mouse click event. By-Shriram Chaudhari, Date:29/11/2010 */



    function nextBlock(prevval,nextval,limit1,limit2)

		{  

			prevval=parseInt(prevval)+1;

			limit1=parseInt(limit1)+5;

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/index_pg_featured_profile_box_prev_next_changed.php";

				      url=url+"?prevval="+prevval;	

					  url=url+"&nextval="+nextval;

					  url=url+"&limit1="+limit1;

					  url=url+"&limit2="+limit2;

					  

					  xmlhttp.onreadystatechange=stateChanged_featurebox_next;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_featurebox_next()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  

							  document.getElementById('featured_profiles_bg').innerHTML=a;

							  

							}

					}

					else

					{

						document.getElementById('featured_profiles_bg').innerHTML='<img src="images/loding1.gif"  />';

					}

				}

				

/* End Function of index page featured profile box for NEXT button on mouse click event. */





/* Statr Function of index page featured profile box for PREVIOUS button on mouse click event. By-Shriram Chaudhari, Date:29/11/2010 */



    function prevBlock(prevval,nextval,limit1,limit2,temp)

		{

			

			

		 	prevval=parseInt(prevval)-1;

			limit1=parseInt(limit1)-5;

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/index_pg_featured_profile_box_prev_next_changed.php";

				      url=url+"?prevval="+prevval;	

					  url=url+"&nextval="+nextval;

					  url=url+"&limit1="+limit1;

					  url=url+"&limit2="+limit2;

					  url=url+"&temp="+temp;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_featurebox_prev;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_featurebox_prev()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('featured_profiles_bg').innerHTML=a;

							  

							}

					}

				}

			
/* End Function of index page featured profile box for PREVIOUS button on mouse click event. */

/* Statr Function of index page featured profile box for NEXT button on mouse click event. By-Shriram Chaudhari, Date:29/11/2010 */

/* Stat Function of search-result page for Filter Search By-Shriram Chaudhari, Date:29/11/2010 */

	var section_conc="";

	var sect_option_conc=""

	var cnt1=0;

    function searchFilter(search_query)

		{	
					  url="?heightfrom1_text="+document.getElementById('heightfrom1_text').value;
					  url=url+"&heightto1_text="+document.getElementById('heightto1_text').value;
					  url=url+"&user_city="+document.getElementById('selected_city').value;
					  url=url+search_query;
				      window.location='search_result_filter.php'+url;

			/*xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			          var url="ajax_php_files/search_result_filter.php";				
					  url=url+"?heightfrom1_text="+document.getElementById('heightfrom1_text').value;
					  url=url+"&heightto1_text="+document.getElementById('heightto1_text').value;
					  url=url+"&user_city="+document.getElementById('selected_city').value;
					  url=url+search_query;
					  
					
					  xmlhttp.onreadystatechange=stateChanged_s_filter;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);*/

				}

							

			/*function stateChanged_s_filter()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{ 
							   a = xmlhttp.responseText;
							   document.getElementById('filter_data').innerHTML=a;
							   
							} 
					} 
					else 
					{ document.getElementById('filter_data').innerHTML="<img src='images/loading.gif' />"; } 

				}
*/	
/* End Function of search-result page for Filter Search */

/* Written by vikrant 15-jan-2011 start */

	function filterdata(divname,value)

	 {  
	
	   document.getElementById(divname).value=value;	  

	   var arrcount=document.getElementsByName("filterdiv").length;

	   var tempurl="";

	   for (i = 0; i < arrcount; i++)
	    {		  
			if(document.getElementsByName("filterdiv").item(i).id=='photosearch' && document.getElementsByName("filterdiv").item(i).value=='0,1')
			{

				tempurl=tempurl+"&"+document.getElementsByName("filterdiv").item(i).id+" IN ("+document.getElementsByName("filterdiv").item(i).value+")" ;

			}
			else
			{

		   		tempurl=tempurl+"&"+document.getElementsByName("filterdiv").item(i).id+"="+document.getElementsByName("filterdiv").item(i).value;

			}

	    }
     	    searchFilter(tempurl);
	 }
 

	 function chkphoto()

	 {

		 if(document.getElementById("withphoto").checked)

		 { if (document.getElementById("withoutphoto").checked) { var tempphoto='0,1'; } else { var tempphoto=1; } }

		 

 		 else if(document.getElementById("withoutphoto").checked)

		 { if (document.getElementById("withphoto").checked) { var tempphoto='0,1'; } else { var tempphoto=0; } }

		 

		 else

		  { var tempphoto=''; }	 

		 

		  filterdata('photosearch',tempphoto);

     }

/* Written by vikrant 15-jan-2011 end */

/* Start Validation Script Function For Submit Login -Shriram Chaudhari date : 16/12/2010 */

function submitLogin()

{
	
	var tempcnt=1;
    if(document.getElementById("username").value=="")
	{
		document.getElementById("error_message").innerHTML="Please Enter Your Login ID"; 
		tempcnt++; 
	}

	else
	{ 
		document.getElementById("error_message").style.border=""; 
	}
		if (tempcnt==1)
		{
			 if(document.getElementById("password").value=="")
				{ document.getElementById("error_message").innerHTML="Please Enter Your Password"; tempcnt++; 
				}

			else
			{ 
			document.getElementById("error_message").style.border=""; 
			}

		}

			

			if(tempcnt==1)

			  {				  
			
				 //Call Ajax function for checking valid user id and password & also complete the user login process 

				  submitLoginAjax();

			  }
}
/* End Validation Script Function For Submit Login -Shriram Chaudhari date :16/12/2010 */

/* Start Validation Script Function For Submit Login -Shriram Chaudhari date : 16/12/2010 */
function submitLoginAjax()

		{
			//alert(fetr_userid);
				
			var username=document.getElementById("username").value;
			
			var password=document.getElementById("password").value;

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/user-login-process.php";

				      url=url+"?username="+username;	

					  url=url+"&password="+password;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_loginAjax;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_loginAjax()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a=xmlhttp.responseText;

							   a=a.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');

						 		 if(a=='N')

								  { 

									  document.getElementById("error_message").innerHTML= "Incorrect Email Id Or Password";		

									  document.getElementById("waitcomplogin").innerHTML='<img src="images/login.png" onclick="comp_login()" />';

								  }

								/*  else if (a=="N1")

								  {

									  document.getElementById("error_message").innerHTML= "Your account still not approved.";		

									  document.getElementById("waitcomplogin").innerHTML='<img src="images/login.png" onclick="comp_login()" />';

								  }*/

								  else 

								  {

									  window.location='inbox_page.php';

								  }

							  

							}

					}

					else

					{

						 document.getElementById("waitcomplogin").innerHTML='<img  src="images/wait.png" hspace="2" vspace="2"/>';

					}

				}





/* End Validation Script Function For Submit Login -Shriram Chaudhari date :16/12/2010 */







/* Start Function of inbox page Message Received box . By-Shriram Chaudhari, Date:09/01/2011 */



    function callToReceivedMessgBlock(page)
		{
			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-received-messages.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_myreceived_messg;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_myreceived_messg()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{ 

							    

							   a = xmlhttp.responseText;
							
							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();



							}

					}

				}

				

				

				function callToReceivedMessgBlockadmin(page)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-received-messages-admin.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_myreceived_messgadmin;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_myreceived_messgadmin()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{ 

							    

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();



							}

					}

				}

				

				

/* End Function of inbox page Message Received box. */



/* Start Function of inbox page Message Sent box . By-Shriram Chaudhari, Date:09/01/2011 */



    function callToSentMessgBlock(page)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-sent-messages.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_mysent_messg;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_mysent_messg()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

/* End Function of inbox page Message Sent box. */



/* Start Function of inbox page Favorite Profile box . By-Shriram Chaudhari, Date:09/01/2011 */



    function callToFavProfBlock(page)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/favorite-profiles.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_mysent_messg;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_mysent_messg()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

/* End Function of inbox page Favorite Profile box. */





/* Start Function of inbox page Photo Request Received box . By-Shriram Chaudhari, Date:09/01/2011 */



    function callToReceivedPhotoRequestBlock(page)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-photo-requests-received.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_photo_request_received;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_photo_request_received()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

/* End Function of inbox page Photo Request Received box . */





/* Start Function of inbox page Photo Request Sent box . By-Shriram Chaudhari, Date:09/01/2011 */



    function callToSentPhotoRequestBlock(page)

		{

				

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-photo-requests-sent.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_photo_request_sent;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_photo_request_sent()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

/* End Function of inbox page Photo Request Sent box . */



/* Start Function of inbox page Express Interest Received box . By-Shriram Chaudhari, Date:09/01/2011 */



    function callToReceivedExpressInterestBlock(page)

		{

				

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-expressed-received-messages.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_express_interest_received;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_express_interest_received()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

/* End Function of inbox page Express Interest Received box . */



/* Start Function of inbox page Express Interest Sent box . By-Shriram Chaudhari, Date:09/01/2011 */



    function callToSentExpressInterestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-expressed-sent-messages.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_express_interest_sent;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_express_interest_sent()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

/* End Function of inbox page Express Interest Sent box . */





/* Start Function of inbox page Phone Request Received box . By-Shriram Chaudhari, Date:10/01/2011 */



    function callToReceivedPhoneRequestBlock(page)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-phone-requests-received.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

				 

					  xmlhttp.onreadystatechange=stateChanged_phone_request_received;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_phone_request_received()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

/* End Function of inbox page Phone Request Received box . */





/* Start Function of inbox page Phone Request Sent box . By-Shriram Chaudhari, Date:10/01/2011 */



    function callToSentPhoneRequestBlock(page)

		{

				

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-phone-requests-sent.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_phone_request_sent;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_phone_request_sent()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

/* End Function of inbox page Phone Request Sent box . */



/* Start Function of inbox page change profile photo . By-Rupal Kotak, Date:15/01/2011 */



function callToEditPhoto()

{

				

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

	{

		alert ("Browser does not support HTTP Request");

		return;

	}

	var url="ajax_php_files/change_profile_photo.php";

		      	

	xmlhttp.onreadystatechange=stateChanged_edit_photo;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}

							

function stateChanged_edit_photo()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

	       a = xmlhttp.responseText;

    	  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

				  

		}

	}

} 

/* End Function of inbox page change profile photo . */



/* Start Function of inbox page edit album . By-Rupal Kotak, Date:15/01/2011 */

function callToEditAlbum()

{

				

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

    {

	   	  alert ("Browser does not support HTTP Request");

		  return;

	}

	var url="ajax_php_files/change_profile_album.php";

				      	

	xmlhttp.onreadystatechange=stateChanged_edit_album;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}

							

function stateChanged_edit_album()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

		   a = xmlhttp.responseText;

		  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

 document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

		}

	}

}

/* End Function of inbox page edit album . */



/* Start Function of inbox page delete album photo. By-Rupal Kotak, Date:16/01/2011 */

function del(p)

{

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

    {

	   	  alert ("Browser does not support HTTP Request");

		  return;

	}

	var url="ajax_php_files/delete_album_photo.php?photo="+p;

	     	

	xmlhttp.onreadystatechange=stateChanged_del_album_photo;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}



function stateChanged_del_album_photo()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

		   alert(xmlhttp.responseText);

		   //window.location.reload();

		}

	}

}



/* End Function of inbox page delete album photo. */



/* Start Function of inbox page  my profile views.. By-Rupal Kotak, Date:16/01/2011 */

function get_profile_views(page)

{

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

    {

	   	  alert ("Browser does not support HTTP Request");

		  return;

	}

	var url="ajax_php_files/my-profile-views.php";

	url=url+"?page="+page;	

	xmlhttp.onreadystatechange=stateChanged_profile_views;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}



function stateChanged_profile_views()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

		   pv = xmlhttp.responseText;

		   document.getElementById('midal_modify_profile_information_bg').innerHTML=pv;

		   document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

		}

	}

}



/* End Function of inbox page my profile views. */





/* Start Function of inbox page  ignore list.. By-Rupal Kotak, Date:18/01/2011 */

var temp_pp='';

function get_ignore_list(page,pp)

{ temp_pp=pp;

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

    {

	   	  alert ("Browser does not support HTTP Request");

		  return;

	}

	var url="ajax_php_files/matching-profile.php";

	url=url+"?page="+page;	

	xmlhttp.onreadystatechange=stateChanged_ignore_list;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}



function stateChanged_ignore_list()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

		   il = xmlhttp.responseText;

		   document.getElementById('midal_modify_profile_information_bg').innerHTML=il;

		   if(temp_pp==1)

		   {  document.getElementById("midal_modify_profile_information_bg").scrollIntoView(); }

		}

	}

}



/* End Function of inbox page ignore list. */





/* Start Function of inbox page  ignore list.. By-Rupal Kotak, Date:18/01/2011 */

function get_new_profile(page)

{

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

    {

	   	  alert ("Browser does not support HTTP Request");

		  return;

	}

	var url="ajax_php_files/new-profile.php";

	url=url+"?page="+page;	

	xmlhttp.onreadystatechange=stateChanged_new_profile;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}



function stateChanged_new_profile()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

		   il = xmlhttp.responseText;

		   document.getElementById('midal_modify_profile_information_bg').innerHTML=il;		   

		   document.getElementById("midal_modify_profile_information_bg").scrollIntoView();  

		}

	}

}





/* End Function of inbox page ignore list. */







function get_mobile_verification()

{

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

    {

	   	  alert ("Browser does not support HTTP Request");

		  return;

	}

	var url="ajax_php_files/mobile_verify.php";

	url=url+"?page=1";	

	xmlhttp.onreadystatechange=stateChanged_mobile_verification;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}



function stateChanged_mobile_verification()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

		   il = xmlhttp.responseText;

		   document.getElementById('midal_modify_profile_information_bg').innerHTML=il;		   

		   document.getElementById("midal_modify_profile_information_bg").scrollIntoView();  

		}

	}

}



function verfy_mobile()

{

	var  tempstr=document.getElementById('mob_verify').value;	

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

    {

	   	  alert ("Browser does not support HTTP Request");

		  return;

	}

	var url="ajax_php_files/mobile_verify_confirm.php";

	url=url+"?tempcode="+tempstr;	

	xmlhttp.onreadystatechange=stateChanged_verfy_mobile;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}



function stateChanged_verfy_mobile()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

		   il = xmlhttp.responseText;

		   document.getElementById('midal_modify_profile_information_bg').innerHTML=il;

		   document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

		}

	}

}



/* Start Function of inbox page requests inbox.. By-Rupal Kotak, Date:18/01/2011 */

function show_requests_status(page,page1,page2)

{

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

    {

	   	  alert ("Browser does not support HTTP Request");

		  return;

	}

	var url="ajax_php_files/paid-member-account-inbox.php";

	url=url+"?page="+page+"&page1="+page1+"&page2="+page2;	

	

	xmlhttp.onreadystatechange=stateChanged_requests;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}



function stateChanged_requests()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

		   il = xmlhttp.responseText;

		   document.getElementById('midal_modify_profile_information_bg').innerHTML=il;

		   document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

		}

	}

}



/* End Function of inbox page requests inbox. */





/* Script for search by id Written by vikrant 23/1/2011 start */

var pid='';

  function search_by_id(pid1)

		{ pid=pid1; 

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/check_profile.php?uid="+pid;

				  

					  xmlhttp.onreadystatechange=stateChanged_profile_search;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

		}

		

		function stateChanged_profile_search()

			{

				if (xmlhttp.readyState==4)

				{

					if(xmlhttp.status == 200)

						{

						   a = xmlhttp.responseText;

						  if (a=="No")

						   { alert ('Invalid Id / Account not activated'); }

						  else

						   { window.location='view-member-profile-page.php?uid='+pid; }

						}

				}

				 

			}

/* Script for search by id Written by vikrant 23/1/2011 end */				







/* Accept or decline request starts : By Rupal 28th Jan 2011 */



function req(val,r_id,s_id)

{

	if(val=='A')

	{

		ans1 = confirm("Are you sure you want to accept this request?");

		if(ans1==true)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/change_interest_request_status.php?val="+val+"&r_id="+r_id+"&s_id="+s_id;

				  

					  xmlhttp.onreadystatechange=request_status;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

		}

	}

	else if(val=='D')

	{

		ans1 = confirm("Are you sure you want to decline this request?");

		if(ans1==true)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/change_interest_request_status.php?val="+val+"&r_id="+r_id+"&s_id="+s_id;

				  

					  xmlhttp.onreadystatechange=request_status;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

		}

	}

}



function request_status()

			{

				if (xmlhttp.readyState==4)

				{

					if(xmlhttp.status == 200)

						{

						    

						    a=xmlhttp.responseText;

							var tempstr=a.split('^');

							var smsstr=tempstr[0];

							if(smsstr!='')

				{ gosms2 (smsstr); }

							document.getElementById("req_stat").innerHTML=tempstr[1];

							

						}

				}

				 

			}

			

			

 function callToAcceptedInterestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-expressed-accepted-interests.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_accepted_interest;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_accepted_interest()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  

							}

					}

				}

				

function callToDeclinedInterestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-expressed-declined-interests.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_declined_interest;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_declined_interest()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  

							}

					}

				}

				

				

				function callToPendingInterestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-expressed-pending-interests.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_pending_interest;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_pending_interest()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  

							}

					}

				}



/* Accept or decline request ends */







/* By Vikrant 28-jan-2011 */



function protect_photo(uid)

{

	var temp_url='';

	if (document.getElementById("protect_photo").checked)

	  temp_url='?photostatus=0';

	else

	  temp_url='?photostatus=1';	  

	

	temp_url=temp_url+"&uid="+uid;

	 

	xmlhttp=GetXmlHttpObject();

	if (xmlhttp==null)

	{

		alert ("Browser does not support HTTP Request");

		return;

	}

	var url="ajax_php_files/protect_photo.php"+temp_url;

		      	 

	xmlhttp.onreadystatechange=stateChanged_protect_photo;

	xmlhttp.open("GET",url,true);

	xmlhttp.send(null);

}

							

function stateChanged_protect_photo()

{

	if (xmlhttp.readyState==4)

	{

		if(xmlhttp.status == 200)

		{

	       alert ("Photo/Album Protectection updated ");

				  

		}

	}

}





/* Accept or decline phone request starts : By Rupal 28th Jan 2011 */



function ph_req(val,r_id,s_id)

{

	if(val=='A')

	{

		ans1 = confirm("Are you sure you want to accept this request?");

		if(ans1==true)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/change_phone_request_status.php?val="+val+"&r_id="+r_id+"&s_id="+s_id;

				  

					  xmlhttp.onreadystatechange=phone_request_status;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

		}

	}

	else if(val=='D')

	{

		ans1 = confirm("Are you sure you want to decline this request?");

		if(ans1==true)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/change_phone_request_status.php?val="+val+"&r_id="+r_id+"&s_id="+s_id;

				  

					  xmlhttp.onreadystatechange=phone_request_status;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

		}

	}

}



function phone_request_status()

			{

				if (xmlhttp.readyState==4)

				{

					if(xmlhttp.status == 200)

						{

						   a = xmlhttp.responseText;
						   

						    var tempstr=a.split('^');

							var smsstr=tempstr[0];

							if(smsstr!='')

				{ gosms2 (smsstr); }

							document.getElementById("req_stat").innerHTML=tempstr[1];

						}

				}

				 

			}

			

function callToAcceptedPhoneRequestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-phone-requests-accepted.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_accepted_phone_request;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_accepted_phone_request()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

function callToDeclinedPhoneRequestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-phone-requests-declined.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_declined_phone_request;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_declined_phone_request()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

				

				function callToPendingPhoneRequestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-phone-requests-pending.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_pending_phone_request;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_pending_phone_request()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

			

/* Accept or decline phone request ends */



/* Accept or decline photo request starts : By Rupal 28th Jan 2011 */



function photo_req(val,r_id,s_id)

{ 

	if(val=='A')

	{

		ans1 = confirm("Are you sure you want to accept this request?");

		if(ans1==true)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/change_photo_request_status.php?val="+val+"&r_id="+r_id+"&s_id="+s_id;

				  

					  xmlhttp.onreadystatechange=photo_request_status;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

		}

	}

	else if(val=='D')

	{

		ans1 = confirm("Are you sure you want to decline this request?");

		if(ans1==true)

		{

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/change_photo_request_status.php?val="+val+"&r_id="+r_id+"&s_id="+s_id;

				  

					  xmlhttp.onreadystatechange=photo_request_status;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

		}

	}

}



function photo_request_status()

			{

				if (xmlhttp.readyState==4)

				{

					if(xmlhttp.status == 200)

						{

						    a = xmlhttp.responseText;

							var tempstr=a.split('^');

							var smsstr=tempstr[0];

							document.getElementById("req_stat").innerHTML=tempstr[1];				

							if(smsstr!='')

				{ gosms2 (smsstr); }

						}

				}

				 

			}

			

function callToAcceptedPhotoRequestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-photo-requests-accepted.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_accepted_photo_request;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_accepted_photo_request()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

function callToDeclinedPhotoRequestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-photo-requests-declined.php";

				      url=url+"?page="+page;						

					  xmlhttp.onreadystatechange=stateChanged_declined_photo_request;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_declined_photo_request()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

				

				

				function callToPendingPhotoRequestBlock(page)

		{

			

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			      var url="ajax_php_files/my-photo-requests-pending.php";

				      url=url+"?page="+page;	

					  //url=url+"&nextval="+nextval;

					  //alert (url);

					  xmlhttp.onreadystatechange=stateChanged_pending_photo_request;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_pending_photo_request()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							  document.getElementById('midal_modify_profile_information_bg').innerHTML=a;

							  document.getElementById("midal_modify_profile_information_bg").scrollIntoView();

							}

					}

				}

			

/* Accept or decline photo request ends */





/* 30-jan-2011 By Vikrant */



  function getsearchname(pageno)

   {

	   var searchfor=document.getElementById("searchfor").value;

	   searchFilter_name (pageno,searchfor);

   }

   

  function searchFilter_name(pageno,search_query)

		{	

			xmlhttp=GetXmlHttpObject();

			if (xmlhttp==null)

	     	  {

		    	  alert ("Browser does not support HTTP Request");

				  return;

			  }

			          var url="ajax_php_files/search_result_filter_name.php";				

					  url=url+"?serachquery="+search_query;

					  url=url+"&pgno="+pageno;

			

					  xmlhttp.onreadystatechange=stateChanged_s_filter_name;

					  xmlhttp.open("GET",url,true);

					  xmlhttp.send(null);

				}

							

			function stateChanged_s_filter_name()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							   document.getElementById('filter_data').innerHTML=a;							  

							}

					}

					else

					{ document.getElementById('filter_data').innerHTML="<img src='images/loading.gif' />"; }

				}

				

				

				

/* Function for delete account 5-feb-2011 by Vikrant Ghan */



function delete_account()

  {

	  ans = confirm("Do you want to delete your account ?");

	  if(ans == true)

	   { delete_acc(); } 

	  else 

	   { return false; }

	  

  }

  

function del_content(content)

 { document.getElementById("del_reason").value=content;   }

 

function delete_acc()

  { 

      var reason=document.getElementById("del_reason").value;

	  

		xmlhttp=GetXmlHttpObject(reason);

		if (xmlhttp==null)

		  {

			  alert ("Browser does not support HTTP Request");

			  return;

		  }

				  var url="ajax_php_files/delete_account.php";	 

				  url=url+"?reason="+reason;

				  xmlhttp.onreadystatechange=stateChanged_delete_acc;

				  xmlhttp.open("GET",url,true);

				  xmlhttp.send(null);

			}

							

			function stateChanged_delete_acc()

				{

					if (xmlhttp.readyState==4)

					{

						if(xmlhttp.status == 200)

							{

							   a = xmlhttp.responseText;

							    

							   window.location='index.php';							  

							}

					}

					else

					{ document.getElementById('filter_data').innerHTML="<img src='images/loading.gif' />"; }

				}

  

/* Function for delete account 5-feb-2011 by Vikrant Ghan */
