var ad_G;ad_G='http://localhost:3696';
function adlistshow(ad_x,ad_y,ad_B,ad_T,ad_I,ad_K,ad_J,ad_S,ad_H){
	this.ad_aL=ad_y;
	this.ad_ad=ad_B;this.ad_aI=ad_K;
	this.ad_aH=ad_J;
	this.ad_aZ=ad_T;
	this.face=ad_I;
	this.ad_af=20000;
	if(typeof(ad_S)=='undefined'){
		this.ad_aU=true;
		}else{
		this.ad_aU=ad_S;
	};
	if(typeof(ad_H)=='undefined'){
		this.direction=0;
	}else{
		this.direction=ad_H;
	};
	switch(ad_T){
		case 0:
		case 4:
		case 5:
		case 6:
		case 9:
		case 10:
			this.ad_aT=0;
			break;
		case 8:
			this.ad_aT=2;
			break;
		default:
			this.ad_aT=1;
			break;
	}
	var ad_V=new Array();
	var ad_W=new Array();
	var i,j,k,ad_aM,ad_aB,ad_aY;
	i=0;j=-1;k=0;ad_aM=-1;ad_aB=0;ad_aY=1;
	if(this.ad_aT==0){
		for(i=0,j=0;i<ad_x.length;i++){
			if(this.ad_ab(ad_x[i])){ad_V[j]=ad_x[i];j++;}
		}
		ad_V.sort(ad_u);
		this.ad_aF=j+1;
		this.ad_aJ=ad_V;
	}else if(this.ad_aT==1){
		ad_V[0]=new Array();
		ad_V[1]=new Array();
		for(i=0;i<ad_x.length;i++){
			if(ad_x[i][5]<=100){
				if(ad_x[i][5]!=ad_aM){
					ad_aM=ad_x[i][5];ad_aB=0;j++;k=0;
					}
					else{k++;}
				}else{if(ad_x[i][5]!=ad_aM||ad_x.length<=10){
						if(ad_aM<=100)	j=-1;
						ad_aM=ad_x[i][5];
						ad_aB=1;
						j++;
						k=0;
						ad_aY=0;
					}else{if(ad_aY>=ad_aM-100){j++;k=0;ad_aY=0;}else{k++;}}
				}// end else if
				if(this.ad_ab(ad_x[i])){
					if(k==0)ad_V[ad_aB][j]=new Array();
					ad_V[ad_aB][j][k]=ad_x[i];ad_aY++;
				}// end if
		}// end for
		for(i=0;i<ad_V.length;i++){
			if(i==1){ad_V[i].sort(ad_u)};
			for(j=0;j<ad_V[i].length;j++){ad_V[i][j].sort(ad_u);}
		}
		k=0;
		for(i=0;i<ad_V.length;i++){
			for(j=0;j<ad_V[i].length;j++){ad_W[k]=ad_V[i][j];k++;}
		}
		this.ad_aJ=ad_W;
		this.ad_aF=k;
	}else if(this.ad_aT==2){
		for(i=0,j=0;i<ad_x.length;i++){
			if(this.ad_ab(ad_x[i])){
				ad_V[j]=new Array();
				ad_V[j][0]=new Array();
				ad_V[j][0][0]=ad_x[i][0];
				ad_V[j][0][1]=ad_x[i][2];
				ad_V[j][0][2]=ad_x[i][3];
				ad_V[j][0][3]=ad_x[i][4];
				ad_V[j][0][4]=ad_x[i][5];
				ad_V[j][1]=new Array();
				ad_V[j][1][0]=ad_x[i][1];
				ad_V[j][1][1]=ad_x[i][2];
				ad_V[j][1][2]=ad_x[i][3];
				ad_V[j][1][3]=ad_x[i][6];
				ad_V[j][1][4]=ad_x[i][7];
				j++;
			}
		}
		ad_V.sort(ad_u);
		this.ad_aF=j+1;
		this.ad_aJ=ad_V;
	}
	this.ad_aE();
};
adlistshow.prototype.ad_aE=function(){
	switch(this.ad_aZ){
		case 0:
			this.ad_am();
			break;
		case 1:
		case 7:
			this.ad_ak();
			break;
		case 2:
			this.ad_ai(0);
			break;
		case 3:
			this.ad_ai(1);
			break;
		case 4:
			this.ad_ai(2);
			break;
		case 5:
			this.ad_al(false);
			break;
		case 6:
			this.ad_al(true);
			break;
		case 8:
			this.ad_ah();
			break;
		case 9:
			this.ad_an();
			break;
		case 10:
			this.ad_aj();
			break;
		default:
			break;
	}
};
adlistshow.prototype.ad_Z=function(index){
	if(this.ad_aT==0){return true;}
	else{if(this.ad_aJ.length==index+1){return true;}
		else{return false;}
	}
};

