		var xmlDocChooseIt;
		if (window.ActiveXObject){// code for IE
			xmlDocChooseIt=new ActiveXObject("Microsoft.XMLDOM");
		}else if (document.implementation.createDocument){// code for Mozilla, Firefox, Opera, etc.
			xmlDocChooseIt=document.implementation.createDocument("","",null);
		}else{
			alert('Your browser cannot handle this script');
		}
		if (xmlDocChooseIt!=null){
			xmlDocChooseIt.async=false;
  			xmlDocChooseIt.load("/XML/chooseItXML.xml");
		}else{
		  alert("Your browser does not support XMLHTTP.");
		}
		function advertTable(){
		var x=xmlDocChooseIt.getElementsByTagName("chooseIt")[0].getElementsByTagName("advertising")[0].getElementsByTagName("block");
		//alert(x.length);
		document.write("<tr>");
		for (i=0;i<x.length;i++){
				document.write("<td class='banner_td'>");
				document.write("<height=\""+xmlDocChooseIt.getElementsByTagName("chooseIt")[0].getElementsByTagName("advertising")[0].getAttribute("height")+"\" ");
				document.write("width=\""+xmlDocChooseIt.getElementsByTagName("chooseIt")[0].getElementsByTagName("advertising")[0].getAttribute("width")+"\">");
				document.write("</td>");
		}
		document.write("</tr>");
		document.write("<tr>");
		for (i=0;i<x.length;i++){
				document.write("<td class='banner_td'>");
				if (x[i].getElementsByTagName("href")[0].hasChildNodes()){
					document.write("<a href=\""+x[i].getElementsByTagName("href")[0].childNodes[0].nodeValue+"\" target=\"_parent\">");
				}
				document.write("<img class=\"banner\" src=\""+x[i].getElementsByTagName("src")[0].childNodes[0].nodeValue+"\" alt=\"\" ");
				document.write("width=\""+x[i].getElementsByTagName("width")[0].childNodes[0].nodeValue+"\" />");
				if (x[i].getElementsByTagName("href")[0].hasChildNodes()){
					document.write("</a>");
				}
				document.write("</td>");
		}
		document.write("</tr>");
		}
		function bannerJsSimple(){
			var x=xmlDocChooseIt.getElementsByTagName("chooseIt")[0].getElementsByTagName("banner")[0];
			var objectTag="<object classid=\""+x.getAttribute("classid")+"\" codebase=\""+x.getAttribute("codebase")+"\" height=\""+x.getElementsByTagName("height")[0].childNodes[0].nodeValue+"\" width=\""+x.getElementsByTagName("width")[0].childNodes[0].nodeValue+"\" >";
			document.write(objectTag);
			var xParam=x.getElementsByTagName("param");
			var i;
			for (i=0;i<xParam.length;i++){
				var paramTag="<param name=\""+xParam[i].getElementsByTagName("name")[0].childNodes[0].nodeValue+"\" value=\""+xParam[i].getElementsByTagName("value")[0].childNodes[0].nodeValue+"\" />";
				document.write(paramTag);
			}
			var xEmbed=x.getElementsByTagName("embed")[0];
			var embedTag="<embed pluginspage=\""+xEmbed.getAttribute("pluginspage")+"\" type=\""+xEmbed.getAttribute("type")+"\" quality=\""+xEmbed.getAttribute("quality")+"\" play=\""+xEmbed.getAttribute("play")+"\" src=\""+xEmbed.getElementsByTagName("src")[0].childNodes[0].nodeValue+"\" height=\""+xEmbed.getElementsByTagName("height")[0].childNodes[0].nodeValue+"\" width=\""+xEmbed.getElementsByTagName("width")[0].childNodes[0].nodeValue+"\" >";
			document.write(embedTag);
			document.write("</embed>");
			document.write("</object>");
		}
