function GetXmlHttpObject(handler) { 
		var objXmlHttp=null;
		
		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;
		}
	} 
	function DoRefine() { 
		var Categories, SubCategories, PriceMax, PriceMin, Sizes, Shoes;
		Categories = "";
		SubCategories = "";
		Sizes = "";
		Shoes = "";
		document.getElementById("ajax_content").innerHTML = "<div id='loading'>Loading...</div>";		
		$("#refine :checked").each(function() {
			if ($(this).attr('class') == "category") {
				if (Categories == "") {
					Categories = $(this).val();
				} else {
					Categories = Categories + "," + $(this).val();
				}
			} else if ($(this).attr('class') == "subcategory")  {
				if (SubCategories == "") {
					SubCategories = $(this).val();
				} else {
					SubCategories = SubCategories + "," + $(this).val();
				}
			} else if ($(this).attr('class') == "size")  {
				if (Sizes == "") {
					Sizes = $(this).val();
				} else {
					Sizes = Sizes + "," + $(this).val();
				}
			} else if ($(this).attr('class') == "shoe")  {
				if (Shoes == "") {
					Shoes = $(this).val();
				} else {
					Shoes = Shoes + "," + $(this).val();
				}
			}
		});
		PriceMax = document.getElementById("upper").value;
		PriceMin = document.getElementById("lower").value;
		BrandRefine = document.getElementById("RefineBrand").value;
		SearchRefine = document.getElementById("RefineSearch").value;
		var url="ajax-results.asp?CategoryID=" + Categories + "&SubCategoryID=" + SubCategories + "&SizeID=" + Sizes + "&ShoeSizeID=" + Shoes + "&PriceMax=" + PriceMax + "&PriceMin=" + PriceMin + "&search=" + SearchRefine + "&Brand=" + BrandRefine;
		
		xmlHttp=GetXmlHttpObject(stateChanged);
		xmlHttp.open("GET", url , true);
		xmlHttp.send(null);
	}
	
	function stateChanged() { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
			var	a = xmlHttp.responseText;
			document.getElementById("ajax_content").innerHTML = a;
		}
	}
	
	function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}