function getPageScroll(){
	var yScroll;
	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}
	arrayPageScroll = new Array('',yScroll) 
	return arrayPageScroll;
}
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;
}


function getXMLHTTP()
{	var xmlhttp=true;
    try { xmlhttp=new XMLHttpRequest(); }
	catch(e) { try { xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); }
	catch(e) { try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } 
	catch(e1){ xmlhttp=false; }
	} } return xmlhttp; }

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

function getXmlHttpRequestObject() {
   if (window.XMLHttpRequest) { return new XMLHttpRequest();
   } else if (window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); //IE
   } else {  alert("Your browser doesn't support the XmlHttpRequest object."); }
   } var receiveReq = getXmlHttpRequestObject();
/*----------------email Availability check----------------*/

function show(id)
{
if(id=='1'){ DISStylenone('talent|int|display_profile1|PerformPage'); DISStyle('exp')  }
if(id=='2'){ DISStylenone('talent|exp|display_profile1|PerformPage'); DISStyle('int')  }
if(id=='3'){ DISStylenone('int|exp|display_profile1|PerformPage'); DISStyle('talent')  }
if(id=='6'){  DISStylenone('talent|exp|int'); DISStyle('display_profile1|PerformPage')  }

} 

function getlisting(url,states,passValue) {
	
	browser_support();
	url=url;
	if(states=='home1'){
	url=url+"?sid="+Math.random(); 
	xmlHttp.onreadystatechange=getlist;
	xmlHttp.open("GET",url,true); xmlHttp.send(null);}
	
	   if((states=='home2')||(states=='home3'))
	   {
		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=='home3'){
	//alert("");
	var ptype="";
	var pexp="";
	if(val[0].checked==true){ ptype="P"; }
	else if(val[1].checked==true){ ptype="S";}
	else if(val[2].checked==true){ ptype="P,S";}
	if(val[5].checked==true){ pexp="Y";}
	else if(val[6].checked==true){ pexp="N";}
	url=url+"?ptype="+ptype+"&pexp="+pexp+"&type1="+val[3].value+"&indiname="+val[4].value+"&createtype=createtype"+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange=getvalue;
	xmlHttp.open("GET",url,true); xmlHttp.send(null);}
	
	if(states=='home2')
	{
		
	var type="";
	var typeval="";
	if(val[0].checked==true){ type="I";      typeval=val[1].value;  }
	else if(val[2].checked==true){ type="O"; typeval=val[3].value; }
	url=url+"?type1="+type+"&indiname="+typeval+"&sid="+Math.random();
	xmlHttp.onreadystatechange=getlist1;
	xmlHttp.open("GET",url,true); xmlHttp.send(null);	
	}
	}
	
function getlist(){ if(xmlHttp.readyState==4) {
		document.getElementById("mail").innerHTML = xmlHttp.responseText;	
		var objOverlay = document.getElementById('fade');
		var objLoadingImage = document.getElementById('alignmail');
		var arrayPageSize = getPageSize();
		var arrayPageScroll = getPageScroll();
		if (objLoadingImage) 
		{
		objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 115 - objLoadingImage.offsetHeight) / 2) + 'px');
		}
		objOverlay.style.height = (arrayPageSize[1] + 'px');
		document.getElementById("mail").style.display='';
	 	} 
		
}



function getlist1(){ if(xmlHttp.readyState==4){
		document.getElementById("div1").style.display="none";
		document.getElementById("div2").style.display="block";
		document.getElementById("div2").innerHTML = xmlHttp.responseText;	
	 	} 
}


function getvalue()
{
	if(xmlHttp.readyState==4){
		//alert(xmlHttp.responseText);
		window.location.href="myhomepage.php";
		
		}
	
}











function showemail(str,idVal)
{
browser_support();
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 emailChanged() 
{ 
if (xmlHttp.readyState==4)
{
var msg=xmlHttp.responseText;
if(msg=="*Available")
{
document.getElementById('er_emaild').style.color="green";	
document.getElementById('div_emaild').style.display='block';
document.getElementById('er_emaild').innerHTML='<b>'+"  Available";
document.getElementById('emailtextfield').value=xmlHttp.responseText;
}
else
{
document.getElementById('er_emaild').style.color="#ff0000";
document.getElementById('div_emaild').style.display='block';
document.getElementById('er_emaild').innerHTML='<b>'+"  Not Available";
document.getElementById('emailtextfield').value=xmlHttp.responseText;
}
}
}


function loginChk(url,uname,password){
	browser_support();
	url=url+"?username="+uname+"&userpassword="+password;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=userchk;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function userchk(){
	if (xmlHttp.readyState==4)
	{
		var ans = xmlHttp.responseText;
			document.getElementById('logindiv').innerHTML=ans;
	}
}
<!-----contact info functions starts here----->
//function for load state	
function getState(countryId,page) 
{
	var strURL="findState.php?country="+countryId+"&page="+page;
	//alert(strURL);
	var req = getXMLHTTP();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {					
					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 = getXMLHTTP();
	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 = getXMLHTTP();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {					
					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 = getXMLHTTP();
	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 for get role from db
function getRole(url,id,id1,page) {
	browser_support();
	id1=document.getElementById(id1).value;
	url=url+"?id="+id+"&id1="+id1+"&page="+page;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=getrole;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }
	
function getrole(){ if(xmlHttp.readyState==4) {
	document.getElementById('rolediv').innerHTML=xmlHttp.responseText; 	} }
	
	
	
	//function for get role from db
function getindustry(url,id,id1,page) {
	browser_support();
	id1=document.getElementById(id1).value;
	url=url+"?id="+id+"&id1="+id1+"&page="+page;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=getint;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }
	
function getint(){ if(xmlHttp.readyState==4) {
	document.getElementById('divint').innerHTML=xmlHttp.responseText; 	} }
	
function video_insert(url,update,identity) {
	browser_support();
	
	url=url+"?update="+update+"&identity="+identity;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=desupdate;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }
	
function desupdate(){ if(xmlHttp.readyState==4) {
    cancel_div('updateid','desvalue'); 
	DISStyle('editid');
	document.getElementById('desdetail').innerHTML=xmlHttp.responseText;
	
	} }

//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 = getXMLHTTP();
	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 = getXMLHTTP();
	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);
	}		
}


//function for load subcategory in div for interest form
function getintRole(intId,ipage) 
{
	var strURL="findInterest.php?intId="+intId+"&ipage="+ipage;
	var req = getXMLHTTP();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {
				document.getElementById('interestdiv').innerHTML='';
				document.getElementById('subCatFunc').innerHTML='';
					document.getElementById('interestdiv').innerHTML=req.responseText;						
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	}		
}
//Search tab

function getexpsubCate(roleId,epage) 
{
	var strURL="findRole.php?roleId="+roleId+"&epage="+epage;
	var req = getXMLHTTP();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {	
					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);
	}		
}


//Search tab
function searchresult(gender,main,cate,subcate,type,industry,country,state,actionval) 
{
	var gender=document.getElementById(gender).value;
	var ddlMain=document.getElementById(main).options[document.getElementById(main).selectedIndex].text;
	var cate=document.getElementById(cate).value;
	var subcat=document.getElementById(subcate).value;
	var type=document.getElementById(type).value;
	var country=document.getElementById(country).options[document.getElementById(country).selectedIndex].text;
	var state=document.getElementById(state).options[document.getElementById(state).selectedIndex].text;
	//search.php?act=srch&ddlGender=0&ddlMain=Select&ddlCate=0&ddlSub=0&ddlType=0&ddlIndus=0&ddlCountry=Select&ddlState=Select
	
	if(industry!=''){
		var industry=document.getElementById(industry).value;
		if((gender==0) && (ddlMain=='Select') && (cate==0) && (subcat==0) && (type==0) && (industry==0) && (country=='Select&') && (state=='Select')){
			var srch="";	
		} else {
			var srch=actionval;	
		}

		var strURL="search.php?act="+srch+"&ddlGender="+gender+"&ddlMain="+ddlMain+"&ddlCate="+cate+"&ddlSub="+subcat+"&ddlType="+type+"&ddlIndus="+industry+"&ddlCountry="+country+"&ddlState="+state; 
		
	} else {
		if((gender==0) && (ddlMain=='Select') && (cate==0) && (subcat==0) && (type==0) && (country=='Select&') && (state=='Select')){
			var srch="";	
		} else {
			var srch=actionval;	
		}

		var strURL="chance_result.php?act="+srch+"&ddlGender="+gender+"&ddlMain="+ddlMain+"&ddlCate="+cate+"&ddlSub="+subcat+"&ddlType="+type+"&ddlCountry="+country+"&ddlState="+state; 
	}
	var req = getXMLHTTP();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
					if (req.status == 200) {	//alert(req.responseText);
					document.getElementById('display_profile').innerHTML=req.responseText;
					} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	}		
}