adlistshow.prototype.ad_am=function(){
	document.write('<table ',(this.ad_aI>0)?'width='.concat(this.ad_aI):'',' cellspacing=0 cellpadding=0 border=0 align=center>');
	this.ad_bF(this.ad_aJ,0);
	document.write('</table>');
};

adlistshow.prototype.ad_ak=function(){
	if(this.face==0){
		document.write('<table ',(this.ad_aI>0)?'width='.concat(this.ad_aI):'',' cellspacing=0 cellpadding=0 border=0 align=center>');
	}else if(this.face==2){
		document.write('<table ',(this.ad_aI>0)?'width='.concat(this.ad_aI):'',' cellspacing=0 cellpadding=0 border=0 align=center><tr>');
	}
	for(var i=0;i<this.ad_aJ.length;i++){
		this.ad_bF(this.ad_aJ[i],i,this.ad_Z(i));
		if(this.face==0){
			document.write('<tr><td height="3"></td></tr>');
		}else if(this.face==2){
			document.write('<td width="3"></td>');}if(this.face==1&&(!this.ad_Z(i))){document.write('<tr><td height="1" bgcolor="#808080"></td></tr>');
		}
	}
	if(this.face==0){document.write('</table>');}
	else if(this.face==2){document.write('</tr></table>');}
};

adlistshow.prototype.ad_ai=function(type){
	if(type==2){
		document.write('<DIV id="floatdiv',this.ad_aL,'" style="position:absolute;overflow:hidden;top:0;left:-200;',(this.ad_aH>0)?'height:'.concat(this.ad_aH):'180',';',(this.ad_aI>0)?'width:'.concat(this.ad_aI):'115',';">');
		this.ad_bA(this.ad_aJ);
	}else{
		document.write('<DIV id="floatdiv',this.ad_aL,'" style="position:absolute;top:0;left:-200;',(this.ad_aI>0)?'width:'.concat(this.ad_aI):'115',';">');this.ad_ak();
	}
	document.write('</DIV>');
	if(this.ad_aJ.length>0){
		ad_a('floatdiv'.concat(this.ad_aL),type);
	}
};
		
adlistshow.prototype.ad_al=function(type){
	ad_bn=this.ad_aJ[0][2].lastIndexOf(',');
	ad_bl=this.ad_aJ[0][2].substr(ad_bn+2);
	ad_aW=ad_f(ad_bl,this.ad_aJ[0][1],true);
	var ad_X=this.ad_aJ[0][2].split(",");
	ad_t(this.ad_aJ[0][0],ad_aW,'Advertisment',ad_X[2],ad_X[9],ad_X[8],screen.height-ad_X[9]-80,(screen.width-770)/2+410-5,type);
};

adlistshow.prototype.ad_ah=function(){
	document.write('<table align=center ',(this.ad_aI>0)?'width='.concat(this.ad_aI):'',' cellspacing=0 cellpadding=0 border=0>');
	this.ad_bB(this.ad_aJ,0);
	document.write('</table>');
};

adlistshow.prototype.ad_an=function(){
	document.write('<table align=center ',(this.ad_aI>0)?'width='.concat(this.ad_aI):'',' cellspacing=0 cellpadding=0 border=0>');
	this.ad_bG(this.ad_aJ,0);
	document.write('</table>');
};

adlistshow.prototype.ad_aj=function(){
	document.write('<table align=center ',(this.ad_aI>0)?'width='.concat(this.ad_aI):'',' cellspacing=0 cellpadding=0 border=0>');
	this.ad_bC(this.ad_aJ,0);
	document.write('</table>');
};

adlistshow.prototype.ad_bF=function(ad_aP,index,ad_aG){
	if(this.face==1){
		document.write('<tr><td id="',this.ad_aL,'_',index,'" style="padding:4px;">');
	}else if(this.face==2){
		document.write('<td id="',this.ad_aL,'_',index,'" style="padding:4px;">');
	}else{
		document.write('<tr><td id="',this.ad_aL,'_',index,'">');
	}
	document.write(ad_g(ad_aP[0],this.ad_aI,this.ad_aH));
	if(ad_aP.length>1){
		var ad_aA=''.concat(this.ad_aL).concat('_').concat(index);
		var ad_ag=this.ad_af;
		var ad_aI=this.ad_aI;
		var ad_aH=this.ad_aH;
		if(this.ad_aU){setTimeout(function(){ad_h(ad_aP,0,ad_aA,ad_ag,ad_aI,ad_aH,1)},ad_ag);}
	}
		if(this.face==2){
			document.write('</td>');
		}else{
			document.write('</td></tr>');
		}
};

