String.prototype.trim = function()
{
	return this.replace(/(^[\s]*)|([\s]*$)/g, "");
}

String.prototype.len = function()
{
    return this.replace(/[^\x00-\xff]/g,"**").length;
}

function getHttpRequest(){
	var httpRequest;
	if (window.XMLHttpRequest){ // Mozilla, Safari,...
		httpRequest = new XMLHttpRequest();
		if (httpRequest.overrideMimeType){
			httpRequest.overrideMimeType('text/xml');
		}
	}
	else if (window.ActiveXObject){ // IE
		try{
			httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e){
			try {
				httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(e){}
		}
	}
	return httpRequest;
}
function goNavTab8(cat){
    var list;
    list = document.getElementsByTagName("li");
    for(var i=0; i<list.length; i++){
        if(list[i].id.indexOf("navItem8_") == 0){
            if(list[i].id == "navItem8_" + cat)
                list[i].className = "hot";
            else
                list[i].className = "";
        }
    }
    
    list = document.getElementsByTagName("ul");
    for(var i=0; i<list.length; i++){
        if(list[i].id.indexOf("navSubItem8_") == 0){
            if(list[i].id == "navSubItem8_" + cat)
                list[i].className = "";
            else
                list[i].className = "disable";
        }
    }
}

function goList(regionID, categoryID){
    if(regionID != "000000" && categoryID != "0000"){
	    url = "/" + regionID + "-" + categoryID + "/";
	    window.location = url;
	}
}