/*		function newsBanner(){
			var x=xmlDocChooseIt.getElementsByTagName("chooseIt")[0].getElementsByTagName("news")[0].getElementsByTagName("banner")[0];
			var objectTag="<object classid=\""+x.getAttribute("classid")+"\" codebase=\""+x.getAttribute("codebase")+"\" height=\""+x.getElementsByTagName("height")[0].childNodes[0].nodeValue+"\" width=\""+x.getElementsByTagName("width")[0].childNodes[0].nodeValue+"\" >";
			document.write(objectTag);
			var xParam=x.getElementsByTagName("param");
			var i;
			for (i=0;i<xParam.length;i++){
				var paramTag="<param name=\""+xParam[i].getElementsByTagName("name")[0].childNodes[0].nodeValue+"\" value=\""+xParam[i].getElementsByTagName("value")[0].childNodes[0].nodeValue+"\" />";
				document.write(paramTag);
			}
			var xEmbed=x.getElementsByTagName("embed")[0];
			var embedTag="<embed pluginspage=\""+xEmbed.getAttribute("pluginspage")+"\" type=\""+xEmbed.getAttribute("type")+"\" quality=\""+xEmbed.getAttribute("quality")+"\" play=\""+xEmbed.getAttribute("play")+"\" menu=\""+xEmbed.getAttribute("menu")+"\" src=\""+xEmbed.getElementsByTagName("src")[0].childNodes[0].nodeValue+"\" height=\""+xEmbed.getElementsByTagName("height")[0].childNodes[0].nodeValue+"\" width=\""+xEmbed.getElementsByTagName("width")[0].childNodes[0].nodeValue+"\" >";
			document.write(embedTag);
			document.write("</embed>");
			document.write("</object>");
		}
		function newsImg(){
			var x=xmlDocChooseIt.getElementsByTagName("chooseIt")[0].getElementsByTagName("news")[0].getElementsByTagName("imgs")[0].getElementsByTagName("img");
			for (i=0;i<x.length;i++){
				document.write("<tr height=\"");
				if (x[i].getElementsByTagName("tdHeight")[0].hasChildNodes()){
					document.write(x[i].getElementsByTagName("tdHeight")[0].childNodes[0].nodeValue);
				}
				document.write("\" >");
				document.write("<td valign='top' height=\"");
				if (x[i].getElementsByTagName("tdHeight")[0].hasChildNodes()){
					document.write(x[i].getElementsByTagName("height")[0].childNodes[0].nodeValue);
				}
				document.write("\" >");
				document.write("<a href=\""+x[i].getElementsByTagName("href")[0].childNodes[0].nodeValue+"\" target=\"_parent\">");
				document.write("<img class=\"banner\" src=\""+x[i].getElementsByTagName("src")[0].childNodes[0].nodeValue+"\" alt=\"\" ");
				if (x[i].getElementsByTagName("height")[0].hasChildNodes()){
					document.write("height=\""+x[i].getElementsByTagName("height")[0].childNodes[0].nodeValue+"\" ");
				}
				document.write("width=\""+x[i].getElementsByTagName("width")[0].childNodes[0].nodeValue+"\" border=\"0\" /></a>");
				document.write("</td>");
				document.write("</tr>");
			}
		}
function chooseIt(catogory){
	var img=xmlDocChooseIt.getElementsByTagName("chooseIt")[0].getElementsByTagName("chooseIt")[0].getElementsByTagName(catogory+"block")[0].getElementsByTagName(catogory);
	var jmp = new Array();
	jmp[0] = "http://bestshopmaga.com.hk/"+catogory+"/"+catogory+"_eng.html";
	jmp[1] = "http://bestshopmaga.com.hk/"+catogory+"/"+catogory+"_chi.html";
	jmp[2] = "http://bestshopmaga.com.hk/"+catogory+"/"+catogory+"_jp.html";

	i = Math.floor(Math.random()*img.length);
	j = Math.floor(Math.random()*jmp.length);
	document.write("<tr height=\"155\">");
	document.write("<td class=\"chooseit_photo\" align=\"center\" valign=\"middle\" width=\"100%\" height=\"155\">");
	document.write("<a href='"+jmp[j]+"'>");
	document.write("<img src='"+img[i].getElementsByTagName("img")[0].childNodes[0].nodeValue+"'border='0' alt='ChooseIt! - "+catogory.toUpperCase+"' style='z-index: 0;'>");
	document.write("</a>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td class=\"chooseit_content\" width=\"100%\">");
	document.write(img[i].getElementsByTagName("des")[0].childNodes[0].nodeValue);
	document.write("<a href='"+jmp[j]+"'>more</a></td>");
	document.write("</tr>");
}
function discoverHongKong(catogory){
	var img=xmlDocChooseIt.getElementsByTagName("chooseIt")[0].getElementsByTagName("discoverHongKong")[0].getElementsByTagName(catogory+"Block")[0].getElementsByTagName(catogory);
	var jmp = new Array();
	var title;
	switch (catogory){
		case "downtownBrowser":
			jmp[0] = "http://bestshopmaga.com.hk/DISCOVER_HONGKONG/downtown_hkg_eng.html";
			jmp[1] = "http://bestshopmaga.com.hk/DISCOVER_HONGKONG/downtown_hkg_chi.html";
			jmp[2] = "http://bestshopmaga.com.hk/DISCOVER_HONGKONG/downtown_hkg_jp.htmll";
			title="Downtown Browser";
			break;
		case "travalSpot":
			jmp[0] = "http://bestshopmaga.com.hk/DISCOVER_HONGKONG/travelspot_eng.html";
			jmp[1] = "http://bestshopmaga.com.hk/DISCOVER_HONGKONG/travelspot_chi.html";
			jmp[2] = "http://bestshopmaga.com.hk/DISCOVER_HONGKONG/travelspot_jp.html";
			title="Travel Spot";
			break;
		case "qtMovie":
			jmp[0] = "http://bestshopmaga.com.hk/Street%20Guide%20Home.html";
			title="QT-Movie";
			break;
	}

	i = Math.floor(Math.random()*img.length);
	j = Math.floor(Math.random()*jmp.length);
	document.write("<tr height=\"144\">");
	document.write("<td class=\"discoverhk_photo\" align=\"center\" valign=\"middle\" width=\"100%\" height=\"144\">");
	document.write("<a href='"+jmp[j]+"'>");
	document.write("<img src='"+img[i].getElementsByTagName("img")[0].childNodes[0].nodeValue+"'border='0' alt='Discover Hong Kong - "+title+"' style='z-index: 0;'>");
	document.write("</a>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td class=\"discoverhk_content\" width=\"100%\">");
	document.write(img[i].getElementsByTagName("des")[0].childNodes[0].nodeValue);
	document.write("<a href='"+jmp[j]+"'>more</a></td>");
	document.write("</tr>");
}*/					