
// JavaScript Document
//var xmlHttp;
var dispdivid;
var getdivid;
//alert("jj");
//alert("dsfdsf");
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;
}

function browser_support() {
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) 
	{ 
	alert ("Your browser does not support XMLHTTP!"); 
	return; } 
}




function delsub(idval,subval)
{

	browser_support();
	var url= "subcat_delete.php";
	url=url+"?subdeleteval="+subval+"&subdelval="+idval+"&eid="+Math.random();
	//alert(xmlHttp.onreadystatechange);
xmlHttp.onreadystatechange=deldiv;
xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
}
	
	function deldiv()
{
	document.getElementById(xmlHttp.responseText).style.display="none";
	
}

function logval(emailid,pwd)
{
browser_support();
//alert("jj");
var email=document.getElementById(emailid).value;
var password=document.getElementById(pwd).value;
var url="loginprocess.php";
url=url+"?emailid="+email+"&pwd="+password+"&eid="+Math.random();
//alert(url);
xmlHttp.onreadystatechange=formact;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
//alert("hh");
}

function formact()
{
	
//alert(xmlHttp.readyState);
var resl=xmlHttp.readyState;
  	if(resl==4)
	{
		
		//alert("jj");
		//alert(xmlHttp.responseText);
	 var value=xmlHttp.responseText;
    if (value=="INVALID")
	{
		//alert("invalid password");
		document.getElementById('signinid').style.display="block";
		document.getElementById('inlog').style.display="block";
		
	}
	else if (value=="welcome")
	{
		//alert(value);
		window.location.replace("mypersonal_profile.php");
	}


	}
	
	
}

function status(val)
{

	browser_support();
	var url= "inbox_msg.template.php";
	url=url+"?pass="+val+"&eid="+Math.random();

xmlHttp.onreadystatechange;
xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
		
}



function catcomp(mcid)
{
browser_support();
//alert("jj");
var cat=document.getElementById('mcid').value;

var url="comp1.php";
url=url+"?mcid="+cat+"&eid="+Math.random();
//alert(url);
xmlHttp.onreadystatechange=showcomp;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
//alert("hh");
}

function showcomp(){
	
	if (xmlHttp.readyState==4)
	{	
	
	//alert(xmlHttp.responseText);
//document.getElementById('hh').style.display='none';
//document.getElementById('hh').style.display='block';
document.getElementById('hh').innerHTML=xmlHttp.responseText;			
	

	}
	}




