var ry
var ADID=new Array()
var profit=new Array()
function random_imglink(){
var myimages=new Array()
var imagelinks=new Array()
ADID[1]=5039;
myimages[1]='http://ads.ttv.com.tw/AD/Media/EverGreen/lohas468x60.gif';
imagelinks[1]='http://ads.ttv.com.tw/AD/CountHits.asp?ADID=5039';
profit[1]='False';
ADID[2]=5217;
myimages[2]='http://ads.ttv.com.tw/AD/Media/PSman/468x60_PScomic.jpg';
imagelinks[2]='http://ads.ttv.com.tw/AD/CountHits.asp?ADID=5217';
profit[2]='False';
ADID[3]=5220;
myimages[3]='http://ads.ttv.com.tw/AD/Media/FairyTail/468x60magic.gif';
imagelinks[3]='http://ads.ttv.com.tw/AD/CountHits.asp?ADID=5220';
profit[3]='False';
 do {
	ry=Math.floor(Math.random()*4);
 }
 while(ry==0);
document.write('<a target=_blank href='+imagelinks[ry]+'><img alt=¼s§i src='+myimages[ry]+' border=0></a>');
}
random_imglink()
if (ADID[ry]!=null && profit[ry]=='True'){
		var	oXMLHTTP = new xmlhttp();
		ADDImp(ADID[ry]);
}
function xmlhttp() 
{
	try{return new ActiveXObject('Msxml2.XMLHTTP');} catch(e){};
	try{return new ActiveXObject('Microsoft.XMLHTTP');} catch(e){};
	try{return new XMLHttpRequest();} catch(e){};
	return null;
}
function ADDImp(ADID) {
	var sURL = '/AD/AddImp.asp?ADID='+ADID;
	oXMLHTTP.open( 'GET', sURL, false );
	try {
		oXMLHTTP.send(null);
	}
	catch (e) {
	}
}