function getsearchresult(url,valueString,searchcon,searchtype)
{		
	//alert(valueString);
	//alert(searchtype);
	
	browser_support();
	
		var SearchType=document.getElementById(searchtype).value;
	
	//alert(SearchType);
	
	var valsearch=new Array();
	
	var areachance=new Array();
	
	
	
	for(i=0; i<valueString.split("|").length; i++)
	{ 
	
		//alert('for');
		
			var s=0;
			areachance[i]="";
	    	 valsearch[i]=valueString.split("|")[i].toString();

	if((valsearch[i]=='area')||(valsearch[i]=='phys')||(valsearch[i]=='eye')||(valsearch[i]=='hair')||(valsearch[i]=='complex')||(valsearch[i]=='bodytype')||
																																			(valsearch[i]=='ethi')||(valsearch[i]=='experi'))
	{
		
		if(valsearch[i]=='area'){ var k=12; } else if(valsearch[i]=='phys') { k=3; } else if(valsearch[i]=='eye') { k=9; } else if(valsearch[i]=='hair') {  k=13; } else if(valsearch[i]=='complex') { k=5; } else if(valsearch[i]=='bodytype'){ k=30; } else if(valsearch[i]=='ethi') { k=12; } else if(valsearch[i]=='experi') { k=1 }
		
		for(j=0; j<=k; j++)
		{	
			//alert(valsearch[i]+[j]);
			
			if(document.getElementById(valsearch[i]+[j]).checked==true)
			{ 
				s++;
				//alert(valsearch[i]+[j]);	
				if(s==1)
				{			 
				 	areachance[i]="IN (";
				 }
					areachance[i]+="'";
				 areachance[i]+=document.getElementById(valsearch[i]+[j]).value;	
				 areachance[i]+="',";
				
				
				
			}
			
			
		}
		
		if(areachance[i]!='')
		{	
		areachance[i]+=")";
			
		areachance[i]=areachance[i].replace(",)"," )");	
		
		//alert(areachance[i]);
		
		
		
					
		}
		
			
		
	}
	
	else if(valsearch[i]=='Gender')
	{
		
		if(SearchType=='Chance Search')
		{
		
		
		if((document.getElementById('Gender0').checked==true)&&(document.getElementById('Gender1').checked==false)&&(document.getElementById('Gender2').checked==false))	
		{
			var Genderval="IN ('M','MF','MC','MFC')";
		}
		else if((document.getElementById('Gender1').checked==true)&&(document.getElementById('Gender0').checked==false)&&(document.getElementById('Gender2').checked==false))
		{
			var Genderval="IN ('F','MF','FC','MFC')";	
		}
		else if((document.getElementById('Gender2').checked==true)&&(document.getElementById('Gender0').checked==false)&&(document.getElementById('Gender1').checked==false))
		{
			var Genderval="IN ('C','MC','FC','MFC')";
		}
		else if((document.getElementById('Gender0').checked==true)&&(document.getElementById('Gender1').checked==true)&&(document.getElementById('Gender2').checked==false))
		{
			var Genderval="IN ('M','F','MF','FC','MC','MFC')";
		}
		else if((document.getElementById('Gender0').checked==true)&&(document.getElementById('Gender2').checked==true)&&(document.getElementById('Gender1').checked==false))
		{
			var Genderval="IN ('M','C','MF','MC','FC','MFC')";
		}
		else if((document.getElementById('Gender1').checked==true)&&(document.getElementById('Gender2').checked==true)&&(document.getElementById('Gender0').checked==false))
		{
			var Genderval="IN ('F','C','MF','FC','MC','MFC')";	
		}
		else if((document.getElementById('Gender0').checked==true)&&(document.getElementById('Gender1').checked==true)&&(document.getElementById('Gender2').checked==true))
		{
			var Genderval="IN ('M','F','C','MF','MC','FC','MFC')";		
		}
		else
		{
			var Genderval="";	
		}
		
		}
		else
		{
			
						for(r=0; r<=2; r++)
						{	
			
			
							if(document.getElementById(valsearch[i]+[r]).checked==true)
							{ 
								s++;
					
								if(s==1)
								{			 
				 					var Genderval="IN (";
								}
									Genderval+="'";
				 					Genderval+=document.getElementById(valsearch[i]+[r]).value;	
				 					Genderval+="',";
				
				
				
							}
							
			
			
						}
						
						//alert(Genderval);
						if(Genderval!='')
						{	
							Genderval+=")";
			
							Genderval=Genderval.replace(",)"," )");	
		
		//alert(areachance[i]);
		
								if(Genderval=='undefined)')
								{
									Genderval=Genderval.replace("undefined)","");	
								}
		
					
						}
		
					//alert(Genderval);
			
			
			
			
			
			
		}
	
	}
	else
	{
		 valsearch[i]=document.getElementById(valsearch[i]).value;
		 
		 	if((valsearch[i]=='Category')||(valsearch[i]=='Sub-category')||(valsearch[i]=='Type')||(valsearch[i]=='Select'))
			{
				valsearch[i]="";	
			}
		
	}
	
}
	
	
	
	
	//Hip
	
	if((valsearch[5]!='') && (valsearch[6]!=''))
	{
	var hip="BETWEEN '"+valsearch[5]+"' AND '"+valsearch[6]+"'";
	}
	else if(valsearch[5]!='' || valsearch[6]!='')
	{
		if(valsearch[5]!='')
		{
			var hip="IN ('"+valsearch[5]+"')";	
		}
		else
		{
			var hip="IN ('"+valsearch[6]+"')";	
		}
	}
	else if(valsearch[5]=='' && valsearch[6]=='')
	{
		var hip='';
	}
	
	
	//Height
	
	
	if((valsearch[7]!='') && (valsearch[8]!=''))
	{
	var Height="BETWEEN '"+valsearch[7]+"' AND '"+valsearch[8]+"'";
	}
	else if(valsearch[7]!='' || valsearch[8]!='')
	{
		if(valsearch[7]!='')
		{
			var Height="IN ('"+valsearch[7]+"')";	
		}
		else
		{
			var Height="IN ('"+valsearch[8]+"')";	
		}
	}
	else if(valsearch[7]=='' && valsearch[8]=='')
	{
		var Height='';
	}
	
	
	//Weight
	
	
	if((valsearch[9]!='') && (valsearch[10]!=''))
	{
	var Weight="BETWEEN '"+valsearch[9]+"' AND '"+valsearch[10]+"'";
	}
	else if(valsearch[9]!='' || valsearch[10]!='')
	{
		if(valsearch[9]!='')
		{
			var Weight="IN ('"+valsearch[9]+"')";	
		}
		else
		{
			var Weight="IN ('"+valsearch[10]+"')";	
		}
	}
	else if(valsearch[9]=='' && valsearch[10]=='')
	{
		var Weight='';
	}
	
	//Bust
	
	
	if((valsearch[11]!='') && (valsearch[12]!=''))
	{
	var Bust="BETWEEN '"+valsearch[11]+"' AND '"+valsearch[12]+"'";
	}
	else if(valsearch[11]!='' || valsearch[12]!='')
	{
		if(valsearch[11]!='')
		{
			var Bust="IN ('"+valsearch[11]+"')";	
		}
		else
		{
			var Bust="IN ('"+valsearch[12]+"')";	
		}
	}
	else if(valsearch[11]=='' && valsearch[12]=='')
	{
		var Bust='';
	}
	
	
	
	
			
	url=url+"?sid="+Math.random();

	
	
	
	if(searchcon=="basic_search")
	{	
		
			if(SearchType=='Chance Search')
			{			
					var query="SELECT CL.id,CL.chance_category,CL.chance_subcategory,CL.chance_type,CL.chance_title,CL.chance_country,CL.chance_state,CL.chance_city,CL.details,date_format(CL.chance_startdate,'%b %D %Y') as StartDate,date_format(CL.chance_enddate,'%b %D %Y') as EndDate,date_format(CL.chance_beforeapply,'%b %D %Y') as BeforeApply,date_format(CL.chance_releasedate,'%b %D %Y') as ReleaseDate,CD.Crop_Title";
					 
					 var table="chance_list CL,crop_detail CD"; 
			 
					 var Con="WHERE CL.Cinema_Login_id=CD.Cinema_Login_id and CD.Crop_prio='1'";
					 
					 if(valsearch[3]!='')
					 {
						  table+=",chance_type_tie CTT"; 
						  
						  Con+=" and CL.id=CTT.chance_list_id";
						 
					 }
					 
					 var Cinematype="";	
				
			}
			else
			{    
				
				if(document.getElementById('company').checked==true)
				{
					var Cinematype='O';
				}
				else
				{
					var Cinematype='I';	
				}
			
				if(Cinematype=='I')
				{
					//var table="cinema_login CL,contactinfo_table CI,crop_detail CD,personalinfo_table PI,phy_health_table PH";
					var table="cinema_login CL,crop_detail CD,personalinfo_table PI";
				}
				else
				{
					var table="cinema_login CL,chance_info CI,crop_detail CD";	
					
				}
				
				if(Cinematype=='I')
				{
				//var Con="WHERE CL.Cinema_Login_Id=CI.Cinema_Login_Id and CL.Cinema_Login_Id=CD.Cinema_Login_Id and CD.Crop_Prio='1' and CL.Cinema_Login_Id=PI.Cinema_Login_Id and CL.Cinema_Login_Id=PH.Cinema_Login_Id";
				
				var Con="WHERE  CL.Cinema_Login_Id=CD.Cinema_Login_Id and CD.Crop_Prio='1' and CL.Cinema_Login_Id=PI.Cinema_Login_Id";
				}
				else
				{	
				var Con="WHERE CL.Cinema_Login_Id=CI.cinema_Loginid and CL.Cinema_Login_Id=CD.Cinema_Login_Id and CD.Crop_Prio='1'";	
				
				}
				
				if(Cinematype=='I')
				{
					
				var query="SELECT CL.Cinema_Login_Id,CL.Cinema_UserName,CL.Cinema_Views,CD.Crop_Title,PI.PerInfo_About,PI.PerInfo_DOB,PI.PerInfo_MS,CL.Cinema_exp";
				}
				else
				{	
					var query="SELECT CL.Cinema_Login_Id,CL.Cinema_UserName,CL.Cinema_Views,CI.cmp_country,CI.cmp_state,CI.cmp_city,CD.Crop_Title,CI.cmp_name,CL.Cinema_exp";	
					
				}
				
				if(areachance[0]!='')
				{
					table=table+",area_myhome AM";
					
					if(SearchType=='Seeker Search')
					{
						Con=Con+" and CL.Cinema_Login_Id=AM.cinema_login_id and AM.myhome_ptype='S'";
					}
					else
					{
						Con=Con+" and CL.Cinema_Login_Id=AM.cinema_login_id and AM.myhome_ptype='P'";
					}
					
				}
				if(valsearch[1]!='')
				{
					table=table+",category_myhome CMH";
					
					if(SearchType=='Seeker Search')
					{
						Con=Con+" and CL.Cinema_Login_Id=CMH.cinema_login_id and CMH.myhome_ptype='S'";
					}
					else
					{
						Con=Con+" and CL.Cinema_Login_Id=CMH.cinema_login_id and CMH.myhome_ptype='P'";
					}
					
				}
				if(valsearch[2]!='')
				{
					table=table+",cate_sub_myhome CSH";
					if(SearchType=='Seeker Search')
					{					
						Con=Con+" and CL.Cinema_Login_Id=CSH.cinema_login_id and CSH.myhome_ptype='S'";
					}
					else
					{
						Con=Con+" and CL.Cinema_Login_Id=CSH.cinema_login_id and CSH.myhome_ptype='P'";	
					}
				}
				if(valsearch[3]!='')
				{
					table=table+",type_myhome TH";
					if(SearchType=='Seeker Search')
					{				
						Con=Con+" and CL.Cinema_Login_Id=TH.cinema_login_id and TH.myhome_ptype='S'";	
					}
					else
					{
						Con=Con+" and CL.Cinema_Login_Id=TH.cinema_login_id and TH.myhome_ptype='P'";	
					}
				}
				
				if(areachance[8]=='')
				{
					areachance[8]="IN ('Y','N')";	
				}
				
				if(Cinematype=='I')
				{
					if(valsearch[5]!='')
					{
						query+=",CI.Con_Country,CI.Con_State,CI.Con_City";	
						table=table+" ,contactinfo_table CI";
						Con=Con+" and CL.Cinema_Login_Id=CI.Cinema_Login_Id";
					
					}
				}
				
				
				
			}
		
var params ="&Chance_area="+areachance[0]+"&Gender="+Genderval+"&category="+valsearch[1]+"&subcategory="+valsearch[2]+"&catetype="+valsearch[3]+"&Country="+valsearch[5]+"&State="+valsearch[6]+"&City="+valsearch[7]+"&Experience="+areachance[8]+"&CinemaType="+Cinematype+"&Searchcon="+searchcon+"&SearchType="+SearchType+"&table="+table+"&Condition="+Con+"&selquery="+query;
	}
	else  
	{	
		if(SearchType=='Chance Search')
		{
			
		var query="SELECT CL.id,CL.chance_category,CL.chance_subcategory,CL.chance_type,CL.chance_title,CL.chance_country,CL.chance_state,CL.chance_city,CL.details,date_format(CL.chance_startdate,'%b %D %Y') as StartDate,date_format(CL.chance_enddate,'%b %D %Y') as EndDate,date_format(CL.chance_beforeapply,'%b %D %Y') as BeforeApply,date_format(CL.chance_releasedate,'%b %D %Y') as ReleaseDate,CD.Crop_Title";	
		
		var table="chance_list CL,crop_detail CD"; 
			 
		var Con="WHERE CL.Cinema_Login_id=CD.Cinema_Login_id and CD.Crop_prio='1'";
		
		
		
		if(areachance[0]!='')
		{
			 table+=",chance_complexion_tie CCT"; 
			
			 Con+=" and CL.id=CCT.chance_list_id";
			
			//areachance[0]+=" and CL.id=CCT.chance_list_id";
			
			
		}
		if(areachance[1]!='')
		{
			
			 table+=",chance_bodytype_tie CBT";
			
			 Con+=" and CL.id=CBT.chance_list_id";
			//areachance[1]+=" and CL.id=CBT.chance_list_id";
			
			
		}
		if(areachance[2]!='')
		{
			
			 table+=",chance_physical_tie CPT";
			
			 Con+=" and CL.id=CPT.chance_list_id";
			//areachance[2]+=" and CL.id=CPT.chance_list_id";
			
			
		}
		if(areachance[3]!='')
		{
			 table+=",chance_eye_tie CET";
			
			 Con+=" and CL.id=CET.chance_list_id";
			//areachance[3]+=" and CL.id=CET.chance_list_id";
			
			
		}
		if(areachance[4]!='')
		{
			 table+=",chance_hair_tie CHT";
			
			 Con+=" and CL.id=CHT.chance_list_id";
			//areachance[4]+=" and CL.id=CHT.chance_list_id";
			
			
		}
		if(areachance[13]!='')
		{
			 table+=",chance_ethnicity_tie CECT";
			
			 Con+=" and CL.id=CECT.chance_list_id";
			//areachance[4]+=" and CL.id=CHT.chance_list_id";
			
			
		}
		
		 var Cinematype="";	
		
		}
		else
		{
			var query="SELECT CL.Cinema_Login_Id,CL.Cinema_UserName,CL.Cinema_Views,CD.Crop_Title,PI.PerInfo_About,PI.PerInfo_DOB,PI.PerInfo_MS,CL.Cinema_exp";
			
			//var table="cinema_login CL,contactinfo_table CI,crop_detail CD,personalinfo_table PI,phy_health_table PH";
			var table="cinema_login CL,crop_detail CD,personalinfo_table PI";
				
				//var Con="WHERE CL.Cinema_Login_Id=CI.Cinema_Login_Id and CL.Cinema_Login_Id=CD.Cinema_Login_Id and CD.Crop_Prio='1' and CL.Cinema_Login_Id=PI.Cinema_Login_Id and CL.Cinema_Login_Id=PH.Cinema_Login_Id";
				
				var Con="WHERE CL.Cinema_Login_Id=CD.Cinema_Login_Id and CD.Crop_Prio='1' and CL.Cinema_Login_Id=PI.Cinema_Login_Id ";
				
				if((areachance[0]!='')||(areachance[1]!='')||(areachance[2]!='')||(areachance[3]!='')||(areachance[4]!='')||(areachance[13]!='')||(areachance[14]!='')||(hip!='')||(Height!='')||(Weight!='')||(Bust!=''))
				{
					query+=",PH.Phy_Eyecolor,PH.Phy_Hair_Color,PH.Phy_Complexion,PH.Phy_BodyType,PH.Phy_Height,PH.Phy_Weight,PH.Phy_PhyStatus";
					
					table+=",phy_health_table PH";
			
			 		Con+=" and CL.Cinema_Login_Id=PH.Cinema_Login_Id";
					
				}
				
				var Cinematype="I";
				
				
				if(areachance[14]=='')
				{
					areachance[14]="IN ('Y','N')";	
				}
			
		}
		
	 params ="&Complexion="+areachance[0]+"&BodyType="+areachance[1]+"&PhyStatus="+areachance[2]+"&EyeColor="+areachance[3]+"&HairColor="+areachance[4]+"&Hip="+hip+"&Height="+Height+"&Weight="+Weight+"&Bust="+Bust+"&Ethinicity="+areachance[13]+"&Experience="+areachance[14]+"&CinemaType="+Cinematype+"&Searchcon="+searchcon+"&SearchType="+SearchType+"&table="+table+"&Condition="+Con+"&selquery="+query;
	
	
	}

	//alert(params);
		
	xmlHttp.onreadystatechange = search_result;
	xmlHttp.open("POST",url,true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
	xmlHttp.send(params);
}

function search_result()
{
	if(xmlHttp.readyState == 4)
		{
		document.getElementById('common_srcresult').innerHTML = xmlHttp.responseText;
		
		//alert(document.getElementById('common_srcresult').innerHTML );
		
	  	}
	  else
	   {
		document.getElementById('common_srcresult').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 getexpType(roleId,epage) 
{
	var strURL="findRole.php?roleId="+roleId+"&epage="+epage; 
	var req = getXMLHTTP();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {	
					document.getElementById('cineType').innerHTML=req.responseText;	
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}			
		req.open("GET", strURL, true);
		req.send(null);
	}		
}


// profile tab
function profile_tab(url,uid,autoid,page)
{  

//alert(url);alert(uid);alert(autoid);alert(page);

	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();
	//alert(url)
	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();
	//alert(url);
	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();
	//alert(url);
	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();
	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 profiletabb()
{
	if(xmlHttp.readyState == 4)
	{
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		document.getElementById('PerformPage').style.display="none";
	}
   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>";
   }	
}
function profilecompany()
{
	if(xmlHttp.readyState == 4)
		{
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		var aval=document.getElementById('cntVal').value;
		var a=parseInt(aval);
		for(var i=3;i<a;i++){document.getElementById('cinemore'+i).style.display='none';}
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
		document.getElementById('PerformPage').style.display="none";
	  	}
	  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>";
	    }
}

function personaltabp()
{
	if(xmlHttp.readyState == 4)
	{
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		document.getElementById('PerformPage').style.display="none";
		photo_tab1();
	}
	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>";
	}
}



