// JavaScript Document
var xmlHttp

function ad_details_info(str,menu)
{ 
//alert(menu);
	//alert(str);
	var mn=menu;
	for(i=0;i<2;i++)
	{
		var menunm='menu'+i;
		document.getElementById(menunm).className='';
	}
	
	
	
	/*if(mn=="menu0")
	{
		
		document.getElementById('menu0').className='demo1';
		alert(document.getElementById('menu0').className);
	}
	else
	{
		document.getElementById('menu0').className='';
	}
	if(mn=="menu1")
	{
		document.getElementById('menu1').className='demo1';
	}
	else
	{
		document.getElementById('menu1').className='';
	}
	*/
	
	//alert(mn);
	//document.getElementById(mn).style.backgroundColor='red';
	/*if(mn=="menu0")
	{
		document.getElementById('menu0').className='demo1';
	}
	else
	{
		document.getElementById('menu0').className='';
	}
	if(mn=="menu1")
	{
		document.getElementById('menu1').className='demo1';
	}
	else
	{
		document.getElementById('menu1').className='';
	}
	if(mn=="menu2")
	{
		document.getElementById('menu2').className='demo1';
	}
	else
	{
		document.getElementById('menu2').className='';
	}
	if(mn=="menu3")
	{
		document.getElementById('menu3').className='demo1';
	}
	else
	{
		document.getElementById('menu3').className='';
	}*/
	//document.getElementById(mn).className='demo1';
	var url="foot.php?sid=" + Math.random() + "&details_id=" + str;
	xmlHttp=GetXmlHttpObject(stateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
}



function pedigree_info(str,f)
{ 
	var url="pedigree_det.php?sid=" + Math.random() + "&details_id=" + str+"&f="+f;
	xmlHttp=GetXmlHttpObject(stateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
}
function ad_contact_info(str,f)
{ 
	var url="contact_det.php?sid=" + Math.random() + "&details_id=" + str+"&f="+f;
	xmlHttp=GetXmlHttpObject(stateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
}
function send_to_friend(str,f)
{ 
	var url="send_friend.php?sid=" + Math.random() + "&details_id=" + str+"&f="+f;
	xmlHttp=GetXmlHttpObject(stateChanged)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
}


function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
	} 
} 

function GetXmlHttpObject(handler)
{ 
	var objXmlHttp=null

	if (navigator.userAgent.indexOf("Opera")>=0)
	{
		alert("This example doesn't work in Opera") 
		return 
	}
	if (navigator.userAgent.indexOf("MSIE")>=0)
	{ 
		var strName="Msxml2.XMLHTTP"
		if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
		{
			strName="Microsoft.XMLHTTP"
		} 
		try
		{ 
			objXmlHttp=new ActiveXObject(strName)
			objXmlHttp.onreadystatechange=handler 
			return objXmlHttp
		} 
		catch(e)
		{ 
			alert("Error. Scripting for ActiveX might be disabled") 
			return 
		} 
	} 
	if (navigator.userAgent.indexOf("Mozilla")>=0)
	{
		objXmlHttp=new XMLHttpRequest()
		objXmlHttp.onload=handler
		objXmlHttp.onerror=handler 
		return objXmlHttp
	}
} 