adlistshow.prototype.ad_bE=function(ad_aP,ad_aG){
	for(var i=0;i<ad_aP.length;i++){
		if(this.face==1){
			document.write('<tr><td style="padding:4px;">');
		}else if(this.face==2){
			document.write('<td style="padding:4px;">');
		}else{
			document.write('<tr><td>');
		}
		document.write(ad_g(ad_aP[i],this.ad_aI,this.ad_aH));
		if(this.face==2){
			document.write('</td>');
		}else{
			document.write('</td></tr>');
		}
		if(this.face==0){
			document.write('<tr><td height="3"></td></tr>');
		}else if(this.face==0){
			document.write('<td width="3"></td>');
		}
		if(this.face==1&&(i<ad_aP.length-1)){
			document.write('<tr><td height="1" bgcolor="#808080"></td></tr>');
		}
	}
};

adlistshow.prototype.ad_bA=function(ad_aP){
	document.write('<DIV id="subdiv',this.ad_aL,'" style="position:absolute;',(this.ad_aH>0)?'top:'.concat(this.ad_aH):'180',';',(this.ad_aI>0)?'width:'.concat(this.ad_aI):'115',';',(this.ad_aH>0)?'height:'.concat(this.ad_aH):'180',';">');
	document.write(ad_g(ad_aP[0],this.ad_aI,this.ad_aH));
	var ad_aA='subdiv'.concat(this.ad_aL);
	var ad_ag=this.ad_af;
	var ad_aI=this.ad_aI;
	var ad_aH=this.ad_aH;
	setTimeout(function(){ad_v(ad_aP,0,ad_aA,ad_ag,ad_aI,ad_aH)},500);
	document.write('</DIV>');
};

adlistshow.prototype.ad_bB=function(ad_aP){
	if(ad_aP.length<=0)return;
	var ad_aI=this.ad_aI;
	var ad_aH=this.ad_aH;
	var ad_aA=''.concat(this.ad_aL);
	var ad_ag=this.ad_af;
	document.write('<tr><td>');
	document.write('<DIV id="',ad_aA,'" style="position:related;overflow:hidden;width:'.concat(ad_aP[0][0][3]),';height:'.concat(ad_aP[0][0][4]),';">');
	document.write(ad_g(ad_aP[0][0],this.ad_aI,this.ad_aH));if(ad_aP.length>1){}document.write('</DIV></td></tr>');
	document.write('<tr><td align=center id="',ad_aA,'_extend"><font face="Arial" size="1"><b>');
	document.write('<span id="',ad_aA,'_expandcollap" style="cursor:pointer;">M&#7903; r&#7897;ng</span>&nbsp;-&nbsp;');
	document.write('<span id="',ad_aA,'_close" style="cursor:pointer;">&#272;&#243;ng</span>');
	document.write('<input type="hidden" id="',this.ad_aL,'_hidden">');
	document.write('</td></tr>');
	ad_q(ad_aA+'_hidden').value=0;
	ad_q(ad_aA).onmouseover=function(){ad_n(ad_aP,ad_aA,ad_aI,ad_aH)};
	ad_q(ad_aA+'_expandcollap').onclick=function(){ad_n(ad_aP,ad_aA,ad_aI,ad_aH)};
	ad_q(ad_aA+'_close').onclick=function(){ad_j(ad_aA)};
};

function ad_n(ad_aP,ad_Y,ad_aI,ad_aH){
	var index=ad_q(ad_Y+'_hidden').value;
	if(parseInt(ad_q(ad_Y).offsetHeight)<ad_aP[index][1][4]){
		ad_q(ad_Y).style.height=parseInt(ad_q(ad_Y).offsetHeight)+10;
		setTimeout(function(){ad_n(ad_aP,ad_Y,ad_aI,ad_aH)},5);
		return;
	}
	ad_q(ad_Y).onmouseover='undefine';
	ad_q(ad_Y+'_expandcollap').innerHTML='Thu nh&#7887;';
	ad_q(ad_Y+'_expandcollap').onclick=function(){ad_k(ad_aP,ad_Y,ad_aI,ad_aH)};
	ad_q(ad_Y).innerHTML=ad_g(ad_aP[index][1],ad_aI,ad_aH);
};