function profilephoto()
{
	if(xmlHttp.readyState == 4)
	{   
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		document.getElementById('PerformPage').style.display="none";
		if(document.getElementById('sessionval').value=="")
		{
			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>";
	}	
}


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 personaltabb()
{
	if(xmlHttp.readyState == 4)
	{   
    	document.getElementById('display_profile').style.display="block";
		
		document.getElementById('preload').style.display="block";
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		//alert(document.getElementById('display_profile').innerHTML);
		document.getElementById('PerformPage').style.display="none";
		if(document.getElementById('sessionval').value=="")
		{
			document.getElementById('display_profile').style.display="none";
			window.location.reload();
		}
		document.getElementById('preload').style.display="none";
	}
}
*/


function personalfriend()
{
	if(xmlHttp.readyState == 4)
	{   
	
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		 DISStylenone('hidediv');
		document.getElementById('PerformPage').style.display="none";
	}
}
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>";
	}	
}


function performfriend()
{
	if(xmlHttp.readyState == 4)
	{
		document.getElementById('display_profile1').style.display="block";
		show('6');
		document.getElementById('display_profile1').innerHTML = xmlHttp.responseText;
		document.getElementById('PerformPage').style.display="block";
	}
}


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 performtabSliding1()
{
	if(xmlHttp.readyState == 4)
	{
		document.getElementById('display_profile1').innerHTML = xmlHttp.responseText;
		//alert(document.getElementById('display_profile1').innerHTML);
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
		document.getElementById('PerformPage').style.display="block";
		document.getElementById('expandValue').value=document.getElementById("perf0").offsetHeight;
		expand();
	}

}


function photo_tab()
{
	document.getElementById('preload').style.display="block";
	document.getElementById('showalbum').style.display='block';
	document.getElementById('shownone').style.display='none';
	document.getElementById('preload').style.display="block";
}

function photo_tab1()
{
	document.getElementById('showalbum').style.display='none';
	document.getElementById('shownone').style.display='none';
	document.getElementById('showphoto').style.display='block';
	document.getElementById('viewphoto').style.display='block';
}





