function right(str, n)
{
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

function downloadiframe3()
{
	var hasIframe=0;
	var arrIframe=document.getElementsByTagName("IFRAME")
	for(var i=0;i<arrIframe.length;i++)
	{
		if(arrIframe[i].src=="http://software.it168.com/downloadbottom/downloadbottom3.htm")
		{
			hasIframe=1;
			break;
		}
	}
	if(hasIframe==0)
	{
		var Spanhei18=null
		var arrSpan=document.getElementsByTagName("span")
		for(var i=0;i<arrSpan.length;i++)
		{
			if(arrSpan[i].className=='hei18')
			{
				var Spanhei18=arrSpan[i];
				break;
			}
		}
		if(Spanhei18!=null)
		{
			  var SpanBottomAD=document.createElement("Span");
			  SpanBottomAD.setAttribute("id","SpanBottomAD");
			  Spanhei18.appendChild(SpanBottomAD);
			  document.getElementById("SpanBottomAD").innerHTML="<P align='center'><IFRAME marginWidth=0 marginHeight=0 src='http://software.it168.com/downloadbottom/downloadbottom3.htm' frameBorder=0 width=512 scrolling=no height=325></IFRAME></P>"
		}	
	}
}

function downloadiframe4()
{
	var hasIframe=0;
	var arrIframe=document.getElementsByTagName("IFRAME")
	for(var i=0;i<arrIframe.length;i++)
	{
		if(arrIframe[i].src=="http://software.it168.com/downloadbottom/downloadbottom4.htm")
		{
			hasIframe=1;
			break;
		}
	}
	if(hasIframe==0)
	{
		var Spanhei18=null
		var arrSpan=document.getElementsByTagName("td")
		for(var i=0;i<arrSpan.length;i++)
		{
			if(arrSpan[i].background=='/images/750x249.jpg')
			{
				var Spanhei18=arrSpan[i];
				break;
			}
		}
		if(Spanhei18!=null)
		{
			  var SpanBottomAD=document.createElement("div");
			  SpanBottomAD.setAttribute("id","SpanBottomAD");
			  Spanhei18.appendChild(SpanBottomAD);
			  document.getElementById("SpanBottomAD").innerHTML="<P align='center'><IFRAME marginWidth=0 marginHeight=0 src='http://software.it168.com/downloadbottom/downloadbottom4.htm' frameBorder=0 width=750 scrolling=no height=204></IFRAME></P>"
		}	
	}
}

if (location.hostname=="download.it168.com")
{
	if (right(location.href, 7)=='3.shtml')
	{
		downloadiframe3();
	}

	if (right(location.href, 7)=='4.shtml')
	{
		downloadiframe4();
	}
}

document.write("<style type=text/css>")
document.write("A.end:link {font-size: 12px; color: #0000ff;text-decoration: none}")
document.write("A.end:visited {font-size: 12px; color: #0000ff;text-decoration: none}")
document.write("A.end:hover {font-size: 12px; color: red; text-decoration: underline}")
document.write("</style>")

document.write(" <table width='760' border='0' cellspacing='0' cellpadding='0' bgcolor='#3073B7'>")
document.write("    <tr> ")
document.write("      <td width='5'></td>")
document.write("      <td width='760' height='40' align='right'><a class=end href=\"http://www4.it168.com/bottom/2008.xls\" target=_blank><b><font color=\"#CCFF66\">IT168广告刊例（2008年）</font></b></a></td>")
document.write("      <td width='5'></td>")
document.write("    </tr>")
document.write("  </table>")
document.write("<table cellspacing=0 cellpadding=0 width=760 bgcolor=#ffffff border=0>")
document.write("  <tr> ")
document.write("    <td height=\"6\"></td>")
document.write("  </tr>")
document.write("  <tr>")
document.write("    <td height=\"3\" bgcolor=\"#CCCCCC\"></td>")
document.write("  </tr>")
document.write("  <tr> ")
document.write("    <td height=35 align=\"center\"><a class=end href=\"http://www.it168.com/bottomfile/about.shtml\" target=_blank>关于我们</a> ")
document.write("      | <a class=end href=\"http://www.it168.com/bottomfile/it168.shtml\" target=_blank>关于IT168</a> ")
document.write("      | <a class=end href=\"http://www.it168.com/bottomfile/hzhb.shtml\" target=_blank>合作伙伴</a> ")
document.write("      | <a class=end href=\"http://www.it168.com/bottomfile/ggfw.shtml\" target=_blank>广告服务</a> ")
document.write("      | <a class=end href=\"http://www.it168.com/bottomfile/sytk.shtml\" target=_blank>使用条款</a> ")
document.write("      | <a class=end href=\"http://www.it168.com/bottomfile/tgzn.shtml\" target=_blank>投稿指南</a> ")
document.write("      | <a class=end href=\"http://hr.it168.com/front/index.aspx\" target=_blank>诚聘精英</a> ")
document.write("      | <a class=end href=\"http://www.it168.com/bottomfile/lxwm.shtml\" target=_blank>联系我们</a> ")
document.write("      | <a class=end href=\"http://www.it168.com//bottomfile/flgw/fl.htm\" target=_blank>法律顾问</a> ")
document.write("      | <a class=end href=\"http://www.it168.com/bottomfile/sitemap/sitemap.html\" target=_blank>网站地图</a> ")
document.write("    </td>")
document.write("  </tr>")
document.write("  <tr> ")
document.write("    <td height=35 align=\"center\">CopyRight 1999-2008 www.it168.com ")
document.write("      All Rights Reserved.<br>")
document.write("      北京皓辰网域网络信息技术有限公司. 版权所有 E-mail:<a class=end")
document.write("      href=\"mailto:Webmaster@it168.com\">Webmaster@it168.com</a> </td>")
document.write("  </tr>")
document.write("  <tr> ")
document.write("    <td height=6 align=\"center\"></td>")
document.write("  </tr>")
document.write("  <tr> ")
document.write("    <td align=\"center\"> ")
document.write("      <table cellspacing=0 cellpadding=0 width=760 border=0>")
document.write("        <tr> ")
document.write("          <td align=center width=\"100%\"><a href='http://www.miibeian.gov.cn' target='_blank' style='color:#000000'>京ICP证:060528号</a></td>")
document.write("          <td align=left></td>")
document.write("        </tr>")
document.write("      </table>")
document.write("    </td>")
document.write("  </tr>")
document.write("</table>")

document.write('<script language="javascript" src="http://stat.it168.com/pv.js"></script>')
document.write('<script type="text/javascript" src="http://it168.wrating.com/a1.js"></script>')

window.onload = function()
{
    window.setTimeout("sendPV()", 3);
    var vjAcc="860010-2083061100";
    var wrUrl="http://it168.wrating.com/";
    vjTrack("");
}

function sendPV(){
    var pvTrack = new PvTrack();
    pvTrack.type = 19; // 频道类别ID
    pvTrack.channel = 71; // 频道ID
    pvTrack.pageType = 0;
    pvTrack.track();
}