﻿var domainnums;
var rands;
theDomain = new Array();
domainnums=1;
theDomain[0] = "c.cnxad.com";
theDomain[1] = "c.cnxad.com";
theDomain[2] = "c.cnxad.com";
theDomain[3] = "c.cnxad.com";
if (domainnums>1)
{
  rands = Math.round(Math.random()*domainnums);
  while (rands >(domainnums-1)) {
   rands = Math.round(Math.random()*domainnums);
  }
}else{rands=0}
if (rands==""){rands=0}
var codedomain=theDomain[rands];
var cnxad_location = window.location.href;
var cnxad_from_url = document.referrer;
cnxad_location=encodeURIComponent(cnxad_location);
cnxad_from_url=encodeURIComponent(cnxad_from_url);

    if(self!=top)
    {
	var cnxadkeshibody;
	cnxadkeshibody=document.documentElement;
	if (eval(cnxadkeshibody.clientWidth)<=0)
	{
	document.writeln("<body></body>");
	cnxadkeshibody=document.body;
	}	
	if ((cnxadkeshibody.clientWidth<=(parseInt(cnxad_width)+50))&&(cnxadkeshibody.clientHeight<=(parseInt(cnxad_height)+50)))
	top.location=self.location; 
    }

document.writeln("<div style='position:relative;width:"+cnxad_width+"px;height:"+cnxad_height+"px;border: 1px solid #CCCCCC;'>");
document.writeln("<iframe src='http://"+codedomain+"/c1.ashx?w="+cnxad_userid+"&sid="+cnxad_subid+"&logo="+cnxad_logo+"&e="+cnxad_encode+"&furl="+cnxad_location+"&ffurl="+cnxad_from_url+"' width='"+cnxad_width+"' height='"+cnxad_height+"' marginwidth=0 marginheight=0  scrolling=no border=0 frameborder=0></iframe>");

if (cnxad_logo!="false")
{
	document.writeln("<div style='position:absolute;bottom:0;right:0;'>");
	document.writeln("<a href='http://www.cnxad.com' target='_blank' title='极限传媒提供的广告'>");
	document.writeln("<img alt='极限传媒' src='http://js.cnxad.com/images/logo.gif' border='0' width='88' height='18'></a></div>");
}



document.writeln("</div>");