//function for get registration divs
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=='cineType'){
	url=url+"&uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();
	xmlHttp.onreadystatechange = cineType;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	
	if(uid=='Talent'){

	url+="&uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange = Talenthub;

	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}
	
	
	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=='work')||(uid=='workEdit'))
	{
	xmlHttp.onreadystatechange = work;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if((uid=='work1')||(uid=='workEdit1'))
	{
	xmlHttp.onreadystatechange = work1;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if((uid=='work2')||(uid=='workEdit2'))
	{
	xmlHttp.onreadystatechange = work2;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if((uid=='work3')||(uid=='workEdit3'))
	{
	xmlHttp.onreadystatechange = work3;
	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=='education')||(uid=='edu'))
	{
	xmlHttp.onreadystatechange = education;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if((uid=='education1')||(uid=='edu1'))
	{
	xmlHttp.onreadystatechange = education1;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if((uid=='education2')||(uid=='edu2'))
	{
	xmlHttp.onreadystatechange = education2;
	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();	
	xmlHttp.onreadystatechange = contactNew;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	
	else if((uid=='contact1') ||(uid=='contactEdit1'))
	{
	url=url+"?uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();
	xmlHttp.onreadystatechange = contactcompany;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	
	else if((uid=='company') || (uid=='companyEdit'))
	{
	xmlHttp.onreadystatechange = company;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if(uid=='companydes')
	{
	xmlHttp.onreadystatechange = companydes;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if(uid=='personaldes')
	{
	url=url+"?uid="+uid+"&autoid="+autoid+"&page="+page+"&sid="+Math.random();	
	xmlHttp.onreadystatechange = personaldes;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if(uid=='companydess')
	{
	xmlHttp.onreadystatechange = companydess;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if(uid=='personaldess')
	{
	xmlHttp.onreadystatechange = personaldess;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if(uid=='experience')
	{
	xmlHttp.onreadystatechange = Experience;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if(uid=='experience1')
	{
	xmlHttp.onreadystatechange = ExperienceRole;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}	
	else if((uid=='talent')||(uid=='talentEdit'))
	{
	xmlHttp.onreadystatechange = talents;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if((uid=='personal1') || (uid=='personal1edit'))
	{
	xmlHttp.onreadystatechange = personal1;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}
	else if((uid=='review') || (uid=='reviewedit'))
	{
	xmlHttp.onreadystatechange = review;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);}

/*else if(uid=='chance_info')
	{
	xmlHttp.onreadystatechange = ch_info;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	}*/
}
/*function ch_info()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('personaldiv2','personaldiv3');	
		//document.getElementById('preload12').style.display="block";
		//alert(xmlHttp.responseText);
		document.getElementById('personaldiv3').innerHTML = xmlHttp.responseText;
		//DISStylenone('personaldesdiv|physicaldiv|educationdiv|workdiv|contactdiv|talentsdiv')
		//DISStyle('personaldesdiv1|physicaldiv1|educationdiv1|workdiv1|contactdiv1|talentsdiv1');
		document.getElementById('preload12').style.display="none";
	}
}
*/function personal1()
{
	if(xmlHttp.readyState == 4)
	{	//alert(xmlHttp.responseText);
		cancel_div('personaldiv2','personaldiv3');	
		//document.getElementById('preload12').style.display="block";
		document.getElementById('personaldiv3').innerHTML = xmlHttp.responseText;
		//DISStylenone('personaldesdiv|physicaldiv|educationdiv|workdiv|contactdiv|talentsdiv')
		//DISStyle('personaldesdiv1|physicaldiv1|educationdiv1|workdiv1|contactdiv1|talentsdiv1');
		document.getElementById('preload12').style.display="none";
	}
}
function review()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('personaldiv4','personaldiv5');	
		document.getElementById('personaldiv5').innerHTML = xmlHttp.responseText;
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
		document.getElementById('preload13').style.display="none";
	}
}

function cineType()
{
	if(xmlHttp.readyState == 4)
	{  
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		var val=document.getElementById('cntVal').value;
		var valtype=parseInt(val);
		if(valtype!=''){ cancel_div('span1id','span1idd'); }
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
	  	}
}

function Talenthub()
{
	if(xmlHttp.readyState == 4)
	{  
	//alert( xmlHttp.responseText);
		document.getElementById('display_profile').innerHTML = xmlHttp.responseText;
		var val=document.getElementById('cntVal').value;
		var valtype=parseInt(val);
		if(valtype!=''){ cancel_div('span1id','span1idd'); }
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
	  	}
}
  
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 Experience()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('experiencediv1','experiencediv');
		document.getElementById('experiencediv').innerHTML = xmlHttp.responseText;
		FillExperience('ddlExp'); FillLaguagetype('ddlLang')
	}
}
function ExperienceRole()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('experiencediv2','experiencediv3');
		document.getElementById('experiencediv3').innerHTML = xmlHttp.responseText;
		FillExperience('ddlroExp');Roletype('ddlrole'); FillLaguagetype('ddlrollang');
	}
}

function work()
{
	if(xmlHttp.readyState == 4)
	{	cancel_div('workdiv1','workdiv');
	    cancel_div('divwork1','divwork');
	   var a=xmlHttp.responseText;
		sp = a.split("####",5);
		document.getElementById('workdiv').innerHTML =sp[0]+sp[1];
		//document.getElementById('preload5').style.display="none";
		DISStylenone('personaldesdiv|personaldiv|physicaldiv|educationdiv|contactdiv|talentsdiv');
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1|educationdiv1|contactdiv1|talentsdiv1');
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
	}
}

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

	{	
		cancel_div('workspan1','workdiv2');
	cancel_div('workdiv','workdiv1');
		var a=xmlHttp.responseText;
		sp = a.split("####",5);
		document.getElementById('workdiv2').innerHTML = sp[0]+sp[2];
		DISStylenone('personaldesdiv|personaldiv|physicaldiv|educationdiv|contactdiv|talentsdiv');
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1|educationdiv1|contactdiv1|talentsdiv1');
	}
}

function work2()
{

	if(xmlHttp.readyState == 4)
	{
		cancel_div('workdiv5','workdiv4');
		cancel_div('workdiv2','workdiv3');
		cancel_div('workdiv','workdiv1');
		var a=xmlHttp.responseText;
		sp = a.split("####",5);
		document.getElementById('workdiv4').innerHTML = sp[0]+sp[3];
		DISStylenone('personaldesdiv|personaldiv|physicaldiv|educationdiv|contactdiv|talentsdiv');
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1|educationdiv1|contactdiv1|talentsdiv1');
	}
}

function work3()
{
	if(xmlHttp.readyState == 4)
	{	
	   cancel_div('workdiv7','workdiv6');
	   cancel_div('workdiv','workdiv1');
	   cancel_div('workdiv4','workdiv5');
		var a=xmlHttp.responseText;
		sp = a.split("####",5);
		document.getElementById('workdiv6').innerHTML =sp[0]+sp[4];
		DISStylenone('personaldesdiv|personaldiv|physicaldiv|educationdiv|contactdiv|talentsdiv')
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1|educationdiv1|contactdiv1|talentsdiv1');
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
	}
}


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 contactNew()
{
	if(xmlHttp.readyState == 4)
	{
		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 insert_education(url,valueString,identity,refid)
	{  	
	
		//alert(url)+"***"+alert(valueString)+"**"+alert(identity)+"**"+alert(refid);
		browser_support(); 
		var url=url;
		var val=new Array();

	    for(i=0;i<valueString.split("|").length;i++){
	    val[i]=document.getElementById(valueString.split("|")[i].toString());
		}
		
		/*if(refid=='eduid1')
		{
		var url=url+"?ddldegreetype="+val[0].value+"&txtother="+val[1].value+"&ddlqualiftype="+val[2].value+"&txtothers="+val[3].value+"&college="+val[4].value+"&hschool="+val[5].value+"&edu1="+val[6].value+"&Educ="+val[7].value+"&EDUidentity="+identity+"&sid="+Math.random(); 
		xmlHttp.onreadystatechange = insertedu1;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		}*/
	
	/*if(refid=='eduid2')
		{
		var url=url+"?ddldegreetype1="+val[0].value+"&txtother1="+val[1].value+"&ddlqualiftype1="+val[2].value+"&txtothers1="+val[3].value+"&college1="+val[4].value+"&hschool1="+val[5].value+"&edu2="+val[6].value+"&EDUidentity="+identity+"&sid="+Math.random(); 
		xmlHttp.onreadystatechange = insertedu2;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		}
	
		if(refid=='eduid3'){
			var url=url+"?ddldegreetype2="+val[0].value+"&txtother2="+val[1].value+"&ddlqualiftype2="+val[2].value+"&txtothers2="+val[3].value+"&college2="+val[4].value+"&hschool2="+val[5].value+"&edu3="+val[6].value+"&EDUidentity="+identity+"&sid="+Math.random(); 
			xmlHttp.onreadystatechange = insertedu3;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}*/
		//var workset=document.getElementById('workset').value;
		
			var url=url+"?personalurl="+val[0].value+"&Physi="+val[1].value+"&contact="+val[2].value+"&PERurl="+val[3].value+"&PhoneNo="+val[4].value+"&Address="+val[5].value+"&settingup="+identity+"&sid="+Math.random(); 
   
    		xmlHttp.onreadystatechange = insertedu3;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		
	}
	function insertedu1()
	{
		document.getElementById('eduview1').style.display='block';
	if(xmlHttp.readyState == 4)
		{
		cancel_div('educationdiv','educationdiv1');
		cancel_div('diveducation1','diveducation')
		var a=xmlHttp.responseText;
		sp = a.split("#",12);
		document.getElementById('edu_Ed0').innerHTML=sp[0];
		document.getElementById('Eq0').innerHTML=sp[1];
		if(sp[2]==''){document.getElementById('EH30').style.display='none';} else{document.getElementById('EH30').style.display='block';
		document.getElementById('Ec0').innerHTML=sp[2];}
		if(sp[3]==''){document.getElementById('EH40').style.display='none';} else{document.getElementById('EH40').style.display='block';
		document.getElementById('Es0').innerHTML=sp[3];}
		}}
		
	function insertedu2()
	{
		document.getElementById('eduview2').style.display='block';
	if(xmlHttp.readyState == 4)
		{
		cancel_div('educationdiv2','educationdiv3');
		var a=xmlHttp.responseText;
		sp = a.split("#",12);
		if(sp[4]!=''){ cancel_div('diveducation3','diveducation2'); }
		document.getElementById('Ed1').innerHTML=sp[4];
		document.getElementById('Eq1').innerHTML=sp[5];
		if(sp[6]==''){document.getElementById('EH31').style.display='none';} else{document.getElementById('EH31').style.display='block';
		document.getElementById('Ec1').innerHTML=sp[6];}
		if(sp[7]==''){document.getElementById('EH41').style.display='none';} else{document.getElementById('EH41').style.display='block';
		document.getElementById('Es1').innerHTML=sp[7];}
		}}
	function insertedu3()
	{
	if(xmlHttp.readyState == 4)
		{
		cancel_div('educationdiv4','educationdiv5');
		var a=xmlHttp.responseText;
		sp = a.split("#",12);
		if(sp[8]!=''){ cancel_div('diveducation5','diveducation4'); }
		document.getElementById('Ed2').innerHTML=sp[8];
		document.getElementById('Eq2').innerHTML=sp[9];
		if(sp[10]==''){document.getElementById('EH32').style.display='none';} else{document.getElementById('EH32').style.display='block';
		document.getElementById('Ec2').innerHTML=sp[10];}
		if(sp[11]==''){document.getElementById('EH42').style.display='none';} else{document.getElementById('EH42').style.display='block';
		document.getElementById('Es2').innerHTML=sp[11];}
		
		}	
	}
	

function insert_vedio(url,vedio,identity){
	browser_support();
	url=url+"?username="+uname+"&userpassword="+password;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=userchk;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

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;
		
	}	
}


function insert_mypage(url,moviename,ddate,dmonth,dyear,prilang,seclang,genere,hours,mins,color,sounds,synopsis,identity)
	{
	browser_support(); 
	
	
	
	var url=url;
	identity='Save';
		url=url+"?txtUrl2="+moviename+"&ddlDate="+ddate+"&ddlMonth="+dmonth+"&ddlYear="+dyear+"&ddlLanKnown="+prilang+"&secondaryLang="+seclang+"&Genere="+genere+"&Hours="+hours+"&Minutes="+mins+"&Color="+color+"&Sounds="+sounds+"&Synopsis="+synopsis+"&Mypage="+identity+"&sid="+Math.random();
		//alert(url);
		xmlHttp.onreadystatechange = insertmypage;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}

function insertmypage()
{
if(xmlHttp.readyState == 4)
	{    
	
	}
}

	
function update_talents(url,ids,identy)
{
	browser_support();
	var url=url;
	url=url+"?ddlComp="+ids+"&TalIdentity="+identy+"&sid="+Math.random();
	xmlHttp.onreadystatechange = updatetal;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function updatetal()
{
if(xmlHttp.readyState == 4)
	{
cancel_div('talentsdiv','talentsdiv1');
var b=xmlHttp.responseText;
spt = b.split("#",1);

		document.getElementById('T1').innerHTML=spt[0];
	}	
}

function contactcompany()
{
	if(xmlHttp.readyState == 4)
	{
		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('companydiv|companydesdiv|contactdiv1')
		DISStyle('companydiv1|companydesdiv1|contactdiv');	

	}
}

function education()
{	

if(xmlHttp.readyState == 4){
		cancel_div('educationdiv1','educationdiv');
		cancel_div('educationdiv2','educationdiv3');
		cancel_div('educationdiv4','educationdiv5');
	    var a=xmlHttp.responseText;
		sp = a.split("####",4);
		document.getElementById('preload4').style.display="block";
		document.getElementById('educationdiv').innerHTML = sp[0]+sp[1];
		document.getElementById('education1').style.display="none";
		document.getElementById('education2').style.display="none";
		document.getElementById('education').style.display="block";
		DISStylenone('personaldesdiv|personaldiv|physicaldiv|workdiv|contactdiv|talentsdiv');
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1|workdiv1|contactdiv1|talentsdiv1');
		document.getElementById('preload4').style.display="none";
		
		}
}

function education1()
{	
if(xmlHttp.readyState == 4){
		cancel_div('educationdiv3','educationdiv2');
		cancel_div('educationdiv','educationdiv1');
		cancel_div('educationdiv4','educationdiv5');
		document.getElementById('preload5').style.display="block";
		var a=xmlHttp.responseText;
		sp = a.split("####",4);
		document.getElementById('educationdiv2').innerHTML = sp[0]+sp[2];
		document.getElementById('education1').style.display="block";
		document.getElementById('education').style.display="none";
		document.getElementById('education2').style.display="none";
		DISStylenone('personaldesdiv|personaldiv|physicaldiv|workdiv|contactdiv|talentsdiv');
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1|workdiv1|contactdiv1|talentsdiv1');
		document.getElementById('preload5').style.display="none";
		}
}
function education2()
{	if(xmlHttp.readyState == 4){
		cancel_div('educationdiv5','educationdiv4');
		cancel_div('educationdiv2','educationdiv3');
		cancel_div('educationdiv','educationdiv1');
		document.getElementById('preload6').style.display="block";
		var a=xmlHttp.responseText;
		sp = a.split("####",4);
		document.getElementById('educationdiv4').innerHTML = sp[0]+sp[3];
		document.getElementById('education1').style.display="none";
		document.getElementById('education').style.display="none";
		document.getElementById('education2').style.display="block";
		DISStylenone('personaldesdiv|personaldiv|physicaldiv|workdiv|contactdiv|talentsdiv');
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1|workdiv1|contactdiv1|talentsdiv1');
		document.getElementById('preload6').style.display="none";
		}
}

function company()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('companydiv1','companydiv');
		document.getElementById('companydiv').innerHTML = xmlHttp.responseText;
		checkWork('chkreg','divreg','div_regno','work1')
		DISStylenone('companydiv1|companydesdiv|contactdiv')
		DISStyle('companydiv|companydesdiv1|contactdiv1');	
	}
}

function companydes()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('companydesdiv1','companydesdiv');
		document.getElementById('companydesdiv').innerHTML = xmlHttp.responseText;
		$(document).ready (function() {	$('textarea.expanding').autogrow();});
		DISStylenone('companydiv|companydesdiv1|contactdiv')
		DISStyle('companydiv1|companydesdiv|contactdiv1');	
	}
}

function talents()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('talentsdiv1','talentsdiv');
		document.getElementById('preload7').style.display="block";
		document.getElementById('talentsdiv').innerHTML = xmlHttp.responseText;
		DISStylenone('personaldesdiv|personaldiv|physicaldiv|workdiv|contactdiv|educationdiv');
		DISStyle('personaldesdiv1|personaldiv1|physicaldiv1|workdiv1|contactdiv1|educationdiv1');
		document.getElementById('preload7').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 companydess()
{
	if(xmlHttp.readyState == 4)
	{
		cancel_div('companydesdiv1','companydesdiv');
		document.getElementById('companydesdiv').innerHTML = xmlHttp.responseText;
		FillMonth('companyddlMonth');FillDate('companyddlDate');FillYears('companyddlYear');
	}
}

function personaldess()
{
	if(xmlHttp.readyState == 4)
	{		
		cancel_div('personaldesdiv1','personaldesdiv');
		
		document.getElementById('preload1').style.display="block";
		document.getElementById('personaldesdiv').innerHTML = xmlHttp.responseText;
		DISStylenone('personaldiv|physicaldiv|educationdiv|workdiv|contactdiv')
		DISStyle('personaldiv1|physicaldiv1|educationdiv1|workdiv1|contactdiv1');
		document.getElementById('preload1').style.display="none";
	}
}
function cancel_div(id1,id2)
{	//alert(id2);alert(id1);
		document.getElementById(id1).style.display='none';
		document.getElementById(id2).style.display='block';
}

function edit_div(id1,id2,id3,id4,id5,id6,id7,id8)
{		document.getElementById(id1).style.display='none';
		document.getElementById(id2).style.display='none';
		document.getElementById(id3).style.display='none';
		document.getElementById(id4).style.display='none';
		document.getElementById(id5).style.display='block';
		document.getElementById(id6).style.display='block';
		document.getElementById(id7).style.display='block';
		document.getElementById(id8).style.display='block';
}

//function for fill roll
function getmultiRole()
{
	var i;
 	var count = 0;
 	var count1=0;
 	field3=0;
         var selectedArray = new Array();
         var selObj=document.getElementById('multiCatein');
		  for (i=0;i<selObj.options.length;i++) 
		  {
		  	if (selObj.options[i].value) 
			{			
     				selectedArray[count] = selObj.options[i].value;
      				count++;
		    }	
				    	    
  		 }
	var strURL="role_search.php?category="+selectedArray;
	var req = getXMLHTTP();
	if (req)
	 {
		req.onreadystatechange = function()
		 {
			if (req.readyState == 4)
			 {
				if (req.status == 200)
				 {
					document.getElementById('rolediv').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 add/edit aboutme in myprofile template page- not in use
function addAboutme(url,meaction) {
	browser_support();
	meaction=document.getElementById(meaction).value;
	url=url+"?meaction="+meaction;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=aboutMe;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }
	
function aboutMe(){ if(xmlHttp.readyState==4) {
	document.getElementById('mediv').style.display='none';
	 document.getElementById('medivedit').innerHTML=xmlHttp.responseText;
	 } }


function search_msg(url,ids)
{	//alert(url);
	browser_support();	
	var url=url;
	var msgval = new Array();
	for(j=0; j<ids.split('|').length; j++)
	{
		msgval[j]=document.getElementById(ids.split('|')[j].toString()).value;
		//alert(msgval[j]);
	}
	url=url+"?id=searchsensmsg&messageSub="+msgval[0]+"&message="+msgval[1]+"&hiddenid="+msgval[2]+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange=retsearch;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function retsearch()
{
	if (xmlHttp.readyState==4)
	{
		//alert( xmlHttp.responseText);
		if(xmlHttp.responseText=="Send")
		{
			document.getElementById('stat').style.display='none';
			document.getElementById('fade').style.display='none';	
		}
	}
}
// lightbox
function showstat(url,divid,fname,sessid)
{   
	//alert(url);alert(divid);alert(fname);
	browser_support();
	
	var arrayPageSize = getPageSize();
	document.getElementById('stat').style.display='none';
    document.getElementById('stat').innerHTML='';
	document.getElementById('fade').style.height=arrayPageSize[1] + 'px';
	url=url+"?divid="+divid+"&type="+fname;
	url=url+"&cid="+sessid+"&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange=userstat;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	
	
}

function userstat() 
{ 
	if (xmlHttp.readyState==4)
	{
			//alert( xmlHttp.responseText);
		document.getElementById("stat").style.display="block";
		document.getElementById("stat").innerHTML = xmlHttp.responseText;	
		var objOverlay = document.getElementById('fade');
		var objLoadingImage = document.getElementById('alignstat');
		var arrayPageSize = getPageSize();
		var arrayPageScroll = getPageScroll();
		if (objLoadingImage) 
		{
		objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 400 - objLoadingImage.offsetHeight) / 2) + 'px');
		}
		document.getElementById("stat").style.display='';
		document.getElementById("fade").style.display='block';
		
		
	}
}

function search_insert(url,id,con)
{	
	//alert(url);alert(id);alert(con);
	browser_support();
	
		var url=url;
		 url=url+"?chanceid="+id+"&con="+con+"&sid="+Math.random();
		//alert(url);
		xmlHttp.onreadystatechange=search_insert_list;
	    xmlHttp.open("GET",url,true);
	    xmlHttp.send(null); 

		
}

function search_insert_list()
{
	if(xmlHttp.readyState==4)
	{
		//alert(xmlHttp.responseText);
	
	 //alert(res);
	 
	}
}
function setval(url,imgId,act,albumID)
{	
	browser_support();
	url=url+"?imgId="+imgId+"&act="+act+"&albumID="+albumID;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=MakeFirstDel;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function MakeFirstDel()
{
	if((xmlHttp.readyState)=='4')
	{
		document.getElementById('viewphoto').style.display='block';
		window.location.reload();
	}
}

function viewalbum(url,divId,hid)
{	
	browser_support();
	url=url+"?divId="+divId+"&hid="+hid;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=userview;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function userview()
{
	if(xmlHttp.readyState == 4)
	{	
		document.getElementById('ViewALBUMTEMP').innerHTML=	xmlHttp.responseText;	
	}
}

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

function AjaxContent() {	
	if (xmlHttp.readyState==4) {
	var title = xmlHttp.responseText;
	//alert(title);
	document.getElementById('paginate_response').innerHTML=title;
	} }





/*function cinema_ajax_chance(URL,reference) {	
	browser_support();
	var url=URL;
	url=url+"&reference="+reference+"&userverificationid="+1;
	url=url+"&sid="+Math.random();
    if(reference=='chance1'){
alert(url);
	xmlHttp.onreadystatechange=AjaxContent_1;
	xmlHttp.open("GET",url,true); xmlHttp.send(null);}

    if(reference=='chance2'){
	xmlHttp.onreadystatechange=AjaxContent_2;
	xmlHttp.open("GET",url,true); xmlHttp.send(null);}

    if(reference=='chance3'){
	xmlHttp.onreadystatechange=AjaxContent_3;
	xmlHttp.open("GET",url,true); xmlHttp.send(null);}

 }

function AjaxContent_1() {	
	if (xmlHttp.readyState==4) {
	var title = xmlHttp.responseText;
	//alert(title);
	document.getElementById('tabContent1').innerHTML=title;
	} }

function AjaxContent_2() {	
	if (xmlHttp.readyState==4) {
	var title = xmlHttp.responseText;
	//alert(title);
	document.getElementById('tabContent2').innerHTML=title;
	} }
function AjaxContent_3() {	
	if (xmlHttp.readyState==4) {
	var title = xmlHttp.responseText;
	//alert(title);
	document.getElementById('tabContent3').innerHTML=title;
	} }
*/



function cinema_ajaxBookmark(URL,action) {
	browser_support();
	var url=URL;
	url=url+"&userverificationid="+1;
	url=url+"&sid="+Math.random()+"action="+action;
	xmlHttp.onreadystatechange=AjaxContentBookmark;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }

function AjaxContentBookmark() {	
	if (xmlHttp.readyState==4) {
	var title = xmlHttp.responseText;
	var value=title.split('split');
	document.getElementById('paginate_response').innerHTML=value[1];
	} }



function loadjscssfile(filename, filetype){
 if (filetype=="js"){ //if filename is a external JavaScript file
  var fileref=document.createElement('script')
  fileref.setAttribute("type","text/javascript")
  fileref.setAttribute("src", filename)
 }
 else if (filetype=="css"){ //if filename is an external CSS file
  var fileref=document.createElement("link")
  fileref.setAttribute("rel", "stylesheet")
  fileref.setAttribute("type", "text/css")
  fileref.setAttribute("href", filename)
   }
 if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref)
}





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';
			
	} }



function loadjscssfile(filename, filetype){
 if (filetype=="js"){ //if filename is a external JavaScript file
  var fileref=document.createElement('script')
  fileref.setAttribute("type","text/javascript")
  fileref.setAttribute("src", filename)
 }
 else if (filetype=="css"){ //if filename is an external CSS file
  var fileref=document.createElement("link")
  fileref.setAttribute("rel", "stylesheet")
  fileref.setAttribute("type", "text/css")
  fileref.setAttribute("href", filename)
 }
 if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref)
}

// for create photo  Available
function showphoto(str,idVal)
{
browser_support();
var url="availablephoto.php";
url=url+"?photoverificationid="+str+"&idVal="+idVal;
url=url+"&eid="+Math.random();
if(idVal=='emailid')
{
xmlHttp.onreadystatechange=photoChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
}
function photoChanged() 
{ 
if (xmlHttp.readyState==4)
{
var msg=xmlHttp.responseText;
if(msg=="*Available")
{
document.getElementById('erralbum').style.color="green";	
document.getElementById('div_emaild').style.display='block';
document.getElementById('erralbum').innerHTML="Email ID  "+'<b>'+document.getElementById('album').value+'</b>'+"  Available";
document.getElementById('phototextfield').value=xmlHttp.responseText;
}
else
{
document.getElementById('erralbum').style.color="#ff0000";
document.getElementById('div_emaild').style.display='block';
document.getElementById('erralbum').innerHTML="Email ID  "+'<b>'+document.getElementById('album').value+'</b>'+"  Not Available";
document.getElementById('phototextfield').value=xmlHttp.responseText;
}
}
}
var secs
var timerID = null
var timerRunning = false
var delay = 5000

function InitializeTimer()
{
    // Set the length of the timer, in seconds
    secs = 10
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
		closeDiv('SENDSMS');
    }
    else
    {
        self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}

function expand()
{
//document.getElementById("perf0").style.backgroundColor='white';
var max = parseInt(document.getElementById('expandValue').value);	
if(document.getElementById("perf0").style.height=='inherit')
	{
	var temp ='0px';
	document.getElementById("perf0").style.height=temp;
	}
	else
	{
var temp =document.getElementById("perf0").style.height;
	}
	var height = parseInt(temp);
if (height<max){
	var height =height + 2;
	document.getElementById("perf0").style.height = height+'px';
	window.setTimeout("expand()", 1);
	}
}

function perform_tab(url,activityidHd,txtareaCmt,toprofile,caction)
{   
	browser_support();
	//for share btn]
	


	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(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 = 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+"?sid="+Math.random()+"&activityidHd="+activityidHd+"&txtareaCmt="+txtareaCmt+"&toprofile="+toprofile+"&caction="+caction;
		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 performComment1()
{	if(xmlHttp.readyState == 4)	{ 
	var LoginId=document.getElementById('toprofile').value;
	url="perform.php?toprofile="+LoginId+"&autoid=perform&page1=4&sid="+Math.random();
	xmlHttp.onreadystatechange = performtab;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	} }	
	
function performComment200000()
{	if(xmlHttp.readyState == 4)	{
	var LoginId=document.getElementById('toprofile').value;
	url="perform.php?toprofile="+LoginId+"&autoid=perform&page1=4&sid="+Math.random();
	xmlHttp.onreadystatechange = performtabSliding;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	} }	
function sharefriend()
{	if(xmlHttp.readyState == 4)	{
	var LoginId=document.getElementById('toprofile').value;
	url="perform.php?toprofile="+LoginId+"&autoid=performfriend&page1=4&sid="+Math.random();
	//alert(url);
	xmlHttp.onreadystatechange = performtabSliding1;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	} }	

function performComment2()
{	if(xmlHttp.readyState == 4)	{	
	var LoginId=document.getElementById('toprofile').value;
	url="perform.php?toprofile="+LoginId+"&autoid=perform&page1=showOlder&sid="+Math.random();
	xmlHttp.onreadystatechange = performtab;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);   }}	
	
function performComment3()
{	if(xmlHttp.readyState == 4)	{	
	var LoginId=document.getElementById('toprofile').value;
	url="perform.php?toprofile="+LoginId+"&autoid=perform&page1=showOldersec&sid="+Math.random();
	xmlHttp.onreadystatechange = performtab;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);  }}		
	
function getmail(url,id,id1,page) {
	browser_support();
	url=url+"?id="+id+"&id1="+id1+"&page="+page;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=getemail;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }
	
function getemail(){ if(xmlHttp.readyState==4) {
	document.getElementById('viewmail').innerHTML=xmlHttp.responseText; 	} }

function delval(url,delId,act,albumID)
{	
	browser_support();
	url=url+"?delId="+delId+"&act="+act+"&albumID="+albumID;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=FirstDel;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function FirstDel()
{
	if((xmlHttp.readyState)=='4')
	{	
	document.getElementById('viewmail').innerHTML=xmlHttp.responseText; 
	window.location.reload();
	}
}

/*--------Function for captcha code checking--------*/
function makeRequest(url, param) {
   if (receiveReq.readyState == 4 || receiveReq.readyState == 0) {
   receiveReq.open("POST", url, true);
   receiveReq.onreadystatechange = updatePage; 
   receiveReq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
   receiveReq.setRequestHeader("Content-length", param.length);
   receiveReq.setRequestHeader("Connection", "close");
   receiveReq.send(param);  } }

function updatePage() {
   if (receiveReq.readyState == 4) {
	    document.getElementById('div_verr').style.display='block';
	    document.getElementById('verifyErr').innerHTML = receiveReq.responseText;
   } }

function getParam(txtControl) {
	
   var url = 'captcha.php';
   var postStr = document.getElementById(txtControl).name + "=" + encodeURIComponent( document.getElementById(txtControl).value );
    makeRequest(url, postStr); 
	}
/*--------------------------*********************-------------------------*/   
function validation() {
	if(document.getElementById('txtfemail').value=='') 	{
	  document.getElementById('emailErr').innerHTML="Please enter the emailId";
	  document.getElementById('txtfemail').focus();
	  return false; 	}
		
	strvalue=document.getElementById('emailErr').innerHTML;
	if(strvalue!='*Available') 	{
		document.getElementById('txtfemail').focus();
		return false;  }
	return true; }
	
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 highlight header menus
function highlightMainTab(id)
{
	for(i=1;i<=5;i++)
	{
		if(id==i)
		{
			document.getElementById("mtab"+id).className='current';
		}
		else
		{
			document.getElementById("mtab"+i).className='';
		}
	}
}
//for highlight profile menus
function highlightTab(id)
{
	for(i=1;i<=13;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='';
						
		}
	}
}
function pick_list(url,cid,searchname,idval)
{
	browser_support();
	var url=url;
	if(idval=='tbox'){	searchname=document.getElementById(searchname).value; }
	else { searchname= ''; }
	url=url+"?cid="+cid+"&searchname="+searchname;
	url=url+"&sid="+Math.random(9999);
	xmlHttp.onreadystatechange=pick;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function pick(){
	if((xmlHttp.readyState)=='4')
	{	
	document.getElementById('pickValue').innerHTML=xmlHttp.responseText;
	}
}
//function for photo psgi in newcinema
/*function photo_prev(url,cntVal,phtId,albId,action,ids,ses)
{  var cont=ses!=ids;
	browser_support();
	if(cont==true){
	url=url+"?cntVal="+cntVal+"&phtId="+phtId+"&albId="+albId+"&action="+action+"&ids="+ids+"&fid="+ids+"&sid="+Math.random(9999); alert(url);}
	else
	{url=url+"?cntVal="+cntVal+"&phtId="+phtId+"&albId="+albId+"&action="+action+"&ids="+ids+"&sid="+Math.random(9999); }
	//alert(url);
	xmlHttp.onreadystatechange=photoNext;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}*/

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



function closediv(showiv)
{
var max = parseInt("300");	

if(document.getElementById(showiv).style.height=='auto')
	{
	var temp ='0px';
	document.getElementById(showiv).style.height=temp;
	}
	else
	{
var temp =document.getElementById(showiv).style.height;
	}

	var height = parseInt(temp);

if (height>0){
	var height =height-2;
	document.getElementById(showiv).style.height = height+'px';
	window.setTimeout("closediv(showiv)", 1);
	}
}





/*--member_list chance--*/
function chanceupdate(id,action,url){ 
	browser_support();
	document.getElementById("mem_" + id).style.background = "#d0eafc";  
	document.getElementById("tbl_dash"+id).style.borderBottomColor="#FFFFFF";
	var action=document.getElementById(action).value;
	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");	

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);
}
			
			
			
			
			//closediv("mem_"+xmlHttp.responseText);
			///opacity('mem_'+xmlHttp.responseText, 100, 0, 2000);
		//document.getElementById("tbl_dash" +xmlHttp.responseText).style.display = "none";
			//document.getElementById("member_listDiv").style.display ='';
		}else{
			alert("Invalid Record");
			return false;
		}
	 }
}
/*************************************************************************/
function opacity(id, opacStart, opacEnd, millisec) {
	//alert("hi");
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
	//document.getElementById(id).style.display = "none";
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}




/************************************************************************/

/*--end member_list chance--*/
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 test1(id,count,mValue,album,status,idss,ses)
{


//alert(id+"*****"+count+mValue+"*****"+album+"*****"+status+"*****"+idss+"****"+ses);

if((document.getElementById('incrementValue'+id).value=="")&&(status=='next'))
	{
var incrementValue= 0;
photo_prev('photo_pagi.php',count,incrementValue,album,status,idss,ses);
	}
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);
		}
	}
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);
		}
	}
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);

		}
	}


}



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

