var _disable_empty_list=false;
var _hide_empty_list=false;
function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}
//menu left
function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
	}
function getgianhang(strURL) {		
		
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('gianhang2').innerHTML=req.responseText;						
					} else {
						disabled = false;
						//alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
			
				
}
function byId(id) 
{
return document.getElementById ? document.getElementById(id) : document.all[id];
}
var prevLink = "";

function changeActiveStates(ele) {
if (prevLink) byId(prevLink).className = "";
ele.className = 'activate';
prevLink = ele.id;
}
var shop_info=0;
	function shopshow(){
		if(shop_info==0){
			document.getElementById("createshop").style.display='block';
			shop_info=1;
		}else{;
			document.getElementById("createshop").style.display='none';
			shop_info=0;
		}
	}
//----------------------------------------------
function AdGenerateHTML(XMLFile,XSLFile)
{
    try
    {
    	var xml;
    	var xsl;
        if (window.ActiveXObject)
        {
			xml = new ActiveXObject("Microsoft.XMLDOM");
            xsl = new ActiveXObject("Microsoft.XMLDOM");
        }
        else if (document.implementation && document.implementation.createDocument)
        {
            xml= document.implementation.createDocument("","",null);
            xsl= document.implementation.createDocument("","",null);
        }
        else
        {
            return '';
        }
        xml.async = false;
        xml.validateOnParse=true;
        xml.load(XMLFile);
        xsl.async = false;
        xsl.validateOnParse=true;
        xsl.load(XSLFile);
 	    return xml.transformNode(xsl);
        //-----------//-----------
 	}
    catch(errorobject)
    {
        return '<b>'+errorobject+'</b>';
    }
}