function ad_k(ad_aP,ad_Y,ad_aI,ad_aH){
	var index=ad_q(ad_Y+'_hidden').value;
	if(parseInt(ad_q(ad_Y).offsetHeight)>ad_aP[index][0][4]){
		ad_q(ad_Y).style.height=parseInt(ad_q(ad_Y).offsetHeight)-10;
		setTimeout(function(){ad_k(ad_aP,ad_Y,ad_aI,ad_aH)},5);
		return;
	}
	ad_q(ad_Y).onmouseover=function(){ad_n(ad_aP,ad_Y,ad_aI,ad_aH)};
	ad_q(ad_Y+'_expandcollap').innerHTML='M&#7903; r&#7897;ng';
	ad_q(ad_Y+'_expandcollap').onclick=function(){ad_n(ad_aP,ad_Y,ad_aI,ad_aH)};
	ad_q(ad_Y).innerHTML=ad_g(ad_aP[index][0],ad_aI,ad_aH);
};

function ad_j(ad_Y){
	ad_q(ad_Y).style.display='none';
	ad_q(ad_Y+'_extend').style.display='none';
};

function ad_h(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH,ad_ae){
	var stop;
	stop=0;
	if(ad_ae>=ad_aP.length){stop=1;}
	typeof(ad_ae)=='undefined';
	if(index==ad_aP.length-1){
		index=0;
	}else{index++;}
	ad_q(ad_Y).innerHTML=ad_g(ad_aP[index],ad_aI,ad_aH,'undefined','undefined',stop);
	ad_ae++;
	setTimeout(function(){ad_h(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH,ad_ae)},ad_ag);
};

function ad_i(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH,type){
	if(ad_q(ad_Y+'_status').value=='0'){
		if(index==ad_aP.length-1){index=0;}
		else{index++;}
		if(type==1){
			var ad_aX='';
			ad_aX=ad_aX.concat('<DIV id="').concat(ad_Y).concat('_child" style="position:absolute;top:0px;left:0px;width:').concat(ad_aP[index][3]).concat('px;height:').concat(ad_aP[index][4]).concat('px;">');
			ad_aX=ad_aX.concat(ad_g(ad_aP[index],ad_aI,ad_aH,false,ad_Y));
			ad_aX=ad_aX.concat('</DIV>');
			ad_q(ad_Y).innerHTML=ad_aX;
			ad_p(ad_Y);
		}
	}
			setTimeout(function(){ad_i(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH,type)},ad_ag);
};

adlistshow.prototype.ad_bG=function(ad_aP){
	if(ad_aP.length<=0)return;
	var ad_aI=(this.ad_aI<ad_aP[0][3]&&this.ad_aI>0)?this.ad_aI:ad_aP[0][3];
	var ad_aH=(this.ad_aH<ad_aP[0][4]&&this.ad_aH>0)?this.ad_aH:ad_aP[0][4];
	var ad_aA=''.concat(this.ad_aL);
	var ad_ag=this.ad_af;
	document.write('<tr><td>');document.write('<DIV id="',ad_aA,'" style="position:relative;overflow:hidden;width:'.concat(ad_aI),'px;height:'.concat(ad_aH),'px;">');
	document.write(ad_g(ad_aP[0],this.ad_aI,this.ad_aH,false,ad_aA));
	document.write('</DIV>');
	document.write('<input type="hidden" id="',ad_aA,'_status" value="0">');
	document.write('</td></tr>');
	if(this.ad_aU)setTimeout(function(){ad_i(ad_aP,0,ad_aA,ad_ag,ad_aI,ad_aH,0)},ad_ag);
};

adlistshow.prototype.ad_bC=function(ad_aP){
	if(ad_aP.length<=0)return;
	var ad_aI=(this.ad_aI<ad_aP[0][3]&&this.ad_aI>0)?this.ad_aI:ad_aP[0][3];
	var ad_aH=(this.ad_aH<ad_aP[0][4]&&this.ad_aH>0)?this.ad_aH:ad_aP[0][4];
	var ad_aA=''.concat(this.ad_aL);
	var ad_ag=this.ad_af;
	document.write('<tr><td>');
	document.write('<DIV id="',ad_aA,'_position" style="position:relative;overflow:hidden;width:'.concat(ad_aI),'px;height:'.concat(ad_aH),'px;"></DIV>');
	document.write('<DIV id="',ad_aA,'" style="position:absolute;overflow:hidden;z-index:100;top:0px;left:0px;width:'.concat(ad_aI),'px;height:'.concat(ad_aH),'px;">');
	document.write('</DIV>');
	document.write('<input type="hidden" id="',ad_aA,'_direction" value="',this.direction,'">');
	document.write('<input type="hidden" id="',ad_aA,'_status" value="0">');
	document.write('</td></tr>');
	var ad_U=this;
	setTimeout(function(){ad_U.ad_bD(ad_aP)},300);
};

