var index = Math.floor(Math.random() * 3);
var t = encodeURIComponent(location.search);

switch (index){
	case 0: //scupio
		document.write('<script type="text/ja'+'vascript" src="http://iservice.libertytimes.com.tw/IService2/adsp.php?p=l&t=' + t + '"></scr'+'ipt>');
	break;
	case 1: //yahoo
		var r = /liveNews\/(list|news)\.php*/;
		var u = r.exec(location.pathname);
		document.write('<iframe src="http://iservice.libertytimes.com.tw/IService2/adyahoo2.php?l=l&t=' + t + '&u=' + location.pathname + '" name="J02" id="J02" width="680" height="285" frameborder="0" scrolling="no" class="ad-yahoo"></iframe>');
	break;
	case 2: //scupio
		document.write('<script type="text/ja'+'vascript" src="http://iservice.libertytimes.com.tw/IService2/adsp.php?p=l&t=' + t + '"></scr'+'ipt>');
	break;
}
