function adInit() {
	var adcontent = new Array();
	var adurl = new Array();
	adcontent[0] = "http://images.arabmmo.com/www/vip/2010/11/30/300_250pvz.jpg";  //三广告随机轮播
	adcontent[1] = "http://images.arabmmo.com/www/vip/2010/08/11/arabhitman.jpg";
	adcontent[2] = "http://images.arabmmo.com/www/2011/04/swa10s_2.jpg";
	adurl[0] = "http://games.arabmmo.com/pvz/index.shtml";
	adurl[1] = "http://play.arabmmo.com/games/arabianhitman.shtml";
	adurl[2] = "http://forum.arabmmo.com/board/6-41.html";

	var intRand = Math.floor(Math.random()*3);
	var picurl = "url(" + adcontent[intRand] +") #eeece0 "+ (arrSize[0]/2-150) +"px 75px no-repeat";
	var piclink = adurl[intRand];
	objads = document.getElementById("ads_flash");
	objads.style.background = picurl;
	objads.style.width = arrSize[0] + 'px';
	objads.style.margin = '0 '+ (0 - arrSize[0]/2) + 'px 0 0';
	objads.style.height = arrSize[1] + 'px';
	document.getElementById("time").style.left = (arrSize[0]/2-90) + 'px';
	document.getElementById("ads_url_flash").href=piclink;
	document.getElementById("ads_url_flash").style.width = arrSize[0] + 'px';
	document.getElementById("ads_url_flash").style.height = arrSize[1] + 'px';
	addCount();
}
	
function addCount() {
	if (time>0){
		time--;
	}else{
		document.getElementById("ads_flash").style.display = "none";
	}
	setTimeout("addCount()",1000);
	document.getElementById("time").innerHTML = "&#1587;&#1578;&#1576;&#1583;&#1571; &#1575;&#1604;&#1604;&#1593;&#1576;&#1577; &#1605;&#1606; &#1582;&#1604;&#1575;&#1604; <b><font color=#FF0000>"+time+"</font></b> &#1579;&#1575;&#1606;&#1610;&#1577;";
}
adInit();