adlistshow.prototype.ad_bD=function(ad_aP){
	if(ad_aP.length<=0)return;
	var ad_aI=(this.ad_aI<ad_aP[0][3]&&this.ad_aI>0)?this.ad_aI:ad_aP[0][3];
	var ad_aH=(this.ad_aH<ad_aP[0][4]&&this.ad_aH>0)?this.ad_aH:ad_aP[0][4];
	var ad_aA=''.concat(this.ad_aL);
	var ad_ag=this.ad_af;
	var ad_aX='';
	ad_aX=ad_aX.concat('<DIV id="').concat(ad_aA).concat('_child" style="position:absolute;top:0px;left:0px;width:').concat(ad_aP[0][3]).concat('px;height:').concat(ad_aP[0][4]).concat('px;">');
	ad_aX=ad_aX.concat(ad_g(ad_aP[0],this.ad_aI,this.ad_aH,false,ad_aA));
	ad_aX=ad_aX.concat('</DIV>');
	ad_q(ad_aA).innerHTML=ad_aX;
	ad_w(ad_aA,true);
	if(ad_aP.length>1){if(this.ad_aU)setTimeout(function(){ad_i(ad_aP,0,ad_aA,ad_ag,ad_aI,ad_aH,1)},ad_ag);}
};

function ad_w(id,ad_at){
	if(ad_q(id+'_direction')){direction=ad_q(id+'_direction').value;}
	else{direction=0;}
	if(ad_q(id)&&ad_q(id+'_position')){
		var ad_O=ad_r(ad_q(id+'_position'))[1];
		var ad_N=ad_r(ad_q(id+'_position'))[0];
		var ad_M=parseInt(ad_q(id+'_position').offsetHeight);
		var ad_P=parseInt(ad_q(id+'_position').offsetWidth);
		var ad_E=parseInt(ad_q(id).offsetHeight);
		var ad_F=parseInt(ad_q(id).offsetWidth);
		if(direction==0||direction==1){ad_q(id).style.top=ad_O+'px';}
		else{ad_q(id).style.top=ad_O-ad_E+ad_M+'px';}
		if(direction==0||direction==2){ad_q(id).style.left=ad_N+'px';}
		else{ad_q(id).style.left=ad_N-ad_F+ad_P+'px';}
	}
	if(ad_at==true)ad_p(id);
	setTimeout(function(){ad_w(id)},100);
};

function ad_p(id){
	if(ad_q(id+'_direction')){direction=ad_q(id+'_direction').value;}
	else{direction=0;}
	if(ad_q(id)&&ad_q(id+'_position')){
		var ad_C=parseInt(ad_q(id+'_child').offsetHeight);
		var ad_D=parseInt(ad_q(id+'_child').offsetWidth);
		var ad_Q=parseInt(ad_q(id).offsetHeight);
		var ad_R=parseInt(ad_q(id).offsetWidth);
		if(direction==0||direction==1){ad_q(id+'_child').style.top=0+'px';}
		else{ad_q(id+'_child').style.top=ad_Q-ad_C+'px';}
		if(direction==0||direction==2){ad_q(id+'_child').style.left=0+'px';}
		else{ad_q(id+'_child').style.left=ad_R-ad_D+'px';}
	}
};

function expandselfbanner(ad_Y,ad_aI,ad_aH){
	ad_q(ad_Y+'_status').value=1;
	if(ad_q(ad_Y+'_position')){
		ad_q(ad_Y).style.height=ad_aH+'px';
		ad_q(ad_Y).style.width=ad_aI+'px';
		ad_w(ad_Y);
		ad_p(ad_Y);
		return;
	}
	var ad_z=parseInt(ad_q(ad_Y).offsetHeight);
	var ad_A=parseInt(ad_q(ad_Y).offsetWidth);
	if((ad_z<ad_aH-10)||(ad_A<ad_aI-10)){
		if(ad_z<ad_aH-10){ad_q(ad_Y).style.height=ad_z+10+'px';}
		else{ad_q(ad_Y).style.height=ad_aH+'px';}
		if(ad_A<ad_aI-10){ad_q(ad_Y).style.width=ad_A+10+'px';}
		else{ad_q(ad_Y).style.width=ad_aI+'px';}
		ad_w(ad_Y);
		ad_p(ad_Y);
		setTimeout(function(){expandselfbanner(ad_Y,ad_aI,ad_aH)},5);
		return;
	}else{
		ad_q(ad_Y).style.height=ad_aH+'px';
		ad_q(ad_Y).style.width=ad_aI+'px';
		ad_w(ad_Y);
		ad_p(ad_Y);
	}
};