function GoogleLoad()
{
if (!window['google']) {
window['google'] = {};
}
if (!window['google']['loader']) {
window['google']['loader'] = {};
google.loader.ServiceBase = 'http://www.google.com/uds';
google.loader.GoogleApisBase = 'http://ajax.googleapis.com/ajax';
google.loader.ApiKey = 'notsupplied';
google.loader.KeyVerified = true;
google.loader.LoadFailure = false;
google.loader.Secure = false;
google.loader.ClientLocation = {"latitude":13.083,"longitude":80.3,"address":{"city":"","region":"Tamil Nadu","country":"India","country_code":"IN"}};
google.loader.AdditionalParams = '';
(function() {var e=true,f=null,h=false,i=encodeURIComponent,j=window,k=google,m=undefined,n=document;function o(a,b){return a.load=b}var p="push",q="length",r="prototype",s="setTimeout",t="replace",v="charAt",w="loader",x="substring",A="ServiceBase",B="name",C="getTime",D="toLowerCase";function E(a){if(a in F)return F[a];return F[a]=navigator.userAgent[D]().indexOf(a)!=-1}var F={};function G(a,b){var c=function(){};c.prototype=b[r];a.K=b[r];a.prototype=new c}
function H(a,b){var c=a.w||[];c=c.concat(Array[r].slice.call(arguments,2));if(typeof a.r!="undefined")b=a.r;if(typeof a.q!="undefined")a=a.q;var d=function(){var g=c.concat(Array[r].slice.call(arguments));return a.apply(b,g)};d.w=c;d.r=b;d.q=a;return d}function I(a){var b=new Error(a);b.toString=function(){return this.message};return b}function J(a,b){for(var c=a.split(/\./),d=j,g=0;g<c[q]-1;g++){d[c[g]]||(d[c[g]]={});d=d[c[g]]}d[c[c[q]-1]]=b}function K(a,b,c){a[b]=c}if(!L)var L=J;if(!aa)var aa=K;k[w].s={};L("google.loader.callbacks",k[w].s);var M={},N={};k[w].eval={};L("google.loader.eval",k[w].eval);
o(k,function(a,b,c){var d=M[":"+a];if(d){if(c&&!c.language&&c.locale)c.language=c.locale;if(c&&typeof c.callback=="string"){var g=c.callback;if(g.match(/^[[\]A-Za-z0-9._]+$/)){g=j.eval(g);c.callback=g}}var l=c&&c.callback!=f;if(l&&!d.p(b))throw I("Module: '"+a+"' must be loaded before DOM onLoad!");else if(l)d.k(b,c)?j[s](c.callback,0):d.load(b,c);else d.k(b,c)||d.load(b,c)}else throw I("Module: '"+a+"' not found!");});L("google.load",k.load);k.J=function(a,b){b?ba(a):O(j,"load",a)};
L("google.setOnLoadCallback",k.J);function O(a,b,c){if(a.addEventListener)a.addEventListener(b,c,h);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a["on"+b];a["on"+b]=d!=f?ca([c,d]):c}}function ca(a){return function(){for(var b=0;b<a[q];b++)a[b]()}}var P=[];
function ba(a){if(P[q]==0){O(j,"load",R);if(!E("msie")&&!(E("safari")||E("konqueror"))&&E("mozilla")||j.opera)j.addEventListener("DOMContentLoaded",R,h);else if(E("msie"))n.write("<script defer onreadystatechange='google.loader.domReady()' src=//:><\/script>");else(E("safari")||E("konqueror"))&&j[s](S,10)}P[p](a)}k[w].D=function(){var a=j.event.srcElement;if(a.readyState=="complete"){a.onreadystatechange=f;a.parentNode.removeChild(a);R()}};L("google.loader.domReady",k[w].D);var da={loaded:e,complete:e};
function S(){if(da[n.readyState])R();else P[q]>0&&j[s](S,10)}function R(){for(var a=0;a<P[q];a++)P[a]();P.length=0}
k[w].d=function(a,b,c){if(c){var d;if(a=="script"){d=n.createElement("script");d.type="text/javascript";d.src=b}else if(a=="css"){d=n.createElement("link");d.type="text/css";d.href=b;d.rel="stylesheet"}var g=n.getElementsByTagName("head")[0];g||(g=n.body.parentNode.appendChild(n.createElement("head")));g.appendChild(d)}else if(a=="script")n.write('<script src="'+b+'" type="text/javascript"><\/script>');else a=="css"&&n.write('<link href="'+b+'" type="text/css" rel="stylesheet"></link>')};
L("google.loader.writeLoadTag",k[w].d);k[w].G=function(a){N=a};L("google.loader.rfm",k[w].G);k[w].I=function(a){for(var b in a)if(typeof b=="string"&&b&&b[v](0)==":"&&!M[b])M[b]=new T(b[x](1),a[b])};L("google.loader.rpl",k[w].I);k[w].H=function(a){if((a=a.specs)&&a[q])for(var b=0;b<a[q];++b){var c=a[b];if(typeof c=="string")M[":"+c]=new U(c);else{var d=new V(c[B],c.baseSpec,c.customSpecs);M[":"+d[B]]=d}}};L("google.loader.rm",k[w].H);k[w].loaded=function(a){M[":"+a.module].i(a)};
L("google.loader.loaded",k[w].loaded);J("google_exportSymbol",J);J("google_exportProperty",K);function U(a){this.a=a;this.n={};this.b={};this.j=e;this.c=-1}
U[r].f=function(a,b){var c="";if(b!=m){if(b.language!=m)c+="&hl="+i(b.language);if(b.nocss!=m)c+="&output="+i("nocss="+b.nocss);if(b.nooldnames!=m)c+="&nooldnames="+i(b.nooldnames);if(b.packages!=m)c+="&packages="+i(b.packages);if(b.callback!=f)c+="&async=2";if(b.other_params!=m)c+="&"+b.other_params}if(!this.j){if(k[this.a]&&k[this.a].JSHash)c+="&sig="+i(k[this.a].JSHash);var d=[];for(var g in this.n)g[v](0)==":"&&d[p](g[x](1));for(g in this.b)g[v](0)==":"&&d[p](g[x](1));c+="&have="+i(d.join(","))}return k[w][A]+
"/?file="+this.a+"&v="+a+k[w].AdditionalParams+c};U[r].u=function(a){var b=f;if(a)b=a.packages;var c=f;if(b)if(typeof b=="string")c=[a.packages];else if(b[q]){c=[];for(var d=0;d<b[q];d++)typeof b[d]=="string"&&c[p](b[d][t](/^\s*|\s*$/,"")[D]())}c||(c=["default"]);var g=[];for(d=0;d<c[q];d++)this.n[":"+c[d]]||g[p](c[d]);return g};
o(U[r],function(a,b){var c=this.u(b),d=b&&b.callback!=f;if(d)var g=new W(b.callback);for(var l=[],u=c[q]-1;u>=0;u--){var y=c[u];d&&g.z(y);if(this.b[":"+y]){c.splice(u,1);d&&this.b[":"+y][p](g)}else l[p](y)}if(c[q]){if(b&&b.packages)b.packages=c.sort().join(",");if(!b&&N[":"+this.a]!=f&&N[":"+this.a].versions[":"+a]!=f&&!k[w].AdditionalParams&&this.j){var z=N[":"+this.a];k[this.a]=k[this.a]||{};for(var Q in z.properties)if(Q&&Q[v](0)==":")k[this.a][Q[x](1)]=z.properties[Q];k[w].d("script",k[w][A]+
z.path+z.js,d);z.css&&k[w].d("css",k[w][A]+z.path+z.css,d)}else if(!b||!b.autoloaded)k[w].d("script",this.f(a,b),d);if(this.j){this.j=h;this.c=(new Date)[C]();if(this.c%100!=1)this.c=-1}for(u=0;u<l[q];u++){y=l[u];this.b[":"+y]=[];d&&this.b[":"+y][p](g)}}});
U[r].i=function(a){if(this.c!=-1){X("al_"+this.a,"jl."+((new Date)[C]()-this.c),e);this.c=-1}for(var b=0;b<a.components[q];b++){this.n[":"+a.components[b]]=e;var c=this.b[":"+a.components[b]];if(c){for(var d=0;d<c[q];d++)c[d].C(a.components[b]);delete this.b[":"+a.components[b]]}}X("hl",this.a)};U[r].k=function(a,b){return this.u(b)[q]==0};U[r].p=function(){return e};function W(a){this.B=a;this.l={};this.o=0}W[r].z=function(a){this.o++;this.l[":"+a]=e};
W[r].C=function(a){if(this.l[":"+a]){this.l[":"+a]=h;this.o--;this.o==0&&j[s](this.B,0)}};function V(a,b,c){this.name=a;this.A=b;this.m=c;this.t=this.g=h;this.h=[];k[w].s[this[B]]=H(this.i,this)}G(V,U);o(V[r],function(a,b){var c=b&&b.callback!=f;if(c){this.h[p](b.callback);b.callback="google.loader.callbacks."+this[B]}else this.g=e;if(!b||!b.autoloaded)k[w].d("script",this.f(a,b),c);X("el",this[B])});V[r].k=function(a,b){return b&&b.callback!=f?this.t:this.g};V[r].i=function(){this.t=e;for(var a=0;a<this.h[q];a++)j[s](this.h[a],0);this.h=[]};
var Y=function(a,b){return a.string?i(a.string)+"="+i(b):a.regex?b[t](/(^.*$)/,a.regex):""};V[r].f=function(a,b){return this.F(this.v(a),a,b)};
V[r].F=function(a,b,c){var d="";if(a.key)d+="&"+Y(a.key,k[w].ApiKey);if(a.version)d+="&"+Y(a.version,b);var g=k[w].Secure&&a.ssl?a.ssl:a.uri;if(c!=f)for(var l in c)if(a.params[l])d+="&"+Y(a.params[l],c[l]);else if(l=="other_params")d+="&"+c[l];else if(l=="base_domain")g="http://"+c[l]+a.uri[x](a.uri.indexOf("/",7));k[this[B]]={};if(g.indexOf("?")==-1&&d)d="?"+d[x](1);return g+d};V[r].p=function(a){return this.v(a).deferred};
V[r].v=function(a){if(this.m)for(var b=0;b<this.m[q];++b){var c=this.m[b];if((new RegExp(c.pattern)).test(a))return c}return this.A};function T(a,b){this.a=a;this.e=b;this.g=h}G(T,U);o(T[r],function(a,b){this.g=e;k[w].d("script",this.f(a,b),h)});T[r].k=function(){return this.g};T[r].i=function(){};T[r].f=function(a,b){if(!this.e.versions[":"+a]){if(this.e.aliases){var c=this.e.aliases[":"+a];if(c)a=c}if(!this.e.versions[":"+a])throw I("Module: '"+this.a+"' with version '"+a+"' not found!");}var d=k[w].GoogleApisBase+"/libs/"+this.a+"/"+a+"/"+this.e.versions[":"+a][b&&b.uncompressed?"uncompressed":"compressed"];X("el",this.a);return d};
T[r].p=function(){return h};var ea=h,Z=[],fa=(new Date)[C](),X=function(a,b,c){if(!ea){O(j,"unload",ga);ea=e}if(c){if(!k[w].Secure&&(!k[w].Options||k[w].Options.csi===h)){a=a[D]()[t](/[^a-z0-9_.]+/g,"_");b=b[D]()[t](/[^a-z0-9_.]+/g,"_");var d="http://csi.gstatic.com/csi?s=uds&v=2&action="+i(a)+"&it="+i(b);j[s](H($,f,d),10000)}}else{Z[p]("r"+Z[q]+"="+i(a+(b?"|"+b:"")));j[s](ga,Z[q]>5?0:15000)}},ga=function(){if(Z[q]){$(k[w][A]+"/stats?"+Z.join("&")+"&nc="+(new Date)[C]()+"_"+((new Date)[C]()-fa));Z.length=0}},$=function(a){var b=
new Image,c=ha++;ia[c]=b;b.onload=b.onerror=function(){delete ia[c]};b.src=a;b=f},ia={},ha=0;J("google.loader.recordStat",X);J("google.loader.createImageForLogging",$);

}) ();google.loader.rm({"specs":["feeds",{"name":"books","baseSpec":{"uri":"http://books.google.com/books/api.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}}}},{"name":"friendconnect","baseSpec":{"uri":"http://www.google.com/friendconnect/script/friendconnect.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{}}},"spreadsheets","gdata","visualization",{"name":"sharing","baseSpec":{"uri":"http://www.google.com/s2/sharing/js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{"language":{"string":"hl"}}}},"search",{"name":"maps","baseSpec":{"uri":"http://maps.google.com/maps?file\u003dgoogleapi","ssl":"https://maps-api-ssl.google.com/maps?file\u003dgoogleapi","key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"regex":"callback\u003d$1\u0026async\u003d2"},"language":{"string":"hl"}}},"customSpecs":[{"uri":"http://maps.google.com/maps/api/js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}},"pattern":"^(3|3..*)$"}]},"language","earth",{"name":"annotations","baseSpec":{"uri":"http://www.google.com/reviews/scripts/annotations_bootstrap.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"},"country":{"string":"gl"}}}},"ads","elements"]});
google.loader.rfm({":feeds":{"versions":{":1":"1",":1.0":"1"},"path":"/api/feeds/1.0/8e09eed7fc0dd59c80503ea502548a85/","js":"default+en.I.js","css":"default.css","properties":{":JSHash":"8e09eed7fc0dd59c80503ea502548a85",":Version":"1.0"}},":search":{"versions":{":1":"1",":1.0":"1"},"path":"/api/search/1.0/833d7f305ddcad8a986e71e082e0e80b/","js":"default+en.I.js","css":"default.css","properties":{":JSHash":"833d7f305ddcad8a986e71e082e0e80b",":NoOldNames":false,":Version":"1.0"}},":language":{"versions":{":1":"1",":1.0":"1"},"path":"/api/language/1.0/bae1e8a9831973cd2af47846e62cd188/","js":"default+en.I.js","properties":{":JSHash":"bae1e8a9831973cd2af47846e62cd188",":Version":"1.0"}},":annotations":{"versions":{":1":"1",":1.0":"1"},"path":"/api/annotations/1.0/91ce09a08b8a141aef011d02c856ad36/","js":"default+en.I.js","properties":{":JSHash":"91ce09a08b8a141aef011d02c856ad36",":Version":"1.0"}},":earth":{"versions":{":1":"1",":1.0":"1"},"path":"/api/earth/1.0/2e6203e63ed613b9e55441aa9eb70e0a/","js":"default.I.js","properties":{":JSHash":"2e6203e63ed613b9e55441aa9eb70e0a",":Version":"1.0"}},":ads":{"versions":{":1":"1",":1.0":"1"},"path":"/api/ads/1.0/31f308c7bb13936126a472dbd588a671/","js":"default.I.js","properties":{":JSHash":"31f308c7bb13936126a472dbd588a671",":Version":"1.0"}}});
google.loader.rpl({":scriptaculous":{"versions":{":1.8.2":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.8.1":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"}},"aliases":{":1.8":"1.8.2",":1":"1.8.2"}},":yui":{"versions":{":2.6.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.7.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"}},"aliases":{":2":"2.7.0",":2.7":"2.7.0",":2.6":"2.6.0"}},":swfobject":{"versions":{":2.1":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"},":2.2":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"}},"aliases":{":2":"2.2"}},":ext-core":{"versions":{":3.0.0":{"uncompressed":"ext-core-debug.js","compressed":"ext-core.js"}},"aliases":{":3":"3.0.0",":3.0":"3.0.0"}},":mootools":{"versions":{":1.2.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.11":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"}},"aliases":{":1":"1.11"}},":jqueryui":{"versions":{":1.7.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.6.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.1":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.3":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"}},"aliases":{":1.7":"1.7.2",":1":"1.7.2",":1.6":"1.6.0",":1.5":"1.5.3"}},":prototype":{"versions":{":1.6.0.2":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.0.3":{"uncompressed":"prototype.js","compressed":"prototype.js"}},"aliases":{":1":"1.6.0.3",":1.6":"1.6.0.3"}},":jquery":{"versions":{":1.2.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.2.6":{"uncompressed":"jquery.js","compressed":"jquery.min.js"}},"aliases":{":1":"1.3.2",":1.3":"1.3.2",":1.2":"1.2.6"}},":dojo":{"versions":{":1.2.3":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.1.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.2.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"}},"aliases":{":1":"1.3.1",":1.3":"1.3.1",":1.2":"1.2.3",":1.1":"1.1.1"}}});
}
}


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 = getXMLHTTP();

	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 = getXMLHTTP();

	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);
	}
}

/*   Search Insert  */



/*-----------------------------Index Flim-----------------------*/
function getindex(url,id) { 
	browser_support();
	url=url+"?id="+id;
	url=url+"&sid="+Math.random(); 
	xmlHttp.onreadystatechange=getcinema;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }
	
function getcinema(){ if(xmlHttp.readyState==4) { 
	document.getElementById('index_info').innerHTML=xmlHttp.responseText; } }
	
function highlightIndex(id)
{ 
	for(i=1;i<=12;i++)
	{
		if(id==i)
		{
			document.getElementById("tab"+id).className='current';
		}
		else
		{
			document.getElementById("tab"+i).className='aero';
		}
	}
}
	
/*-----------------------------Index Flim End-----------------------*/

/*----------------------------mypage-----------------------*/
function mypage_ind(url,type,id) {
//	alert(url);alert(type);alert(id);
	browser_support();
	url=url+"?type="+type+"&id="+id; alert(url);
	url=url+"&sid="+Math.random(); 
	xmlHttp.onreadystatechange=getmypage;
	xmlHttp.open("GET",url,true); xmlHttp.send(null); }
	
function getmypage(){ if(xmlHttp.readyState==4) {
	document.getElementById('ind_dispaly').innerHTML=xmlHttp.responseText; 	} }
/*function getcinema1(){ if(xmlHttp.readyState==4) {
	document.getElementById('ind_dispaly1').innerHTML=xmlHttp.responseText; 	} }	*/
	
	
/*-----------------------------mypage Flim End-----------------------*/


/*-----------------------------Experiance update-----------------------*/
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('personaldiv','personaldiv1');
		var a=xmlHttp.responseText;
		sp = a.split("#",2);
		document.getElementById('ch1').innerHTML=sp[0];
		//window.location.reload(true);
	}	
}
	/*-----------------------------Experiance update end-----------------------*/


/*-----------------------------Create chance Stateload-----------------------*/
function getcrState(countryId,page) 
{
	var strURL="findStatecreate.php?country="+countryId+"&page="+page;
	//alert(strURL);
	var req = getXMLHTTP();
	if (req)
	{
		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				if (req.status == 200) {					
					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);
	}		
}
/*-----------------------------Create chance Stateload end-----------------------*/
