var jcartNo			= getCartNo();
var icartNo  = "";
var icartNo1 = "";
if ( jcartNo != "" ){
    var icartNo = "?cartno=" + jcartNo;
    var icartNo1 = "&cartno=" + jcartNo;
}

var j_url  = "";
if (location.href.indexOf("https") == 0 || location.href.indexOf("http://wenbi.ttnet.net") == 0 || location.href.indexOf("cn.ttnet.net") > 0){
    var j_url = "http://cn.ttnet.net";
}

document.writeln('<style type="text/css">');
document.writeln('<!--');
document.writeln('.vig_g {  font-family: "细明体"; font-size: 12px; color: #8C9D45}');
document.writeln('-->');
document.writeln('</style>');

function html_top(jj_url,j_gif){
   if (jj_url == '') { 
      jj_url = j_url+'/scbuyer.shtml'+icartNo; 
   } else if (jj_url.indexOf("?") != -1) {  
      jj_url = j_url+jj_url+icartNo1; 
   } else {
      jj_url = j_url+jj_url+icartNo; 
   }  

   document.writeln('<table cellspacing=0 cellpadding=0 width=775 align=center border=0>');
   document.writeln('<tr>');
   document.writeln('<td width=155><a href="'+j_url+'/index.shtml'+icartNo+'" target="_top"><img  src="http://images.ttnet.net/pi/cimages/index/ttnet_logo.jpg" border=0></a></td>');
   document.writeln('<td height=58 width=620>');
   document.writeln('<table width="100%" border="0" cellpadding="0" cellspacing="0" background="http://images.ttnet.net/pi/cimages/index/bk-1.jpg" height="40">');
   document.writeln('<tr><td valign="bottom"><a href='+jj_url+' target="_top"><img src="http://images.ttnet.net/pi/cimages/'+j_gif+'" border="0"></a></td>');
   document.writeln('<td valign="bottom" align="right">');
   document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="0" height="32">');
   document.writeln('<tr valign="middle">');
   var j_id = GetCookie("CNEWSID"); 
   if (j_id == null || j_id == 'null'){
      document.writeln('<td align="center" width="53" height="19"><a href="'+j_url+'/cttnet-bin/clogin.cgi?log=Y&cooklang=2&PV=BA.B'+icartNo1+'" class="j-1" target="_top">'+unicode("会员登录")+'</a></td>');
      document.writeln('<td align="center" width="7" height="19"><font size="2" color="#00659A">|</font></td>');
      document.writeln('<td align="center" width="53" height="19"><a href="'+j_url+'/scfree_membership.shtml?PV=B9.B'+icartNo1+'" class="j-1" target="_top">'+unicode("加入会员")+'</a></td>');
      document.writeln('<td align="center" width="7" height="19"><font size="2" color="#00659A">|</font></td>');
   }else{
      document.writeln('<td align="center" width="26" height="19"><a href="'+j_url+'/cttnet-bin/c_logout.cgi'+icartNo+'" class="j-1" target="_top">'+unicode("退出")+'</a></td>');
      document.writeln('<td align="center" width="7" height="19"><font size="2" color="#00659A">|</font></td>');
      document.writeln('<td align="center" width="53" height="19"><a href="'+j_url+'/html/qna/sindex.htm?PV=BD.B'+icartNo1+'" class="j-1" target="_top">'+unicode("常见问题")+'</a></td>');
      document.writeln('<td align="center" width="7" height="19"><font size="2" color="#00659A">|</font></td>');
   }
   document.writeln('<td align="center" width="53" height="19"><a href="'+j_url+'/swhat_do.htm?PV=BB.B'+icartNo1+'" class="j-1" target="_top">'+unicode("服务项目")+'</a></td>');
   document.writeln('</tr>');
   document.writeln('</table>');
   document.writeln('</td></tr></table>');
   document.writeln('</td></tr>');
   document.writeln('<tr><td colspan=2>');
   document.writeln('<table width="100%" border="0" cellpadding="0" cellspacing="0" height="26">');
   document.writeln('<tr><td align="center" width="695">');
   document.writeln('<table border="0" cellpadding="0" cellspacing="0" height="26">');
   document.writeln('<tr><td width=70> </td><td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></td>');
   document.writeln('<td background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg" width="41" align="center" height="26">');
   document.writeln('<a href="'+j_url+'/index.shtml'+icartNo+'" class="vig_g" target="_top">'+unicode("首页")+'</a></td>');
   document.writeln('<td width=4 height=26 align=center><img height=26 src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width=4></td>');
   document.writeln('<td class=bm3 width=4 height=26 align=center><img height=26 src="http://images.ttnet.net/pi/cimages/index/r_bu_1.gif" width=4></td>');
   document.writeln('<td class=bm3 width=66 background=http://images.ttnet.net/pi/cimages/index/r_bu_3.gif height=26  align=center>');
   document.writeln('<a class=vig_g href="'+j_url+'/scbuyer.shtml'+icartNo+'" style="text-decoration:none;" target="_top"><font class="c">'+unicode("买主服务")+'</font></a>');
   document.writeln('</td>');
   document.writeln('<td class=bm3 width=4 height=26 align=center><img height=26 src="http://images.ttnet.net/pi/cimages/index/r_bu_2.gif" width=4></td>');   
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></td>');
   document.writeln('<td background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg" width="67" class="bm3" height="26" align="center">');
   document.writeln('<a href="'+j_url+'/cttnet-bin/csupplier.cgi?cooklang=2'+icartNo1+'" class="vig_g" target="_top">'+unicode("厂商服务")+'</a>');
   document.writeln('</td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></td>');
   document.writeln('<td background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg" width="74" class="bm3" height="26" align="center">');
   document.writeln('<a href="'+j_url+'/scstockboard.shtml'+icartNo+'" class="vig_g" target="_top">'+unicode("买卖看板")+'</a>');
   document.writeln('</td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></td>');
   document.writeln('<td background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg" width="66" class="bm3" height="26" align="center">');
   document.writeln('<a href="'+j_url+'/scshow.shtml'+icartNo+'" class="vig_g" target="_top">'+unicode("商展资讯")+'</a>');
   document.writeln('</td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></td>');
   document.writeln('<td background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg" width="70" class="bm3" height="26" align="center">');
   document.writeln('<a href="'+j_url+'/sputbookc.shtml'+icartNo+'" class="vig_g" target="_top">'+unicode("贸易专刊")+'</a>');
   document.writeln('</td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></td>');
   document.writeln('<td background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg" width="68" class="bm3" height="26" align="center">');
   document.writeln('<a href="'+j_url+'/epaper/sepaper_index.htm'+icartNo+'" class="vig_g" target="_top">'+unicode("商贸资讯")+'</a>');
   document.writeln('</td>');
   document.writeln('<td width="4" height="26" align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></td>');
   document.writeln('</tr>');
   document.writeln('</table>');
   document.writeln('</td>');
   document.writeln('<td valign="middle" align="right">');
   document.writeln('<table border="0" cellpadding="0" cellspacing="0" height="22">');
   document.writeln('<tr valign="bottom">');

   var j_cart = GetCookie("CCARTCNT"); 
   if (j_cart == null || j_cart == 'null' || j_cart == 'N'){
      document.writeln('<td width="25" align="center"><a href="'+j_url+'/cttnet-bin/cinq_manager.cgi?chkcart=Y&cooklang=2&PV=BC.B'+icartNo1+'" target="_top"><img src="http://images.ttnet.net/pi/cimages/index/car0.gif" width="19" height="17" border="0"></a></td>');
   } else {
      document.writeln('<td width="25" align="center"><a href="'+j_url+'/cttnet-bin/cinq_manager.cgi?chkcart=Y&cooklang=2&PV=BC.B'+icartNo1+'" target="_top"><img src="http://images.ttnet.net/pi/cimages/index/car1.gif" width="19" height="17" border="0"></a></td>');
   } 

   document.writeln('<td width="50" align="center">');
   document.writeln('<a href="'+j_url+'/cttnet-bin/cinq_manager.cgi?chkcart=Y&cooklang=2&PV=BC.B'+icartNo1+'" class="j-1" target="_top">'+unicode("询价车")+'..</a>');
   document.writeln('</td></tr></table>');
   document.writeln('</td></tr></table>');
   document.writeln('</td></tr></table>');
   document.writeln('<table border="0" align="center" cellpadding="0" cellspacing="0" height="23" bgcolor="#8C9D45" width="775">');
   document.writeln('<tr><td align="center">');
   document.writeln('<table border="0" align="center" cellpadding="0" cellspacing="0" height="18">');
   document.writeln('<tr valign="bottom">');
   document.writeln('<td bgcolor="#8C9D45" align="center">&nbsp;</td>');
   document.writeln('<td bgcolor="#8C9D45" width="62" align="center"><font color="#CCCCCC"><a href="'+j_url+'/html/csearch/scsearch_keyword.htm?PV=B1.B'+icartNo1+'" class="bm2" target="_top">'+unicode("关键字搜寻")+'</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="61" align="center"><font color="#CCCCCC"><a href="'+j_url+'/html/csearch/scsearch.htm?PV=B2.B'+icartNo1+'" class="bm2" target="_top">'+unicode("分类搜寻")+'</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="61" align="center"><font color="#CCCCCC" class="bm2"><a href="'+j_url+'/cttnet-bin/cprod_wanted.cgi?form=Y&cooklang=2&PV=B3.B'+icartNo1+'" class="bm2" target="_top">'+unicode("代客搜寻")+'</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="61" align="center"><font color="#CCCCCC"><a href="'+j_url+'/cttnet-bin/cuser_edit.cgi?edit=Y&cooklang=2&PV=B4.B'+icartNo1+'" class="bm2" target="_top">'+unicode("资料修改")+'</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="61" align="center"><font color="#CCCCCC"><a href="'+j_url+'/cttnet-bin/cinq_manager.cgi?inqtabl.x=Y&cooklang=2&PV=B5.B'+icartNo1+'" class="bm2" target="_top">'+unicode("询价纪录")+'</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="61" align="center"><font color="#CCCCCC"><a href="'+j_url+'/cttnet-bin/ce_myset.cgi?cooklang=2&PV=B6.B'+icartNo1+'" class="bm2" target="_top">'+unicode("我的文笔")+'</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="85" align="center"><font color="#CCCCCC"><a href="'+j_url+'/cttnet-bin/clovemain.cgi?showhtml=Y&cooklang=2&PV=B7.B'+icartNo1+'" class="bm2" target="_top">'+unicode("我的厂商名录")+'</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="85" align="center"><font color="#CCCCCC"><a href="'+j_url+'/cttnet-bin/cbiz_alert.cgi?alert02=Y&cooklang=2&PV=G42.B'+icartNo1+'" class="bm2" target="_top">'+unicode("线上商品推荐")+'</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" align="center">&nbsp;</td>');
   document.writeln('</tr>');
   document.writeln('</table>');
   document.writeln('</td>');
   document.writeln('</tr>');
   document.writeln('</table>');
}
//耝Cookie 
function GetCookie(name) { 
var result = null; 
var myCookie = document.cookie + ";"; 
var searchName = name + "="; 
var startOfCookie = myCookie.indexOf(searchName); 
var endOfCookie; 
if (startOfCookie != -1) { 
startOfCookie += searchName.length; 
endOfCookie = myCookie.indexOf(";",startOfCookie); 
result = unescape(myCookie.substring(startOfCookie, endOfCookie)); 
} 
return result; 
} 
