
//interface//server need to create array

/*
 var b = new Array();

 b[0]=new Array("<~script src=http://218.63.244.181/ad/js/ycx.js><~/script>" ,80,0);
 b[1]=new Array("<~script src=http://218.63.244.181/ad/js/index_3.js><~/script>" ,200,0);

 showAd(b);
 
----------------------------------------  */

 
 
 
 
 
//--------------------------------------
function showAd(b){
//caculate 
var total=0;
for(i=0 ;i<b.length;i++){total=total+b[i][1];}

//alert(total);
var Vcount=0;
for(i=0 ;i<b.length;i++){
	Vcount=Vcount+(Math.round(b[i][1]/total*100));
	b[i][2]=Vcount;

}
//for (i=0;i<b.length;i++){
 //document.write(b[i][2] + '<br>' );}

a = 100
var slump = Math.random();
var talet = Math.round(slump * (a-1))+1;

//alert('aa');

for (i=0;i<b.length;i++){
	if (talet<b[i][2]){
			document.write(b[i][0].replace(/~/g,''));
		break;}
}

//setTimeout("showAd();",2000) ;

}//end function




 





