// JavaScript Document
var xmlHttp
var xmlHttp1
var div=""
var Showit;
var Hideit;
var doLoading = '<img src="images/progress_bar.gif" alt="" style="margin-left:30%;"/>'
function show_des(des_id,div_id,showit,hideit)
{ 


/*alert(des_id+" ----" +div_id+"---- "+showit+"---- "+hideit);*/
Showit=showit;
Hideit=hideit;
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
 		{
 			alert ("Browser does not support HTTP Request")
			return
 		}
	var url="ajax_for_all.php"
	url=url+"?val="+des_id
	div=div_id
	xmlHttp.onreadystatechange=stateChanged1
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged1() 
{

	/*if(xmlHttp.readyState < 4)
	{
        document.getElementById("ajaxloader").innerHTML = doLoading
	}*/
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 	{ 	
		document.getElementById(Showit).style.display="block";
		document.getElementById(Hideit).style.display="none";
 		document.getElementById(div).innerHTML=xmlHttp.responseText 
		
 	} 
}



function show_level(chkv,pres)
{ 
	alert ("Browser does not support HTTP Request");
	xmlHttp1=GetXmlHttpObject()
	if (xmlHttp1==null)
 		{
 			alert ("Browser does not support HTTP Request")
			return
 		}
	var url="showindustech1.php"
	url=url+"?chkv="+chkv+"&pres="+pres

	xmlHttp1.onreadystatechange=stateChanged 
	xmlHttp1.open("GET",url,true)
	xmlHttp1.send(null)
}

function stateChanged() 
{ 
alert ("Browser does not support HTTP Request");
if(xmlHttp1.readyState < 4)
{
       document.getElementById("ajaxloader").innerHTML = doLoading
}
	if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
 	{ 
 		document.getElementById("main_back-mid").innerHTML=xmlHttp1.responseText 
 	} 
}

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
 		{
 		// Firefox, Opera 8.0+, Safari
 		xmlHttp=new XMLHttpRequest();
 		}
	catch (e)
 	{
 		//Internet Explorer
 		try
  		{
  		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  		}
 		catch (e)
  		{
  		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  		}
 	}
return xmlHttp;
}


