function meauaddcur(idarr){
$.each( idarr, function(i, n){
 $("#"+n).addClass("cur")
}); 
}
function sart(id){
$(id).addClass("wrap")

}
var jcurarr="";
$(document).ready(function(){
	jcurarr=curarr;
if(jcurarr!=""){meauaddcur(jcurarr);}
});

function change_img(){
	if(key==0){
		key=1;
		}
    else if(document.all){
		document.getElementById("pic").filters[0].Apply();
		document.getElementById("pic").filters[0].Play(duration=2);
		}
	eval('document.getElementById("pic").src=img'+nn+'.src');
	eval('document.getElementById("url").href=urls['+nn+']');
	eval('document.getElementById("url").target="_blank"');
	for (var i=1;i<=counts;i++){document.getElementById("xxjdjj"+i).className='axx';}
	document.getElementById("xxjdjj"+nn).className='bxx';
	nn++;
	if(nn>counts){
		nn=1;
		}
    tt=setTimeout('change_img()',4000);
}

function changeimg(n){nn=n;window.clearInterval(tt);change_img();}

function CreatPlay(i){
document.write('<div class="play_con">');
document.write('<div class="ppd"><a id="url"><img id="pic" class="play_img" /></a></div>');
document.write('<div class="paly_tex">');
for(var i=1;i<counts+1;i++){document.write('<a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self">'+i+'</a>');}
document.write('</div></div>');
change_img();
}

function botjs(){
document.write('<div style="width:100%;float:left;" ><script src="http://s4.cnzz.com/stat.php?id=1977024&web_id=1977024&show=pic1" language="JavaScript"></script></div>');

}


function addads(a,s,e){

	$(e+"[id^="+s+"]").each(function (i,Ele) { 
		adstr=$(Ele).attr("id")
		adstr=adstr.substring(s.length)	
		
	   if(a[adstr] && $(Ele) ){
		   if(a[adstr][0]=='img'){$(Ele).html('<a href="/ad/adsclicks.asp?adid='+a[adstr][2]+'"  target="_blank" ><img src="/ad/images/'+a[adstr][1]+'" width='+$(Ele).width()+' /></a>')
		   }
	  if(a[adstr][0]=='txt'){$(Ele).html('<iframe hspace=0 vspace=0 scrolling=no  height='+$(Ele).height()+'  width='+$(Ele).width()+'  frameborder=0 src=/ad/'+a[adstr][1]+' ></iframe>')
			 }
			}
      
		else{	
		//$(Ele).html('<div style="width:100%;text-align:center;height:1px;" alt=广告:adfiles["'+adstr+'"]="广告文件名"'+$(Ele).width()+'X'+$(Ele).height()+' ></div>')		
		}
	});
}