function collapselfbanner(ad_Y,ad_aI,ad_aH){
	if(ad_q(ad_Y+'_position')){
		ad_q(ad_Y).style.height=ad_aH+'px';
		ad_q(ad_Y).style.width=ad_aI+'px';
		ad_w(ad_Y);ad_p(ad_Y);
		return;
	}
	var ad_z=parseInt(ad_q(ad_Y).offsetHeight);
	var ad_A=parseInt(ad_q(ad_Y).offsetWidth);
	if((ad_z>ad_aH+10)||(ad_A>ad_aI+10)){
		if(ad_z>ad_aH+10){ad_q(ad_Y).style.height=ad_z-10+'px';
		}else{ad_q(ad_Y).style.height=ad_aH+'px';}
		if(ad_A>ad_aI+10){ad_q(ad_Y).style.width=ad_A-10+'px';}
		else{ad_q(ad_Y).style.width=ad_aI+'px';}
		ad_w(ad_Y);
		ad_p(ad_Y);
		setTimeout(function(){collapselfbanner(ad_Y,ad_aI,ad_aH)},5);
		return;
	}
	else{
		ad_q(ad_Y).style.height=ad_aH+'px';
		ad_q(ad_Y).style.width=ad_aI+'px';
		ad_w(ad_Y);
		ad_p(ad_Y);
		ad_q(ad_Y+'_status').value=0;
	}
};

function ad_v(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH){
	var ad_au=ad_q(ad_Y);
	if(!ad_au)return;
	var ad_aR=parseInt(ad_au.style.top);
	ad_aR=ad_aR-Math.round(parseInt(ad_au.style.top)/8)-1;
	if(ad_aR>0){
		ad_au.style.top=ad_aR;
		setTimeout(function(){ad_v(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH)},10);
	}else{
		ad_au.style.top=0;
		setTimeout(function(){ad_m(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH)},ad_ag);
	}
};

function ad_m(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH){
	var ad_au=ad_q(ad_Y);
	if(!ad_au)return;
	var ad_aR=parseInt(ad_au.style.top);
	ad_aR=ad_aR+Math.round((ad_aH-parseInt(ad_au.style.top))/8)+1;
	if(ad_aR<ad_aH){ad_au.style.top=ad_aR;
		setTimeout(function(){ad_m(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH)},10);}
	else{
		ad_au.style.top=ad_aH;
		if(index==ad_aP.length-1){index=0;}
		else{index++;}ad_q(ad_Y).innerHTML=ad_g(ad_aP[index],ad_aI,ad_aH);
		setTimeout(function(){ad_v(ad_aP,index,ad_Y,ad_ag,ad_aI,ad_aH)},5000);
	}
};

function ad_g(ad_aP,ad_aI,ad_aH,ad_ac,zoneid,stop){
	if(!ad_aP){return ''}
	var ad_aX='';
	typeof(stop)=='undefined';
	var ad_aV=(ad_b(ad_aP[0],7).toLowerCase()=='http://')?ad_aP[0]:ad_G.concat(ad_aP[0]);
	if(typeof(ad_ac)=="undefined")ad_ac=true;
	var ad_aD=(ad_aI<ad_aP[3]&&ad_aI>0&&ad_ac)?ad_aI:ad_aP[3];
	var ad_aC=(ad_aH<ad_aP[4]&&ad_aH>0&&ad_ac)?ad_aH:ad_aP[4];
	if(ad_d(ad_aP[0],4).toLowerCase()=='.swf'){
		ad_aX=ad_aX.concat('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" border="0" width=').concat(ad_aD).concat(' height=').concat(ad_aC).concat('>');
		ad_aX=ad_aX.concat('<param name="movie" value="').concat(ad_aV).concat('?link=').concat(escape(ad_f(ad_aP[2].substring(ad_aP[2].lastIndexOf(',')+2),ad_aP[1],false))).concat('&zoneid=').concat(zoneid).concat('&stop=').concat(stop).concat('">');
		ad_aX=ad_aX.concat('<param name="AllowScriptAccess" value="always">');
		ad_aX=ad_aX.concat('<param name="quality" value="High">');
		ad_aX=ad_aX.concat('<param name="wmode" value="transparent">');
		ad_aX=ad_aX.concat('<embed src="').concat(ad_aV).concat('?link=').concat(escape(ad_f(ad_aP[2].substring(ad_aP[2].lastIndexOf(',')+2),ad_aP[1],false))).concat('&zoneid=').concat(zoneid).concat('&stop=').concat(stop).concat('" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" AllowScriptAccess="always" width=').concat(ad_aD).concat(' height=').concat(ad_aC).concat('>');
		ad_aX=ad_aX.concat('</object>');
	}
	else {
		if(ad_aP[1]!=''){
			ad_aX='<img src="'.concat(ad_aV).concat('" onClick="return ad_s(\'').concat(ad_aP[1]).concat('\', ').concat(ad_aP[2]).concat(', 1)" style="cursor:pointer;" border=0 width=').concat(ad_aD).concat(' height=').concat(ad_aC).concat('>');
		}
		else{
			ad_aX='<img src="'.concat(ad_aV).concat('" border=0 width=').concat(ad_aD).concat(' height=').concat(ad_aC).concat('>');
		}
	}
	return ad_aX;
};

