
var xmlDoc=null;
if (window.ActiveXObject){
	xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
} else if (document.implementation.createDocument) {
	xmlDoc=document.implementation.createDocument("","",null);
} else {
	alert('Your browser cannot handle this script');
}
if (xmlDoc!=null)
{
	var Loc = location.href
	xmlDoc.async=false;
	
	if(Loc.search(".dk/shop/de/") != -1){
		url = "/shop/de/toplist-2-10-1.html?rawxml=1";
		header = "/images/top10_de.png"
	}
	if(Loc.search(".dk/shop/se") != -1){
		url = "/shop/se/toplist-2-10-1.html?rawxml=1";
		header = "/images/top10_se.png"
	}
	if(Loc.search(".dk/shop/de/") == -1 && Loc.search(".dk/shop/se/") == -1){
		url = "/shop/toplist-2-10-1.html?rawxml=1";
		header = "/images/top10_da.png"
	}
	xmlDoc.load(url)
	var x=xmlDoc.getElementsByTagName("Product");
	//alert(x.length)
	var ProdNr, img, Txt, Pris, Prodlink
	if(navigator.appName == "Microsoft Internet Explorer"){
		var HTML = "<table style='margin:20px 0px 95px 5px;border:1px solid #666666;' id='PCardHolder2' cellspacing='0' cellpadding='0' border='0' width='140'><tr><td colspan='2' style='padding:8px 0px 10px 0px;background-color:#a10052;' align='center'><img align='center' src='"+header+"' border='0'></td></tr>";
	} else {
		var HTML = "<table style='margin:20px 0px 20px 9px;border:1px solid #666666;' id='PCardHolder2' cellspacing='0' cellpadding='0' border='0' width='140'><tr><td colspan='2' style='padding:8px 0px 10px 0px;background-color:#a10052;' align='center'><img align='center' src='"+header+"' border='0'></td></tr>";
	}
	Counter = 0 
	for (i=0;i<x.length;i++)
	{ 
		Counter++
		ProdNr = x[i].getElementsByTagName("ProductNo")[0].childNodes[0].nodeValue;
		img = x[i].getElementsByTagName("PictureLink")[0].childNodes[0].nodeValue;
		img = img.replace(/ /g, "%20");
		img = img.replace(/-t/g, "-r");
		Txt = x[i].getElementsByTagName("ProductName")[0].childNodes[0].nodeValue;
		Pris = x[i].getElementsByTagName("CostPrice")[0].childNodes[0].nodeValue;
		Prodlink = x[i].getElementsByTagName("FramelessProductLnk")[0].childNodes[0].nodeValue;
		HTML += "<tr>";
		HTML += "<td style='color:#000000;padding-left:5px;padding-top:5px;' valign='top'>"+Counter+".</td>";
		HTML += "<td style='padding-top:5px;'><a href='"+Prodlink+"' style='color:#000000;'>"+Txt+"</a></td>";
		HTML += "</tr><tr><td style='height:3px;font-size:1px;'>&nbsp;</td></tr>";
	}
	HTML += "</table>";
	document.getElementById('top10').innerHTML = HTML;
}

