var xmlHttp
function showCustomer(str)
{
var url="/fenlei.asp"
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;
new XMenu("warpper");
}
}
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
}
}

function XMenu(o){
		this.d$ = function(o){ return document.getElementById(o);}
		this.d$$ = function(o, str){ return o.getElementsByTagName(str);}
		this.obj = o;
		this.bind();
	}
	XMenu.prototype = {
		bind : function(){
			var xxx = this.d$(this.obj);
			var xdt = this.d$$(xxx, 'dt');
			var xdd = this.d$$(xxx, 'dd');
			var xdtl = xdt.length;
			xxx["obj"] = xdt[0];
			for(var i=0; i<xdtl; i++){
				xdt[i]["dd"] = xdd[i];
				xdt[i]["div"] = xxx;
				xdt[i].onmouseover = function(){
					this["div"]["obj"].className = "normal";
					this["div"]["obj"]["dd"].className = 'none';
					this.className = "over";
					this["dd"].className = "block";
					this["div"]["obj"] = this;
				}

			}
			xxx.onmouseout = function(){

				var d = this;
				this.hide = setTimeout(function(){
					d["obj"].className = "normal";
					d["obj"]["dd"].className = "none";
					d = null;
				},20);
			}
			xxx.onmouseover = function(){
				if(this.hide){
					clearTimeout(this.hide);
				}
			}
		}
	}
	window.onload = function (){
		showCustomer();
	}

function loadShoppingCart() {
var url = '/ChkBag.asp';
$.ajax({ url: url, type: 'GET', cache:false,success:loadShoppingCartOK, error: loadShoppingCartFail });
    }
    function loadShoppingCartFail(data, status) {
    }
	function loadShoppingCartOK(data, status) {
	$("#tj").html(data);
    }

function Logindiv() {
var url = '/ajax.asp?action=login'; 
$.ajax({ url:url, type: 'GET', cache:false,success:LogindivOK, error: LogindivFail });
    }
    function LogindivFail(data, status) {
    }
	function LogindivOK(data, status) {
	$("#tj2").html(data);
    }