function showemail(str1,idVal)
{
	//alert("dd");
	
	str=document.getElementById(str1).value;
	
		browser_support();
		//alert("fff");
		
	var url="available.php";
	url=url+"?emailverificationid="+str+"&idVal="+idVal;
	url=url+"&eid="+Math.random();
	if(idVal=='emailid')
	{
		xmlHttp.onreadystatechange=emailChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
}

function friendsRequest1(sId,fId)
{
	
//alert("ghsdf");
browser_support();
//alert("gfsdhk");
	//alert(sId);
//alert(fId);
var url="apply_request.php";

url=url+"?sId="+sId+"&fId="+fId+"&eid="+Math.random();
//alert(url);
//document.getElementById('img').style.display='block';
xmlHttp.onreadystatechange=friendsRequest2;
xmlHttp.open("GET",url,true);
xmlHttp.send(null)

}

function friendsRequest2(){
	if (xmlHttp.readyState==4)
	{
document.getElementById('lightdiv1').innerHTML="<center><strong>Request sent</strong></center>";

	}
	}
	function defaultSearch1(searchmode)
{
	browser_support();
	var url="searchresult.php";
	url=url+"?mode="+searchmode+"&eid="+Math.random();

	xmlHttp.onreadystatechange=search2
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function ajaxTest()
{

browser_support();
var url="ajaxtest1.php";
	

	xmlHttp.onreadystatechange=ajaxTest2;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function ajaxTest2(){
	
	if (xmlHttp.readyState==4)
	{	
	
	//alert(xmlHttp.responseText);
//document.getElementById('hh').style.display='none';
document.getElementById('hh').style.display='block';
document.getElementById('hh').innerHTML=xmlHttp.responseText;			
	

	}
	}
function  search1(pho,ageFrom,ageTo,coun,phy,com,type,heightFrom,heightTo,searchmode,state,city)
{
	browser_support();

	var url="searchresult.php";
	url=url+"?mode="+searchmode+"&idn=aaa&pho="+pho+"&hF="+heightFrom+"&hT="+heightTo+"&agefrom="+ageFrom+"&ageto="+ageTo+"&coun="+coun+"&state="+state+"&city="+city+"&phy="+phy+"&comp="+com+"&type="+type+"&eid="+Math.random();

	xmlHttp.onreadystatechange=search2;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function search2(){
	
	if (xmlHttp.readyState==4)
	{	
	
	//alert(xmlHttp.responseText);
   document.getElementById('hh').style.display='none';

	document.getElementById('search_results').style.display='block';

	document.getElementById('search_results').innerHTML=xmlHttp.responseText;			
 

	}
	}
function emailChanged() 
{ 


	if (xmlHttp.readyState==4)
	{  
	
		var msg=xmlHttp.responseText;
			
			
			if(msg=="*Available")
			{  //alert(msg);
				document.getElementById('er_emaild').style.color='green';	
				document.getElementById('div_emaild').style.display='block';
				document.getElementById('er_emaild').innerHTML='<b>'+'<img src="images/newimages/available.png" align="absmiddle">'+"  Available";
				document.getElementById('emailtextfield').value="Available";
			}
			else
			{
				document.getElementById('er_emaild').style.color="#ff0000";
				document.getElementById('div_emaild').style.display='block';
				document.getElementById('er_emaild').innerHTML='<b>'+'<img src="images/newimages/not_available.png" align="absmiddle">'+"  Not Available";
				document.getElementById('emailtextfield').value="";
			}
	}
}
/* ---------------------------------------------------Subcategory Start----------------------------------------- */
function show_subcat(hid_div,idVal,textbox,checkbox,type,loopid)
{ 
	browser_support();
	//alert("gg");
	var url="sub_categorydisplay.php"; 
	url=url+"?subdiv_id="+hid_div+"&idVal="+idVal+"&textbox="+textbox+"&checkbox="+checkbox+"&type="+type+"&loopid="+loopid;
	url=url+"&eid="+Math.random();  
	//alert(url);
	xmlHttp.onreadystatechange=disdiv;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function showarea(value1,value2)
{
browser_support();
	var url="myarea_seeker.template.php"; 
		url=url+"?value1="+value1+"?value2=areaedit";
	url=url+"&eid="+Math.random();

	xmlHttp.onreadystatechange=showdisdiv;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function showdisdiv()
	{
	if (xmlHttp.readyState==4)
	{
		document.getElementById('hid').innerHTML=xmlHttp.responseText;			
		
		 }
}
function disdiv() 
{ 
	if (xmlHttp.readyState==4)
	{	
      	var fullvalue=xmlHttp.responseText;		
		var value=fullvalue.split('##');
		document.getElementById(value[0]).innerHTML=value[1];	
		
	}
}

function chance_subcat(idVal,type)
{ 

	browser_support();
	var url="sub_categorychance.php"; 
	url=url+"?idVal="+idVal+"&type="+type;
	url=url+"&eid="+Math.random();  
	xmlHttp.onreadystatechange=subcatdiv;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function subcatdiv() 
{ 
	if (xmlHttp.readyState==4)
	{	
//alert(xmlHttp.responseText);
		document.getElementById('expRolediv').innerHTML=xmlHttp.responseText;			
	}
}

function highlightMainTab(id)
{
	for(i=1;i<=5;i++)
	{
		if(id==i)
		{
			document.getElementById("mtab"+id).className='current';
		}
		else
		{
			document.getElementById("mtab"+i).className='';
		}
	}
}
function highlightTab(id)
{
	for(i=1;i<=14;i++)
	{
		if(id==i)
		{
			
			document.getElementById("tab"+id).className='selected';
		}
		else
		{
			document.getElementById("tab"+i).className='';
		}
	}
}



function highlightTab1(id)
{

	for(i=1;i<=5;i++)
	{
		if(id==i)
		{
			document.getElementById("tab"+id).className='selected';
		}
		else
		{
			document.getElementById("tab"+i).className='';
		}
	}
}


function highlightSubTab(id,sid)
{ 

	for(i=1;i<=10;i++)
	{
		if(id==i)
		{
			document.getElementById(sid+id).className='selected';
			
		}
		else
		{
			document.getElementById(sid+i).className='';
						
		}
	}
}
/* ---------------------------------------------------Subcategory End----------------------------------------- */



function show_sat(url,val)
{
	browser_support();
	var url=url;
	url=url+"?sucat="+val+"&sid="+Math.random();
	xmlHttp.onreadystatechange;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}







<!----------------------------------------------------PERSONAL INFO START---------------------------------------->
function add_info(url,uid,autoid,page)
{ 
		//alert(url);
		//alert(uid);
		//alert(autoid);
		//alert(page);
	browser_support();
	var url=url;
//	if(uid!='cineType'){
	//url=url+"?uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();
	//alert(url);
	//}
	

	
	if((uid=='physical') || (uid=='Editphysical')){
	url=url+"?uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();	
	//alert(url);
	xmlHttp.onreadystatechange = Physical;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	
	
	else if((uid=='personal') || (uid=='personalEdit'))
	{
	url=url+"?uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();
	xmlHttp.onreadystatechange = personal;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	
	else if((uid=='contact') ||(uid=='contactEdit'))
	{
	url=url+"?uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();	
	//alert(url);
	xmlHttp.onreadystatechange = contactNew;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	
	else if(uid=='personaldes')
	{ 
	url=url+"?uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();	
	//alert(url);
	xmlHttp.onreadystatechange = personaldes;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	
	
	
}

function profile_tab1(url,uid,autoid,page)
{
	browser_support();
	var url=url;
	if(autoid=='profiletal')
	{
	url=url+"&uid="+uid+"&autoid="+autoid+"&idtal="+page+"&sid="+Math.random();
	xmlHttp.onreadystatechange=personaltabb;
	
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
		
		
		
	}
	
	
}

function profile_tab(url,uid,autoid,page)
{  
//alert(url);alert(uid);alert(page);

//alert(autoid);
	browser_support();
	var url=url;
	//alert(url);
	if(autoid=='profile'){
		if(page=='input_search_country')
		{
			
			var searchval=document.getElementById('input_search_country').value;
			if(searchval=='ex : anand,jai...')
			{
			searchval='';	
			}
		}
		url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
		

		xmlHttp.onreadystatechange = personaltabb;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	else if(autoid=='profilephoto'){
	url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange = profilephoto;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	else if(autoid=='profilerole'){
	url=url+"&uid="+uid+"&autoid="+autoid+"&idexp="+page+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange = personaltabb;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	else if(autoid=='profiletal'){
	url=url+"&uid="+uid+"&autoid="+autoid+"&idtal="+page+"&sid="+Math.random();
	
	xmlHttp.onreadystatechange=personaltabb;

	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	else if(autoid=='friend')
	{
	url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
	xmlHttp.onreadystatechange = personalfriend;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	
	else if(autoid=='perform')
	{
	url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();

	xmlHttp.onreadystatechange = performtab;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	else if(autoid=='performfriend')
	{
	//show('6');	
	url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
	xmlHttp.onreadystatechange = performfriend;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	else if(autoid=='photo')
	{
	url=url+"?uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange = personaltabp;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	else if(autoid=='pfmAlb')
	{
	url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
	xmlHttp.onreadystatechange = personaltabp;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	else if(autoid=='experience')
	{ 
	url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
//	alert(url);
	//show('1');
	document.getElementById('PerformPage').style.display="none";
	xmlHttp.onreadystatechange = profilecompany;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	
	else if(autoid=='experience1')
	{ 
	url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
	//alert(url);
	show('1');
	document.getElementById('PerformPage').style.display="none";
	xmlHttp.onreadystatechange = profilecompany;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	
	else if(autoid=='role')
	{
		url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
		//alert(url);
	//	show('1');
		document.getElementById('PerformPage').style.display="none";
		xmlHttp.onreadystatechange = profilecompany;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}	
	
	else if(autoid=='role2')
	{
		url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
		//alert(url);
	//	show('1');
		document.getElementById('PerformPage').style.display="block";
		xmlHttp.onreadystatechange = profilecompany;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	
	else if(autoid=='role1')
	{
		url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
		//alert(url);
		show('1');
		document.getElementById('PerformPage').style.display="none";
		xmlHttp.onreadystatechange = profilecompany;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	else if(autoid=='tal')
	{
	//	show('1');
		url=url+"&uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();
		document.getElementById('PerformPage').style.display="none";
		xmlHttp.onreadystatechange = profilecompany;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);

	}
	else
	{
	url=url+"?uid="+uid+"&autoid="+autoid+"&page1="+page+"&sid="+Math.random();	
	xmlHttp.onreadystatechange = profiletabb;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
}


function personaltabb()
{
	if(xmlHttp.readyState == 4)
	{  
		/*document.getElementById('display_profile').style.display="block";
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		document.getElementById('PerformPage').style.display="none";
		
		if(document.getElementById('sessionval').value=="")
		{
			document.getElementById('display_profile').style.display="none";
			window.location.reload();
		}*/
	}
	else
	{
		//alert("Else Condition");
document.getElementById('display_profile').innerHTML =  " <div style='width:200px; display:block;padding:100px 0px 100px 200px;float:left' > <img src='images/loading-icon.gif' width='40px' height='40px' alt='load' /></div>";
	}
}



function personal()
{
	if(xmlHttp.readyState == 4)
	{
		
		cancel_div('personaldiv1','personaldiv');	
		document.getElementById('preload2').style.display="block";
		document.getElementById('personaldiv').innerHTML = xmlHttp.responseText;
		DISStylenone('personaldesdiv|physicaldiv|contactdiv')
	DISStyle('personaldesdiv1|physicaldiv1|contactdiv1');
	document.getElementById('preload2').style.display="none";
	}
}

function Physical()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('physicaldiv1','physicaldiv');
		document.getElementById('preload3').style.display="block";
		document.getElementById('physicaldiv').innerHTML = xmlHttp.responseText; 
		DISStylenone('personaldesdiv|personaldiv|contactdiv');
		DISStyle('personaldesdiv1|personaldiv1|contactdiv1');
		document.getElementById('preload3').style.display="none";
	}
}

function personaldes()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('personaldesdiv1','personaldesdiv');
		document.getElementById('preload1').style.display="block";
		document.getElementById('personaldesdiv').innerHTML = xmlHttp.responseText;
		document.getElementById('preload1').style.display="none";
		DISStylenone('personaldiv|physicaldiv|contactdiv');
		DISStyle('personaldiv1|physicaldiv1|contactdiv1');
		$(document).ready (function() {	$('textarea.expanding').autogrow();});	
	}
}
function contactNew()
{
	if(xmlHttp.readyState == 4)
	{
		//alert(xmlHttp.responseText);
		cancel_div('contactdiv1','contactdiv');		
		document.getElementById('preload6').style.display="block";
		document.getElementById('contactdiv').innerHTML = xmlHttp.responseText;
		document.getElementById('preload6').style.display="none";
		val=document.getElementById('ddlCountry').value;
		getState(val,'contactinfo');
		DISStylenone('personaldesdiv|personaldiv|physicaldiv')
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1');	

	}
}
function cancel_div(id1,id2)
{	//alert(id1);alert(id2);
//alert("hi");
		document.getElementById(id1).style.display='none';
		document.getElementById(id2).style.display='block';
}
<!-----contact info functions starts here----->
//function for load state	
function getState(countryId,page) 
{ 
//alert("asdasd");
	var strURL="findState.php?country="+countryId+"&page="+page;
//alert(strURL);
	var req = GetXmlHttpObject();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {			
					//alert(req.responseText);
					document.getElementById('statediv').innerHTML=req.responseText;						
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	
	}		
}
//function for load state	
function getmState(countryId,page) 
{ 
/*
	var i;
 	var count = 0;
 	var count1=0;
 	field3=0;
         var selectedArray = new Array(); 
         var selObj=document.getElementById(countryId);
		  for (i=0;i<selObj.options.length;i++) 
		  {
		  	if (selObj.options[i].value) 
			{			
     				selectedArray[count] = selObj.options[i].value;
      				count++;
		    }	
				    	    
  		 }
	alert(selectedArray);*/
	var selObj=document.getElementById(countryId).value; 
	var strURL="findState.php?country="+selObj+"&page="+page;
	var req = browser_support();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {					
					document.getElementById('statediv1').innerHTML=req.responseText;						
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	}		
}
//function for load city
function getCity(country,state,searchtype)
{  
	var stateId = document.getElementById(state).value;  
	var countryId = document.getElementById(country).value;
	
	if(searchtype=='search')
	{
		var strURL="findCity.php?country="+countryId+"&state="+stateId+"&page="+searchtype;		
	}
	else
	{
	var strURL="findCity.php?country="+countryId+"&state="+stateId;	
	}
	//alert(strURL);
	
	var req = GetXmlHttpObject();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {	
					//alert(req.responseText);
					document.getElementById('citydiv').innerHTML=req.responseText;						
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	}		
}
<!-----contact info functions ends here----->
//function for load city
function getmCity(country,state)
{
	var stateId = document.getElementById(state).value;  
	var countryId = document.getElementById(country).value;
	var strURL="findCity.php?country="+countryId+"&state="+stateId+"&page=multi";
	var req = GetXmlHttpObject();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {					
					document.getElementById('citydiv1').innerHTML=req.responseText;						
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	}		
}
<!-----contact info functions ends here----->
function getsubcat(category) 
{ 
	browser_support();
	var category =category;
	var url="subcategory.php?category="+category;

	xmlHttp.onreadystatechange=getsubcat2;
	xmlHttp.open("GET",url,true);
	
	xmlHttp.send(null);
}

function getsubcatnew(cateid) 
{ 
	browser_support();
	var category =category;
	var url="subcategorynew.php?cateid="+cateid;

	xmlHttp.onreadystatechange=getsubcat2;
	xmlHttp.open("GET",url,true);
	
	xmlHttp.send(null);
}


function getsubcat2(){
	
	if (xmlHttp.readyState==4)
	{	
	//alert(xmlHttp.responseText);
   	//document.getElementById('hh').style.display='none';

	//document.getElementById('search_results').style.display='block';

	document.getElementById('ddlsubcat').innerHTML=xmlHttp.responseText;			
 

	}
	
		
}
function getPageSize(){
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}
	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}
<!----------------------------------------------------PERSONAL INFO END------------------------------------------>
function showstat(url,catname,fname,sessid,c)
{  

	browser_support();
	if(c=='apply')
	{
		url=url+"?catname="+catname+"&roleId="+fname;
		url=url+"&cid="+sessid+"&apply="+c+"&sid="+Math.random();
		//alert(url);
	}
	else if(c=='tal')
	{
		url=url+"?talId="+catname;
		url=url+"&cid="+sessid+"&apply="+c+"&sid="+Math.random();
	}
	else 
	{
		url=url+"?catname="+catname+"&roleId="+fname;
		url=url+"&cid="+sessid+"&msg="+c+"&sid="+Math.random();
		//alert(url);
	}

	xmlHttp.onreadystatechange=userstat;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function userstat() 
{ 
	if (xmlHttp.readyState==4) 
	{
	
		////document.getElementById("lightdiv").style.display="block";
		document.getElementById("lightdiv").innerHTML = xmlHttp.responseText;	
	}
}
function userstatnew() 
{ 
	if (xmlHttp.readyState==4) 
	{
	
		//document.getElementById("postid").innerHTML = xmlHttp.responseText;	
		window.location = "postedjob.php";

		
	}
}
function showstat1(url,catname,fname,sessid,c)
{  

	browser_support();
	if(c=='apply')
	{
		url=url+"?catname="+catname+"&roleId="+fname;
		url=url+"&cid="+sessid+"&apply="+c+"&sid="+Math.random();
		//alert(url);
	}
	else if(c=='tal')
	{
		url=url+"?talId="+catname;
		url=url+"&cid="+sessid+"&apply="+c+"&sid="+Math.random();
	}
	else 
	{
		url=url+"?catname="+catname+"&roleId="+fname;
		url=url+"&cid="+sessid+"&msg="+c+"&sid="+Math.random();
	}

	xmlHttp.onreadystatechange=userstat1;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function userstat1() 
{ 
	if (xmlHttp.readyState==4) 
	{
			
		document.getElementById("lightdiv").style.display="block";
		document.getElementById("lightdiv").innerHTML = xmlHttp.responseText;	
	}
}


function showstat2(url,catname,fname,sessid,c)
{  
	browser_support();
	if(c=='apply')
	{
		url=url+"?catname="+catname+"&roleId="+fname;
		url=url+"&cid="+sessid+"&apply="+c+"&sid="+Math.random();
		//alert(url);
	}
	else if(c=='tal')
	{
		url=url+"?talId="+catname;
		url=url+"&cid="+sessid+"&apply="+c+"&sid="+Math.random();
	}
	else 
	{
		url=url+"?catname="+catname+"&roleId="+fname;
		url=url+"&cid="+sessid+"&del="+c+"&sid="+Math.random();
		alert(url);
	}

	xmlHttp.onreadystatechange=userstatnew;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function userstat2() 
{ 
	if (xmlHttp.readyState==4) 
	{
		
		
			
		document.getElementById("lightdiv").style.display="block";
		document.getElementById("lightdiv").innerHTML = xmlHttp.responseText;	
	}
}
function getState1()
{
	var i;
 	var count = 0;
 	var count1=0;
 	field3=0;
         var selectedArray = new Array();
         var selObj=document.getElementById('ddlmCountrys');
		  for (i=0;i<selObj.options.length;i++) 
		  {
		  	if (selObj.options[i].value) 
			{			
     				selectedArray[count] = selObj.options[i].value;
      				count++;
		    }	
				    	    
  		 }
	//alert(selectedArray);
	var strURL="state_search.php?country="+selectedArray;
	//alert(strURL);
	var req = GetXmlHttpObject();

	if (req)
	 {
		req.onreadystatechange = function()
		 {
		//alert(req.responseText);
			if (req.readyState == 4)
			 {
				// only if "OK"
				if (req.status == 200)
				 {
					document.getElementById('statediv1').innerHTML=req.responseText;				
				 }
				 else
				 {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				 }
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}

function RefillState()
{ 
	var i;
 	var count = 0;
 	var count1=0;
 	field3=0;
         var selectedArray = new Array();
         var selObj=document.getElementById('ddlmCountrys');
		  for (i=0;i<selObj.options.length;i++) 
		  {
		  	if (selObj.options[i].value) 
			{			
     				selectedArray[count] = selObj.options[i].value;
      				count++;
		    }	
				    	    
  		 }
  		// alert(count);
         //alert(selectedArray);
	var strURL="state_search.php?country="+selectedArray;
	//alert(strURL);
	var req = GetXmlHttpObject();

	if (req)
	 {
		req.onreadystatechange = function()
		 {
		//alert(req.responseText);
			if (req.readyState == 4)
			 {
				// only if "OK"
				if (req.status == 200)
				 {
					document.getElementById('statediv1').innerHTML=req.responseText;				
				 }
				 else
				 {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				 }
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}
function getexp(url,states,passValue) {
	browser_support();
	url=url;
	if(states=='expupdate')
	{
		var ValueString=passValue;
		var val=new Array();
		for(i=0;i<ValueString.split("|").length;i++) {
		val[i]=document.getElementById(ValueString.split("|")[i].toString());
	}}

	if(states=='expupdate'){
		//alert("");
		var ptype="";
		var pexp="";
		if(val[0].checked==true){ exptype="Y"; }
		else if(val[1].checked==true){ exptype="N";}
		url=url+"?exptype="+exptype+"&createtype=expcreatetype"+"&sid="+Math.random();
		//alert(url);
		xmlHttp.onreadystatechange=getexpvalue;
		xmlHttp.open("GET",url,true); xmlHttp.send(null);
	}
}

function getexpvalue()
{if(xmlHttp.readyState == 4)
	{
		cancel_div('personaldiv1','personaldiv');
		var a=xmlHttp.responseText;
		sp = a.split("#",2);
		document.getElementById('ch1').innerHTML=sp[0];
		//window.location.reload(true);
	}	
}






//function for load role in dropdown box	
function getexpRole(roleId,epage) 
{	



//alert(roleId);
	var strURL="findRole.php?roleId="+roleId+"&epage="+epage;
	//alert(strURL);
	var req = GetXmlHttpObject();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {
					//alert(req.responseText);
					if(epage=='cinemachance')
					{
					//alert(req.responseText);				
					document.getElementById('expRolediv').innerHTML=req.responseText;	
					}
					else if(epage=='cinemachance1')
					{
						document.getElementById('expRolediv1').innerHTML=req.responseText;		
					}
					else if(epage=='cinemachance2')
					{
						document.getElementById('expRolediv2').innerHTML=req.responseText;		
					}
					else if(epage=='cinemaExpe')
					{
						document.getElementById('expRolediv').innerHTML=req.responseText;		
					}
					else if(epage=='cinemaExpeSeek')
					{
						document.getElementById('expRolediv').innerHTML=req.responseText;		
					}
								
					else if(epage=='cinemaIntr')
					{
						document.getElementById('expRolediv').innerHTML=req.responseText;		
					}
					else if(epage=='cinemaIntrSeek')
					{
						document.getElementById('expRolediv').innerHTML=req.responseText;		
					}
				
					
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	}		
}
function getexpCate(roleId,epage) 
{
	var maincate=document.getElementById(roleId);
	var roleId=maincate.options[maincate.selectedIndex].text;
	var strURL="findRole.php?roleId="+roleId+"&epage="+epage; 
	var req = GetXmlHttpObject();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
					if (req.status == 200) {	
					document.getElementById('expcatediv').innerHTML=req.responseText;
					var maincate1=document.getElementById('ddlMain');
					var subval=maincate1.options[maincate1.selectedIndex].text;
					getexpType(subval,'cineType')
					} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	}		
}

//eND OF EXP INsert  role in dropdown box	

<!--mail display start-->
function getmail(url,id,id1,page) {
	
	browser_support();
	url=url+"?id="+id+"&id1="+id1+"&page="+page;
	url=url+"&sid="+Math.random();
//alert(url);
	xmlHttp.onreadystatechange=getemails;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }
	
function getemails(){ 
	if(xmlHttp.readyState==4) 
		{
		//alert(xmlHttp.responseText);
	document.getElementById('viewmail').innerHTML = xmlHttp.responseText;
	//alert("hi");
		} } 
<!--mail display end-->

/* ---------------------------------------------------------  member_list chance ------------------------------------*/
function chanceupdate(id,action,url){ 
//alert("hi");
//alert(id);

	browser_support();
	//document.getElementById("mem_" + id).style.background = "#d0eafc";  
	//document.getElementById("tbl_dash"+id).style.borderBottomColor="#FFFFFF";


	url=url+"?id="+id+"&action="+action+"&sid="+Math.random(); 

	xmlHttp.onreadystatechange=calldiff;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); 
}
function calldiff(){
	if(xmlHttp.readyState==4) {
	 var res = xmlHttp.responseText;
		if(xmlHttp.responseText!='-1'){
			//alert("mem_"+xmlHttp.responseText);
			
var max = parseInt("300");	
window.location = "profile.php";
if(document.getElementById("mem_"+xmlHttp.responseText).style.height=='auto')
{
var temp ='100px';
//var temp_td ='100px';
document.getElementById("mem_"+xmlHttp.responseText).style.height=temp;
//document.getElementById("tbl_dash"+xmlHttp.responseText).style.height=temp_td;
}
else
{
var temp =document.getElementById("mem_"+xmlHttp.responseText).style.height;
//var temp_td = document.getElementById("tbl_dash"+xmlHttp.responseText).style.height;
}

var height = parseInt(temp);
//var height_td = parseInt(temp_td);

if (height>0){
	var height =height-2;
	document.getElementById("mem_"+xmlHttp.responseText).style.height = height+'px';
	//document.getElementById("tbl_dash"+xmlHttp.responseText).style.height = height+'px';
	window.setTimeout("calldiff()", 1);
}
	}else{
		alert("Invalid Record");
		return false;
		}
	}
}
/*************************************************************************/
function loadTabContent(id)
{
	for(i=1;i<=3;i++)
	{
		if(i==id)
		{
			document.getElementById("tabContent"+id).style.display="";
		}
		else
		{
			document.getElementById("tabContent"+i).style.display="none";
		}
	}
}

/***************for chenge password***************************/
function update(url,NewPass,OldPass,updateconp)
{
	
	browser_support();  //ordegtype|degtype|ordegothtype|qulother|col|sch|edu1
	var url=url;
	
	var NewPass=document.getElementById('NewPass').value;

	var OldPass=document.getElementById('OldPass').value;
	var url=url+"?NewPass="+NewPass+"&OldPass="+OldPass+"&passup="+updateconp+"&sid="+Math.random(); 
	
	xmlHttp.onreadystatechange = respassup;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	
}
function respassup()
{
	if(xmlHttp.readyState == 4){
		
		var res = xmlHttp.responseText;

		if(res=='Password is Updated'){
			document.getElementById('errorDiv').style.color = 'green';
		}else{
			document.getElementById('errorDiv').style.color = 'red';
		}
			document.getElementById('errorDiv').innerHTML = res;
		
	}	
}


<!--This is for Update and delete in Experience starts here-->

<!---->
function chkwork(idval,ddl1,ddl2)
{
	if(document.getElementById(idval).checked==true)
	{ 
		document.getElementById(ddl1).selectedIndex=0;
		document.getElementById(ddl2).selectedIndex=0;
	}
}
<!---->


function formget(f, url, gdid, ddid) {
	dispdivid=ddid;
	getdivid = gdid;;

	var poststr = getFormValues(f);
	




	postData(url, poststr);

}

function postData(url, parameters){

	var loadingmessage = 'Processing...';
	
	browser_support();
	
	xmlHttp.onreadystatechange =  function(){
		//alert(xmlHttp.responseText);
		if(xmlHttp.readyState > 0 && xmlHttp.readyState < 4){
		//alert(xmlHttp.responseText);
			document.getElementById('loading').style.visibility = 'visible';
			document.getElementById('loading').innerHTML="<img src='images/ajax-loader.gif'/>";
		}
		if (xmlHttp.readyState == 4) {
			//alert(xmlHttp.responseText);
			document.getElementById(dispdivid).innerHTML=xmlHttp.responseText;
			if(dispdivid.substr(0,17)=='txteditFilmtitles')
			{
				document.getElementById(dispdivid+'d').innerHTML=xmlHttp.responseText;
				document.getElementById(dispdivid+'o').innerHTML=xmlHttp.responseText;
			}
			if(dispdivid.substr(0,10)=='ExpeDetail')
			{
				var dstr=xmlHttp.responseText;
				if(dstr.length<=150)
				{
					document.getElementById(dispdivid+'c').innerHTML=dstr;
				}
				else if(dstr.length>=150)
				{alert(dispdivid+'c');
					document.getElementById(dispdivid+'c').innerHTML=dstr.substr(0,150)+'...'+'<a style="cursor:pointer; color:#61C7E4;"  ><strong>view</strong></a>';
				}
			}
			document.getElementById('loading').innerHTML="Updated...";
			setTimeout("HideOpendiv('loading')",5000);
		}
	}
	parameters=parameters+"&getdivid="+getdivid;
	//alert(parameters);
	//alert(url);
	xmlHttp.open("POST", url, true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", parameters.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(parameters);
}

function getFormValues(fobj)

{
var str = "";
var valueArr = null;
var val = "";
var cmd = "";

	for(var i = 0;i < fobj.elements.length;i++)
	
	{

		switch(fobj.elements[i].type)
		{
		
			case "text":
			
			str += fobj.elements[i].name +
			"=" + escape(fobj.elements[i].value) + "&";
			break;
			
			case "hidden":
			
			str += fobj.elements[i].name +
			"=" + escape(fobj.elements[i].value) + "&";
			break;
			
			case "textarea":
			
			str += fobj.elements[i].name +
			"=" + escape(fobj.elements[i].value) + "&";
			break;
			
			case "select-one":
			
			str += fobj.elements[i].name +
			"=" + fobj.elements[i].options[fobj.elements[i].selectedIndex].value + "&";
			break;
			
			case "checkbox":
			
			str += fobj.elements[i].name +
			"=" + escape(fobj.elements[i].value) + "&";
			break;
		}
	}
	
	str = str.substr(0,(str.length - 1));
	return str;

}	

function HideOpendiv(hdivid)
{
	var hdivid=hdivid;
		document.getElementById(hdivid).style.visibility = 'hidden';
}
<!--This is for Update and delete in Experience Ends here-->



<!--This is for Update and delete in Talent starts here-->



function formgettal(f, url, gdid, ddid) {

	dispdivid=ddid;
	getdivid = gdid;;
	
	var poststr = getFormValuestal(f);
	postDatatal(url, poststr);

}

function postDatatal(url, parameters){
	
	
	var loadingmessage = 'Processing...';
	
	browser_support();
	
		
	xmlHttp.onreadystatechange =  function(){
	
		if(xmlHttp.readyState > 0 && xmlHttp.readyState < 4){
		
			document.getElementById('loading').style.visibility = 'visible';
			document.getElementById('loading').innerHTML="<img src='images/ajax-loader.gif'/>";
		}
		if (xmlHttp.readyState == 4) {			
			
			if(dispdivid.substr(0,12)=='Talentsubcat')
			{
		
				document.getElementById(dispdivid).innerHTML=xmlHttp.responseText;
				//document.getElementById(dispdivid+'d').innerHTML=xmlHttp.responseText;
				//document.getElementById(dispdivid+'o').innerHTML=xmlHttp.responseText;
			}
			
			if(dispdivid.substr(0,9)=='TalDetail')
			{
			
				var dstr=xmlHttp.responseText;
			
				if(dstr.length<=150)
				{
				
					//document.getElementById(dispdivid+'d').innerHTML=dstr;
					document.getElementById(dispdivid+'c').innerHTML=dstr;
					
				}
				else if(dstr.length>=150)
				{
					document.getElementById(dispdivid+'c').innerHTML=dstr.substr(0,150)+'...'+'<a style="cursor:pointer; color:#61C7E4;"  ><strong>view</strong></a>';
				}
			}
		
			//document.getElementById(dispdivid).innerHTML=xmlHttp.responseText;
			document.getElementById('loading').innerHTML="Updated...";
			setTimeout("HideOpendivtal('loading')",5000);
		}
	}
	parameters=parameters+"&getdivid="+getdivid;
	//alert(parameters);
	xmlHttp.open("POST", url, true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", parameters.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(parameters);
}

function getFormValuestal(fobj)

{
var str = "";
var valueArr = null;
var val = "";
var cmd = "";

	for(var i = 0;i < fobj.elements.length;i++)
	
	{

		switch(fobj.elements[i].type)
		{
		
			case "text":
			
			str += fobj.elements[i].name +
			"=" + escape(fobj.elements[i].value) + "&";
			break;
			
			case "hidden":
			
			str += fobj.elements[i].name +
			"=" + escape(fobj.elements[i].value) + "&";
			break;
			
			case "textarea":
			
			str += fobj.elements[i].name +
			"=" + escape(fobj.elements[i].value) + "&";
			break;
			
			case "select-one":
			
			str += fobj.elements[i].name +
			"=" + fobj.elements[i].options[fobj.elements[i].selectedIndex].value + "&";
			break;
			
			case "checkbox":
			
			str += fobj.elements[i].name +
			"=" + escape(fobj.elements[i].value) + "&";
			break;
		}
	}
	
	str = str.substr(0,(str.length - 1));
	return str;

}	

function HideOpendivtal(hdivid)
{
	var hdivid=hdivid;
		document.getElementById(hdivid).style.visibility = 'hidden';
}
<!--This is for Update and delete in Talent Ends here-->




<!--this is photo page start-->

function test1(id,count,mValue,album,status,idss,ses,pageid,fid)
{
if((document.getElementById('incrementValue'+id).value=="")&&(status=='next'))
{
	var incrementValue= 0;
	photo_prev('photo_pagi.php',count,incrementValue,album,status,idss,ses,pageid,fid);

}
else if((document.getElementById('incrementValue'+id).value!="")&&(status=='next'))
	{ 
		
var incrementValue= parseInt(document.getElementById('incrementValue'+id).value);

if(parseInt(count-1)!=incrementValue)
		{
 photo_prev('photo_pagi.php',count,incrementValue,album,status,idss,ses,pageid,fid);

		}
	}
else if((document.getElementById('incrementValue'+id).value=="")&&(status=='prev'))
	{ 
var incrementValue= 0;
if((incrementValue!='0')||(incrementValue!=''))
		{
 photo_prev('photo_pagi.php',count,incrementValue,album,status,ids,ses,pageid,fid);
		}
	}
else if((document.getElementById('incrementValue'+id).value!="")&&(status=='prev'))
	{

var incrementValue= parseInt(document.getElementById('incrementValue'+id).value);
if((incrementValue!='0')||(incrementValue!=''))
		{
		
 photo_prev('photo_pagi.php',count,incrementValue,album,status,idss,ses,pageid,fid);

		}
	}


}

function photo_prev(url,cntVal,phtId,albId,action,ids,ses,pageid,fid)
{
	browser_support();
	if(ses){
	url=url+"?cntVal="+cntVal+"&phtId="+phtId+"&albId="+albId+"&action="+action+"&ids="+ids+"&fid="+fid+"&sid="+Math.random(9999); 
	
	}
	if(!ses)
	{url=url+"?cntVal="+cntVal+"&phtId="+phtId+"&albId="+albId+"&action="+action+"&ids="+ids+"&fid="+fid+"&pageid="+pageid+"&sid="+Math.random(9999); }
	
//alert(url);
	xmlHttp.onreadystatechange=photoNext;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}


function photoNext()
{
	if (xmlHttp.readyState==4)
	{

		//alert(xmlHttp.responseText);
		var fullvalue=xmlHttp.responseText;
		var value=fullvalue.split('##');
		document.getElementById('image1'+value[3]).innerHTML=value[2];
		document.getElementById('numphoto'+value[3]).innerHTML=value[4];
		document.getElementById('incrementValue'+value[3]).value=value[1];
	}
}

function indAlbumPagi(increId)
{ 
	document.getElementById('curPhotoHd').value=document.getElementById(increId).value;
}

function cinema_ajaxPhoto(URL,albumID,autoid) {	 
	browser_support();
	var url=URL;
	url=url+"&userverificationid="+1;
	url=url+"&autoid="+autoid+"&albumID="+albumID+"&sid="+Math.random();
	
	//alert(url);
	
	xmlHttp.onreadystatechange=AjaxContentPhoto;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }

function AjaxContentPhoto() {	
	if (xmlHttp.readyState==4) {
			
			//alert(xmlHttp.responseText);
			
			var title = xmlHttp.responseText;
			document.getElementById('paginate_response').innerHTML=title;
			document.getElementById('val').className ='cinema_ex_small_img';
			document.getElementById('aval').className ='ciroundimage ciroundimage_WHITE ciroundimage_large';
			document.getElementById('val1').className ='ciroundimage_image'; 
			document.getElementById('rval').className ='ciroundimage_CornersSprite';
			
	} }


<!--this is photo page end-->


function displaysubcat(subval,mainval,typeval)
{
	
	browser_support();
	var mainval=document.getElementById(mainval).value;
	var val=document.getElementById(subval).value;
	var types=document.getElementById(typeval).value;
	//alert(mainval);
	//alert(val);
	//alert(types);
	var url= "subcat_insert.php";
	url=url+"?type_user="+types+"&mainval="+mainval+"&subval="+val+"&eid="+Math.random();
	
xmlHttp.readystatechange;//=change;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
//alert(url);
	
}

function change()
{

if(xmlHttp.readyState == 4)
{
	window.location=self.location;
}
	
}


<!-- for perform -->
function perform_tab(url,activityidHd,txtareaCmt,toprofile,caction)
{   
	browser_support();
	//for share btn]
	//alert(caction);


	if(caction=='sharefriend')
	{
		//alert(activityidHd1);
		var activityidHd=document.getElementById(activityidHd).value; 
		var txtareaCmt=document.getElementById(txtareaCmt).value; 
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		//alert(url);
		xmlHttp.onreadystatechange = sharefriend;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}

	if(caction=='share')
	{
	// alert("kk");
		var activityidHd=document.getElementById(activityidHd).value; 
		//alert(activityidHd);
		var txtareaCmt=document.getElementById(txtareaCmt).value; 
		var toprofile1=document.getElementById(toprofile).value
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile1+"&caction="+caction;
		//alert(url);
		xmlHttp.onreadystatechange=display;//performComment200000;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	//initial activities
	if((caction=='remove')||(caction=='closeAct'))
	{
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		xmlHttp.onreadystatechange = performComment1;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	if((caction=='commentBtn')||(caction=='msgcommentBtn'))
	{
		
		
		activityidHd=document.getElementById(activityidHd).value; //alert(activityidHd);
		txtareaCmt=document.getElementById(txtareaCmt).value; 	//alert(txtareaCmt);
		var url=url+"?activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction+"&sid="+Math.random();

		xmlHttp.onreadystatechange=performComment1;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	if((caction=='I')||(caction=='U')||(caction=='R'))
	{

		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		xmlHttp.onreadystatechange=performComment1;

		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	if((caction=='oldcommentBtn') ||(caction=='msgoldcommentBtn'))
	{
		activityidHd=document.getElementById(activityidHd).value;
		txtareaCmt=document.getElementById(txtareaCmt).value;
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		xmlHttp.onreadystatechange = performComment2;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	if((caction=='oldremove')||(caction=='oldcloseAct'))
	{
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		xmlHttp.onreadystatechange = performComment2;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	if((caction=='IO')||(caction=='UO')||(caction=='RO'))
	{
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		xmlHttp.onreadystatechange = performComment2;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	//show second olderposts
	if((caction=='seccommentBtn') ||(caction=='msgseccommentBtn'))
	{	
		activityidHd=document.getElementById(activityidHd).value;
		txtareaCmt=document.getElementById(txtareaCmt).value;
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		xmlHttp.onreadystatechange = performComment3;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	if((caction=='secremove')||(caction=='seccloseAct'))
	{
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		xmlHttp.onreadystatechange = performComment3;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	if((caction=='IS')||(caction=='US')||(caction=='RS'))
	{
		var url=url+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		xmlHttp.onreadystatechange = performComment3;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
}



	
function performComment200000()
{	

if(xmlHttp.readyState == 4)	{
	var LoginId=document.getElementById('toprofile').value;
	url="perform1.php?toprofile="+LoginId+"&autoid=perform&page1=4&sid="+Math.random();
	xmlHttp.onreadystatechange = performtabSliding;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
}


function performtabSliding()
{
	if(xmlHttp.readyState == 4)
	{
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		//alert(document.getElementById('display_profile').innerHTML);
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
		document.getElementById('PerformPage').style.display="block";
		document.getElementById('expandValue').value=document.getElementById("perf0").offsetHeight;
		expand();
	}
	

}
function performComment1()
{	
if(xmlHttp.readyState == 4)	{ 
  
	var LoginId=document.getElementById('toprofile').value;
	url="perform2.php?toprofile="+LoginId+"&autoid=perform&page1=4&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange= performtab;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	} }	

function display()
{
	if(xmlHttp.readyState == 4)
	{

			var toprofile1=document.getElementById('fid').value;
	
		
	url="perform2.php";
	//alert(url);

	url=url+"?fid="+toprofile1+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange=sample;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);	
	}
	
}


function sample()
{
	if(xmlHttp.readyState == 4)
	{
//alert("hxczxh");
//alert(xmlHttp.responseText);
document.getElementById('display_profile').innerHTML=xmlHttp.responseText;
	}

}
function performtab()
{
	if(xmlHttp.readyState == 4)
	{
	
	   	document.getElementById('display_profile').style.display="block";
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		document.getElementById('PerformPage').style.display="block";
	    if(document.getElementById('sessionval').value=="")
		{
			document.getElementById('display_profile').style.display="none";
			window.location.reload();
		}
	}
	else
	{
		document.getElementById('display_profile').innerHTML =  " <div style='width:200px; display:block;padding:100px 0px 100px 200px;float:left' > <img src='images/loading-icon.gif' width='40px' height='40px' alt='load' /></div>";
	}	
}

	
	
<!-- perform ends-->

function  chance_search1(searchmode,gen,area,country,state,city,cat,subcat)
{
	browser_support();

	var url="chance_search.php";
	url=url+"?searchmode="+searchmode+"&gen="+gen+"&area="+area+"&country="+country+"&state="+state+"&city="+city+"&cat="+cat+"&subcat="+subcat+"&sid="+Math.random();

	xmlHttp.onreadystatechange=chance_search2;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function chance_search2(){
	
	if (xmlHttp.readyState==4)
	{	
	

   document.getElementById('hh').style.display='none';

	document.getElementById('search_results').style.display='block';

	document.getElementById('search_results').innerHTML=xmlHttp.responseText;			
 

	}
	}








function job(a,val2)
{
browser_support();


	var url="jobs.php";
	url=url+"?a="+a+"&val2="+val2+"&sid="+Math.random();

	xmlHttp.onreadystatechange=jobupdate;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);

}
function jobupdate(){
	
	if (xmlHttp.readyState==4)
	{
	  	document.getElementById('fragment-12').innerHTML=xmlHttp.responseText;			
 
	}
}



function initbox() 
{ 
	
	
		document.getElementById("lightdiv9").innerHTML = "please register ";
		document.getElementById("lightdiv9").style.display="block";
		
	
}


function subcatmembers(sub,id,disp)
{

browser_support();


var query=document.getElementById(id).value;


var url="mem.php";
url=url+"?sub="+sub+"&query="+query+"&disp="+disp+"&eid="+Math.random();

xmlHttp.onreadystatechange=function(){return showmem(disp)}
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function showmem(disp){
	if (xmlHttp.readyState==4)
	{	
	//alert(disp);
//alert(result);
//document.getElementById(disp).style.display="none";			
//document.getElementById(result).style.display="block";			
	document.getElementById(disp).innerHTML=xmlHttp.responseText;			
	}
}
	
	
	
	function tdisp(id,disp)
{

browser_support();

var url="ddisp.php";
url=url+"?id="+id+"&eid="+Math.random();
//alert(url);
xmlHttp.onreadystatechange=function(){return dis(id,disp)}
xmlHttp.open("GET",url,true);
xmlHttp.send(null);

}
function dis(id,disp){
	if (xmlHttp.readyState==4)
	{	
			
	document.getElementById(disp).innerHTML=xmlHttp.responseText;			
	}
	}

	function more(id,full)
	{
		
		browser_support();
document.getElementById(id).style.display=none;
document.getElementById(full).style.display=block;
//var url="aboutcomp.php";
//url=url+"?id="+id+"&eid="+Math.random();
//alert(url);

xmlHttp.onreadystatechange;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
	}
	function moredisp()
	{
	if (xmlHttp.readyState==4)
	{	
	
	document.getElementById('abtme').innerHTML=xmlHttp.responseText;			
	}
	}


/*----------------- settings functions ----*/

function update(url,NewPass,OldPass,updateconp)
{
	
	browser_support();  
	var url=url;
	
	var NewPass=document.getElementById(NewPass).value;
	var OldPass=document.getElementById(OldPass).value;
	var url=url+"?NewPass="+NewPass+"&OldPass="+OldPass+"&passup="+updateconp+"&sid="+Math.random(); 
	//alert(url);
	xmlHttp.onreadystatechange = respassup;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function respassup()
{
	if(xmlHttp.readyState == 4){
		var res = xmlHttp.responseText;
		if(res=='Password is Updated'){
			document.getElementById('errorDiv').style.color = 'green';
		}else{
			document.getElementById('errorDiv').style.color = 'red';
		}
			document.getElementById('errorDiv').innerHTML = res;
		
	}	
}
/*----------------- send message functions ----*/
function msg(fid,sessionId,message,subject)
{	
	browser_support();
	alert(document.getElementById('senduid'));
	alert(document.getElementById('senduid').value);
	var subj=document.getElementById('subject').value;
	var msg=document.getElementById('message').value;


	var url="msg.php";
		var url=url+"?fid="+fid+"&sessionId="+sessionId+"&subj="+subj+"&msg="+msg+"&sid="+Math.random();
		alert(url);
	xmlHttp.onreadystatechange=sendmsg ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function msgnew(sessionId,message,subject)
{	
	browser_support();

	
	//alert(subject);
	
	var fid=document.getElementById('senduid').value;
	var subj=document.getElementById('subject').value;
	var msg=document.getElementById('message').value;
	alert(fid);
	//alert(subj);
	///alert(msg);
	var url="msg.php";
		var url=url+"?fid="+fid+"&sessionId="+sessionId+"&subj="+subj+"&msg="+msg+"&sid="+Math.random();
		//alert(url);
	xmlHttp.onreadystatechange=sendmsg ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function chan(fid,sessionId,message,subject)
{	
check();
if(document.chance.type[0].checked==true  || document.chance.type[1].checked ==true)
{

	browser_support();	
	var subj=document.getElementById('subject').value;
	var msg=document.getElementById('message').value;
		var type=document.getElementById('result').value;
	//alert(subj);
	///alert(msg);
	var url="chance.php";
		var url=url+"?fid="+fid+"&sessionId="+sessionId+"&subj="+subj+"&msg="+msg+"&type="+type+"&sid="+Math.random();
		//alert(url);
	xmlHttp.onreadystatechange=sendmsg ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
		
}
else
{
	return false;
}
}


function channew(sessionId,message,subject)
{	
check();

if(document.chance.type[0].checked==true  || document.chance.type[1].checked ==true)
{	var fid=document.getElementById('uid').value;

	browser_support();	
	var fid=document.getElementById('uid').value;
	var subj=document.getElementById('subject').value;
	var msg=document.getElementById('message').value;
		var type=document.getElementById('result').value;
	//alert(subj);
	///alert(msg);
	var url="chance.php";
		var url=url+"?fid="+fid+"&sessionId="+sessionId+"&subj="+subj+"&msg="+msg+"&type="+type+"&sid="+Math.random();
	
	xmlHttp.onreadystatechange=sendmsg ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
		
}
else
{
	return false;
}
}
function fnPhotoSlideShowPagination(page,albid,mode,albname,fid)
{
    browser_support();
	//alert("asd");
	//alert(albname);
	var url="album_slid_show.php";
	if(mode=="n")
	page=page+1;
	else
		page=page-1;
		
	
		//	url=url+"?page="+page+"&albid="+albid+"&albname="+albname+"&sid="+Math.random();
			
			if(fid!='')
	{
		url=url+"?page="+page+"&albid="+albid+"&albname="+albname+"&fid="+fid;
	}
	else
	{
	
			url=url+"?page="+page+"&albid="+albid+"&albname="+albname+"&sid="+Math.random();
	}
	
			
	xmlHttp.onreadystatechange=fnPhotoSlideShowPagination2;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function fnPhotoSlideShowPaginationnew(page,albid,mode,albname,fid)
{

    browser_support();
//	alert(albname);
	var url="album_slid_show.php";
	if(mode=="n")
	page=page+1;
	else
		page=page-1;
	if(fid!='')
	{
		url=url+"?page="+page+"&albid="+albid+"&albname="+albname+"&fid="+fid;
	}
	else
	{
	
			url=url+"?page="+page+"&albid="+albid+"&albname="+albname+"&sid="+Math.random();
	}
	
	
			
	xmlHttp.onreadystatechange=fnPhotoSlideShowPagination2;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function fnPhotoSlideShowPagination2(){
	
	if (xmlHttp.readyState==4)
	{	

	document.getElementById('default').style.display='none';
	document.getElementById('slide').style.display='block';
	document.getElementById('slide').innerHTML=xmlHttp.responseText;			
 	}
	}
	function sendmsg()
{
	
	if (xmlHttp.readyState==4)
	{	
	//alert(xmlHttp.responseText);
	//falert(document.getElementById('colorbox').style.display);
	document.getElementById('colorbox').style.display='none';

 	}
	}
	

	function getprofileImage(id)
{
	
	browser_support();
	var url= "getprofileimage.php";
	url=url+"?cinemaLoginId="+id;
		xmlHttp.onreadystatechange=setprofileImage;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
}
	
	function setprofileImage()
{
	if (xmlHttp.readyState==4)
	{	

	document.getElementById('profileimg1').innerHTML=xmlHttp.responseText;	
	document.getElementById('profileimg2').innerHTML=xmlHttp.responseText;		
	}
	
}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	function rpt(url,catname,fname,sessid,c)
{  

	browser_support();
	if(c=='apply')
	{
		url=url+"?catname="+catname+"&roleId="+fname;
		url=url+"&cid="+sessid+"&apply="+c+"&sid="+Math.random();
		//alert(url);
	}
	else if(c=='tal')
	{
		url=url+"?talId="+catname;
		url=url+"&cid="+sessid+"&apply="+c+"&sid="+Math.random();
	}
	else 
	{
		url=url+"?catname="+catname+"&roleId="+fname;
		url=url+"&cid="+sessid+"&msg="+c+"&sid="+Math.random();
		//alert(url);
	}

	xmlHttp.onreadystatechange=abuse;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function abuse() 
{ 
	if (xmlHttp.readyState==4) 
	{
		//alert(xmlHttp.responseText);
		//document.getElementById("lightdiv").style.display="block";
		document.getElementById("lightdiv1").innerHTML = xmlHttp.responseText;	
	}
}
function check()
{
if(document.chance.type[0].checked==false && document.chance.type[1].checked ==false)
{
document.getElementById("alert").style.display="block";
}
if(document.chance.type[0].checked==true )
{
var val=document.chance.type[0].value;
document.getElementById("result").value=val;
return true;

}
else
{
var val=document.chance.type[1].value;
document.getElementById("result").value=val;
return true;
}
return false;

}