adlistshow.prototype.ad_ab=function(ad_aP){
	var ad_aa=false;
	var ad_av;
	if(this.ad_aZ==8){ad_av=ad_aP[9];}
	else{ad_av=ad_aP[6];}
	if(ad_av==3&&this.ad_ad<4)ad_aa=true;
	else if(ad_av==this.ad_ad||ad_av==0)ad_aa=true;
	if(ad_aa&&this.ad_aZ==7){
		ad_aa=false;
		if(typeof(ad_aq)=='undefined')return;
		var ad_ap=new Date(ad_aP[7]);
		var ad_ar=new Date(ad_aP[8]);
		var ad_aw=(ad_aq.getTime()-ad_ap.getTime())/1000;
		var ad_az=(ad_ar.getTime()-ad_aq.getTime())/1000;
		if(ad_aw<5*86400&&ad_aw>=0&&ad_az>5*86400&&ad_az>=0){ad_aa=true;}
	}
	return ad_aa;
};

function ad_u(){ return(Math.random()*10000)-5000;};

function ad_t(ad_bm,vLink,ad_bu,ad_bs,ad_by,ad_bj,ad_bx,ad_bo,ad_bk){
	if(typeof(ad_bk)=='undefined'){ad_bk=false;}
	if(ad_bk){
		var ad_aS=open('/Library/Common/PopupUnder.Asp?ad_bm='.concat(escape(ad_bm)).concat('&vLink=').concat(escape(vLink)).concat('&ad_bu=').concat(escape(ad_bu)),'Popup_'.concat(ad_c(ad_bu,' ','_')),'status=ad_aM,resizable=ad_aM,scrollbars='.concat(ad_bs).concat(',toolbar=ad_aM,location=ad_aM,fullscreen=ad_aM,titlebar=ad_aM,height=').concat(ad_bj).concat(',').concat('width=').concat(ad_by).concat(',').concat('top=').concat(0).concat(',').concat('left=').concat(0));
		var ad_L=vLink;
		window.focus();
		if(ad_aS){ad_aS.blur()};
		return ad_aS;
	}
	else{
		return open('/Library/Common/Popup.Asp?ad_bm='.concat(escape(ad_bm)).concat('&vLink=').concat(escape(vLink)).concat('&ad_bu=').concat(escape(ad_bu)),'Popup_'.concat(ad_c(ad_bu,' ','_')),'status=ad_aM,resizable=ad_aM,scrollbars=ad_aM,toolbar=ad_aM,location=ad_aM,fullscreen=ad_aM,titlebar=yes,height='.concat(ad_bj).concat(',').concat('width=').concat(ad_by).concat(',').concat('top=').concat(ad_bx).concat(',').concat('left=').concat(ad_bo));
	}
};

function ad_s(vLink,ad_bt,ad_br,ad_bs,ad_bw,ad_bp,ad_bi,ad_bv,ad_bg,ad_bj,ad_by,ad_bx,ad_bo,ad_bl,ad_bh){
	var ad_aW=(typeof(vLink.href)=='undefined')?vLink:vLink.href;
	ad_bz='';
	ad_bz=ad_bz.concat('status=').concat((ad_bt)?'yes':'ad_aM').concat(',');
	ad_bz=ad_bz.concat('resizable=').concat((ad_br)?'yes':'ad_aM').concat(',');
	ad_bz=ad_bz.concat('scrollbars=').concat((ad_bs)?'yes':'ad_aM').concat(',');
	ad_bz=ad_bz.concat('toolbar=').concat((ad_bw)?'yes':'ad_aM').concat(',');
	ad_bz=ad_bz.concat('location=').concat((ad_bp)?'yes':'ad_aM').concat(',');
	ad_bz=ad_bz.concat('fullscreen=').concat((ad_bi)?'yes':'ad_aM').concat(',');
	ad_bz=ad_bz.concat('titlebar=').concat((ad_bv)?'yes':'ad_aM').concat(',');
	ad_bz=ad_bz.concat('height=').concat(ad_bj-140).concat(',');
	ad_bz=ad_bz.concat('width=').concat(ad_by).concat(',');
	if(ad_bg){
		ad_bz=ad_bz.concat('top=').concat((screen.height-ad_bj)/2).concat(',');
		ad_bz=ad_bz.concat('left=').concat((screen.width-ad_by)/2);
	}else{
		ad_bz=ad_bz.concat('top=').concat(ad_bx).concat(',');
		ad_bz=ad_bz.concat('left=').concat(ad_bo);
		}
		if(typeof(ad_bh)=='undefined'){ad_bh=0;}
		if(typeof(ad_bl)=='undefined'){ad_bl=0;}
		if(ad_bh){ad_aW=ad_f(ad_bl,ad_aW,true);}
		open(ad_aW,'_blank',ad_bz);
		if(typeof(vLink.href)!='undefined'){return false;}
};

