/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/

if (!xmlhttp && typeof(XMLHttpRequest) != 'undefined') {
	
  var xmlhttp = new XMLHttpRequest();
}


function evalJS()
{
	var asdf = document.getElementById('adv_cont');
	var x = asdf.getElementsByTagName("script");
	//var x = document.getElementsByTagName("script");
	for(var i=0 ; i<x.length ; i++)
	{
		if(x[i].text != "")
		{
			eval(x[i].text);
		}
	} 
}

function hideElement(id)
{
	document.getElementById(id).style.display = 'none';
}
function showElement(id)
{
	document.getElementById(id).style.display = '';
}
function changeElementDisplay(id)
{
	(document.getElementById(id).style.display == 'none')?showElement(id):hideElement(id);
	document.getElementById("advanced-search-button").className = (document.getElementById("advanced-search-button").className == "advanced-search-button closed")?"advanced-search-button opened":"advanced-search-button closed";
	//alert(document.getElementById("advanced-search-button").className);
}
function changeElementDisplay_graph(id)
{
	(document.getElementById(id).style.display == 'none')?showElement(id):hideElement(id);
	(document.getElementById(id).style.display == 'none')?top_zazor=(-44):top_zazor=0;
	document.getElementById("advanced-search-button").className = (document.getElementById("advanced-search-button").className == "advanced-search-button closed")?"advanced-search-button opened":"advanced-search-button closed";
	arrangeMonIcons_ext(top_zazor);
	//alert(document.getElementById("advanced-search-button").className);
}
function selectTab(id)
{
/*
	//alert(id);
	//strpos(window.location, , 0)
	//alert(window.location.indexOf("din_adv_search.php", 0));

	var action;
	var advElements;
	var utilFile;
	
	switch (id)
	{
		case 1:
			document.getElementById('search_tab_1').className = 'active';
			document.getElementById('search_tab_2').className = '';
			document.getElementById('search_tab_3').className = '';
			document.getElementById('search_tab_4').className = '';
			
			action = "search_result.php?QueryString=general";
			//document.getElementById('txtName').name = "txtName";
			
			jsFile = "din_locsearch.js";
			jsAfFile = "din_locsearch_af.js";
			utilFile = "din_search.php";
			//advElements = "aaaaaa";
			break;
		case 2:
			document.getElementById('search_tab_1').className = '';
			document.getElementById('search_tab_2').className = 'active';
			document.getElementById('search_tab_3').className = '';
			document.getElementById('search_tab_4').className = '';
		
			action = "locsearch.php?QueryString=Location";
			
			jsFile = "din_search.js";
			jsAfFile = "din_search_af.js";
			utilFile = "din_locsearch.php";
			
			//hush_setCheck();
			//advElements = "bbbbbb";
			break;
		case 3:
			document.getElementById('search_tab_1').className = '';
			document.getElementById('search_tab_2').className = '';
			document.getElementById('search_tab_3').className = 'active';
			document.getElementById('search_tab_4').className = '';
		
			action = "graphicalsearch.php?QueryString=GraphSearch";
			document.getElementById('txtName').name = "txtGraphName"; 
			
			jsFile = "din_graphicalsearch.js";
			jsAfFile = "din_graphicalsearch_af.js";
			utilFile = "din_graphicalsearch.php";
			//advElements = "cccccccc";					
			break;
		case 4:
			document.getElementById('search_tab_1').className = '';
			document.getElementById('search_tab_2').className = '';
			document.getElementById('search_tab_3').className = '';
			document.getElementById('search_tab_4').className = 'active';
			
			alert('UNDER CONSTRUCTION');
			
			break;
	}
	
	document.forms[0].action = action;
	
	//document.getElementById('adv_area').innerHTML = "Lading...";
	
	xmlhttp.open('POST', utilFile, false);
	//xmlhttp.open('POST', "qaqik.html", false);
	
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');	
	
	sendString = "";	

	xmlhttp.send(sendString);
	
	if ( xmlhttp.readyState == 4 )
	{
		var xmlResponse = xmlhttp.responseText;
	}
	
	//alert(xmlResponse);
	//evalJS(jsFile);
	//advElements = xmlResponse;
	
	//alert(xmlResponse);
	
	//document.forms[0].action = action;
	//eval()
	document.getElementById('adv_cont').innerHTML = xmlResponse;
	
	//evalJS(jsAfFile);
	//document.getElementById('adv_cont').innerHTML = xmlResponse;
	//document.getElementById('adv_cont').innerHTML += xmlResponse;
	hideElement('adv_area');	
	//OnBL();
	
	var asdf = document.getElementById('adv_cont');
	var x = asdf.getElementsByTagName("script");
	//var x = document.getElementsByTagName("script");
	for(var i=0 ; i<x.length ; i++)
	{
		if(x[i].text != "")
		{
			eval(x[i].text);
		}
	} 
	
	OnBodyLoad();
	*/
}
