function getAdRandom() {
    var strAdCode = getAdCode("0;1","random");
    //strAdCode = '<div style="float:right;margin:0 0 10px 10px;">' + strAdCode + '</div>';
    document.write(strAdCode);
}

function getAdCode(strAdId,strRandom) {
	strUrl = new Array();
	strTxt = new Array();
	strModel = new Array();
	strAdCode = "";

//Oyster
strTxt[0] = '<img src="/banner/adservice/Oyster_2_728x90.jpg" border="0" width="728" height="90" />';
strUrl[0] = 'http://online.adservicemedia.dk/click2.php?id=773&bid=60882&utm_source=coollinks&utm_medium=banner&utm_content=oyster&utm_campaign=mobile_broadband';
strModel[0] = 'Oyster';

//Telmore
strTxt[1] = '<img src="/banner/adservice/Telmore_mobile_broadband-728x90.gif" border="0" width="728" height="90" />';
strUrl[1] = 'http://online.adservicemedia.dk/click2.php?id=773&bid=60883&utm_source=coollinks&utm_medium=banner&utm_content=telmore&utm_campaign=mobile_broadband';
strModel[1] = 'Telmore';


//**********************************************************************
	var strU = '';
	strU = '';
	
	if (strAdId != "" && strRandom != "random") {
		aryAdId = strAdId.split(";");
		for (var i=0; i<aryAdId.length; i++) {
			if(strTxt[aryAdId[i]].indexOf("img src") != -1) {
		        strU = "G_";
		    } else {
		        strU = "T_";
		    }
		    if(strTxt[aryAdId[i]].indexOf("div") != -1) {
		        strU = "C_";
		    }
		    strU = '&sub=' + strU + strModel[aryAdId[i]];
		    if (strUrl[aryAdId[i]].indexOf("etailmedia") != -1) {
		        strU = '';
		    }
			strAdCode += '<a target="_blank" href="' + strUrl[aryAdId[i]] + strU + '">' + strTxt[aryAdId[i]] + '</a>';
		}
	}
	if (strRandom == "random") {
		aryAdId = strAdId.split(";");
		var rand_no = Math.floor(aryAdId.length*Math.random())
		//document.write(strModel[aryAdId[rand_no]] + "<br />");
		if (strUrl[aryAdId[rand_no]].indexOf("etailmedia") == -1) {
		    strU = '&sub=GR_';
		    if (strTxt[aryAdId[rand_no]].indexOf("div") != -1) {
		        strU = "&sub=CR_";
		    }
		    strU += strModel[aryAdId[rand_no]];
		}
		strAdCode = '<a target="_blank" href="' + strUrl[aryAdId[rand_no]] + strU + '">' + strTxt[aryAdId[rand_no]] + '</a>';
	}
	return strAdCode;
}