function ad_f(ad_bl,vLink,ad_bq){
	if(ad_bl==7256){return vLink}
	else{
		if(ad_bq==true){
			//return 'http://xinhxinh.com.vn/Service/Counter/?n='.concat(ad_bl).concat('&u=').concat(escape(vLink)).concat('&r=').concat(Math.random());
	        return vLink;		
		}
		else{
			//return 'http://xinhxinh.com.vn/Service/Counter/?n='.concat(ad_bl).concat('&u=').concat(escape(vLink));
	        return vLink;		
		}
	}
};

function ad_a(ad_ao,type,ad_as){
	if(typeof(ad_as)=='undefined'){ad_as=0};
	var ad_ba,ad_bb;
	if(type==1){ad_ba=document.body.clientWidth-115;}
	else{ad_ba=5;}
	if(type==2){ad_bb=document.body.clientHeight;}
	else{ad_bb=0;}
	if(document.body.clientWidth<980){
		ad_ba=-115};
		window.ad_bc=function(ad_au,type,ad_as){
			var ad_ba,ad_bb;
			var ad_aN=(navigator.appName.indexOf("Netscape")!=-1);
			if(type==1){
				ad_ba=document.body.clientWidth-115;
			}
			else{ad_ba=5;}
			if(document.body.clientWidth<980){ad_au.style.display='none';}
			else{
				ad_au.style.display='';
				if(document.documentElement&&document.documentElement.scrollTop) var ad_aR=ad_aN?pageYOffset:document.documentElement.scrollTop;
				else if(document.body) var ad_aR=ad_aN?pageYOffset:document.body.scrollTop;
				if(type==2){ad_bb=document.body.clientHeight-183;}
				else{
					if(document.body.scrollTop>71){ad_bb=3}
					else{ad_bb=71-document.body.scrollTop};
				}
				ad_au.y+=(ad_aR+ad_bb-ad_au.y)/8;
				ad_au.style.left=ad_ba;
				ad_au.style.top=ad_au.y+ad_as;
			}
			setTimeout(function(){ad_bc(ad_au,type,ad_as)},15);
		};
		var ad_au=ad_q(ad_ao);
		if(!ad_au)return;
		ad_au.x=ad_ba;
		ad_au.y=ad_bb;
		ad_bc(ad_au,type,ad_as);
};

function ad_q(ad_aK){
	if(document.getElementById){
		m=document.getElementById(ad_aK)
	}
	else if(document.all){
		m=document.all[ad_aK]
	}
	else if(document.layers){
		m=document[ad_aK]
	}
	return m;
};

function ad_r(ad_aP,ad_aQ){
	var p=ad_aQ?ad_aQ.slice(0):[0,0];
	while(ad_aP){
		p[0]+=ad_aP.offsetLeft;
		p[1]+=ad_aP.offsetTop;
		if(ad_aP.tagName.toUpperCase()=="BODY")break;
		ad_aP=ad_aP.offsetParent;
	}return p;
};

function ad_b(ad_bd,n){
	if(n<=0)return "";
	else if(n>String(ad_bd).length)return ad_bd;
	else return String(ad_bd).substring(0,n);
};

function ad_d(ad_bd,n){
	if(n<=0)return "";
	else if(n>String(ad_bd).length)return ad_bd;
	else{var ad_ax=String(ad_bd).length;
	return String(ad_bd).substring(ad_ax,ad_ax-n);}
};

function ad_c(ad_ay,ad_be,ad_bf){
	var i=0,ad_aO='',j=ad_be.length;
	while(i<ad_ay.length){
		if(ad_ay.substr(i,j)==ad_be){ad_aO+=ad_bf;i+=j}
		else{ad_aO+=ad_ay.charAt(i);i++;}
	}
	return ad_aO;
}

