// JavaScript Document

var xmlHttp

function showDir()
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
	
var strType = document.getElementById("strType").value;
var strValue = document.getElementById("strValue").value;
var strRegion = document.getElementById("strRegion").value;
//alert(strType + strValue)

//for (i=0; i<document.forms[0].sorting.length; i++){
//	if (document.forms[0].sorting[i].checked==true)
//		var1=document.forms[0].sorting[i].value;
//	}

var url = "index_result.asp?strRegion="+strRegion+"&strType="+strType+"&strValue="+strValue+"&sid="+Math.random(); 
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.send(url);
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("txt").innerHTML=xmlHttp.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;
}
