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://images.ttnet.net") == 0 || location.href.indexOf("http://cnews.ttnet.net") == 0 ){
    var j_url = "http://tw.ttnet.net";
}
if (location.href.indexOf("tw.ttnet.net") > 0){
    var j_url = "http://tw.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+'/cbuyer.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 valign=top align=center><a href="'+j_url+'/index.shtml" target="_top"><img src="http://images.ttnet.net/pi/cimages/index/ttnet_logo.jpg" width="126" height="52" border=0></a></td>');
   document.writeln('<td height=48 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=middle width=53 height=19><a class=j-1 href="'+j_url+'/cttnet-bin/clogin.cgi?log=Y&cooklang=1&PV=BA.B'+icartNo1+'" target="_top">會員登入</a></td>');
      document.writeln('<td align=middle width=7 height=19><font color=#00659a size=2>|</font></td>');
      document.writeln('<td align=middle width=53 height=19><a class=j-1 href="'+j_url+'/cfree_membership.shtml?PV=B9.B'+icartNo1+'" target="_top">加入會員</a></td>');
      document.writeln('<td align=middle width=7 height=19><font color=#00659a size=2>|</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">登出</a></td>');
      document.writeln('<td align="center" width="7" height="19"><font size="2" color="#00659A">|</font></td>');
      document.writeln('<td align=middle width=53 height=19><a class=j-1 href="'+j_url+'/html/qna/index.htm?PV=BD.B'+icartNo1+'" target="_top">常見問題</a></td>');
      document.writeln('<td align=middle width=7 height=19><font color=#00659a size=2>|</font></td>');
   }
   document.writeln('<td align=middle width=53 height=19><a class=j-1 href="'+j_url+'/what_do.htm?PV=BB.B'+icartNo1+'" target="_top">服務項目</a> </td>');
   document.writeln('</tr>');
   document.writeln('</table>');
   document.writeln('</td></tr></table>');
   document.writeln('</td></tr>');
   document.writeln('<tr><td colspan=2 valign=top align=center>');
   document.writeln('<table width="100%" border="0" cellpadding="0" cellspacing="0" height="26">');
   document.writeln('<tr><td align=right width=635>');

   document.writeln('            <table border="0" cellpadding="0" cellspacing="0">');
   document.writeln('              <tr> ');
   document.writeln('                <td width="7" valign="bottom"> ');
   document.writeln('                  <div align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="7" height="26"></div>');
   document.writeln('                </td>');
   document.writeln('                <td width="41" align="center" valign="bottom"> ');
   document.writeln('                  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="26" background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg">');
   document.writeln('                    <tr> ');
   document.writeln('                      <td> ');
   document.writeln('                        <div align="center"><a href="'+j_url+'/index.shtml'+icartNo+'" class="vig_g" target="_top">首頁</a></div>');
   document.writeln('                      </td>');
   document.writeln('                    </tr>');
   document.writeln('                  </table>');
   document.writeln('                </td>');
   document.writeln('                <td width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></div>');
   document.writeln('                </td>');
   document.writeln('                <td width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><img src="http://images.ttnet.net/pi/cimages/index/r_bu_1.gif" width="4" height="26"></div>');
   document.writeln('                </td>');
   document.writeln('                <td width="60" class="bm3" valign="bottom"> ');
   document.writeln('                  <table width="60" border="0" cellspacing="0" cellpadding="0" height="26" background="http://images.ttnet.net/pi/cimages/index/r_bu_3.gif">');
   document.writeln('                    <tr> ');
   document.writeln('                      <td> ');
   document.writeln('                        <div align="center"><a href="/cbuyer.shtml" class="vig_g" style="text-decoration:none;" target="_top"><font class="c">買主服務</font></a></div>');
   document.writeln('                      </td>');
   document.writeln('                    </tr>');
   document.writeln('                  </table>');
   document.writeln('                </td>');
   document.writeln('                <td class="bm3" width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><u><img src="http://images.ttnet.net/pi/cimages/index/r_bu_2.gif" width="4" height="26"></u></div>');
   document.writeln('                </td>');
   document.writeln('                <td class="bm3" width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><u><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></u></div>');
   document.writeln('                </td>');
   document.writeln('                <td width="60" class="bm3" valign="bottom"> ');
   document.writeln('                  <table width="60" border="0" cellspacing="0" cellpadding="0" height="26" background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg">');
   document.writeln('                    <tr> ');
   document.writeln('                      <td> ');
   document.writeln('                        <div align="center"><u><a href="'+j_url+'/cttnet-bin/csupplier.cgi?cooklang=1'+icartNo1+'" class="vig_g" target="_top">廠商服務</a></u></div>');
   document.writeln('                      </td>');
   document.writeln('                    </tr>');
   document.writeln('                  </table>');
   document.writeln('                </td>');
   document.writeln('                <td class="bm3" width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><u><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></u></div>');
   document.writeln('                </td>');
   document.writeln('                <td class="bm3" width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><u><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></u></div>');
   document.writeln('                </td>');
   document.writeln('                <td width="60" class="bm3" valign="bottom"> ');
   document.writeln('                  <table width="60" border="0" cellspacing="0" cellpadding="0" height="26" background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg">');
   document.writeln('                    <tr> ');
   document.writeln('                      <td> ');
   document.writeln('                        <div align="center"><u><a href="'+j_url+'/cstockboard.shtml'+icartNo+'" class="vig_g" target="_top">買賣看板</a></u></div>');
   document.writeln('                      </td>');
   document.writeln('                    </tr>');
   document.writeln('                  </table>');
   document.writeln('                </td>');
   document.writeln('                <td class="bm3" width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><u><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></u></div>');
   document.writeln('                </td>');
   document.writeln('                <td class="bm3" width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><u><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></u></div>');
   document.writeln('                </td>');
   document.writeln('                <td width="60" class="bm3" height="36" valign="bottom"> ');
   document.writeln('                  <table width="60" border="0" cellspacing="0" cellpadding="0" height="26" background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg">');
   document.writeln('                    <tr> ');
   document.writeln('                      <td> ');
   document.writeln('                        <div align="center"><u><a href="'+j_url+'/cshow.shtml'+icartNo+'" class="vig_g" target="_top">展覽情報</a></u></div>');
   document.writeln('                      </td>');
   document.writeln('                    </tr>');
   document.writeln('                  </table>');
   document.writeln('                </td>');
   document.writeln('                <td class="bm3" width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><u><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></u></div>');
   document.writeln('                </td>');
   document.writeln('                <td class="bm3" width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><u><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></u></div>');
   document.writeln('                </td>');
   document.writeln('                <td width="60" class="bm3" valign="bottom"> ');
   document.writeln('                  <table width="60" border="0" cellspacing="0" cellpadding="0" height="26" background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg">');
   document.writeln('                    <tr> ');
   document.writeln('                      <td> ');
   document.writeln('                        <div align="center"><u><a href="'+j_url+'/putbookc.shtml'+icartNo+'" class="vig_g" target="_top">貿易專刊</a></u></div>');
   document.writeln('                      </td>');
   document.writeln('                    </tr>');
   document.writeln('                  </table>');
   document.writeln('                </td>');
   document.writeln('                <td width="4" valign="bottom"> ');
   document.writeln('                  <div align="center"><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></div>');
   document.writeln('                </td>');
   document.writeln('                <td width="4" valign="bottom"><u><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></u></td>');
   document.writeln('                <td width="60" valign="bottom"> ');
   document.writeln('                  <table width="60" border="0" cellspacing="0" cellpadding="0" height="26" background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg">');
   document.writeln('                    <tr> ');
   document.writeln('                      <td> ');
   document.writeln('                        <div align="center"><u><a href="javascript:gotourl(news,1);" class="vig_g" target="_top">商貿資訊</a></u></div>');
   document.writeln('                      </td>');
   document.writeln('                    </tr>');
   document.writeln('                  </table>');
   document.writeln('                </td>');
   document.writeln('                <td width="4" valign="bottom"><img src="http://images.ttnet.net/pi/cimages/index/r-2-1.jpg" width="4" height="26"></td>');

   document.writeln('                <td width="4" valign="bottom"><u><img src="http://images.ttnet.net/pi/cimages/index/r-1-1.jpg" width="4" height="26"></u></td>');
   document.writeln('                <td width="60" valign="bottom"> ');
   document.writeln('                  <table width="60" border="0" cellspacing="0" cellpadding="0" height="26" background="http://images.ttnet.net/pi/cimages/index/rbk-1.jpg">');
   document.writeln('                    <tr> ');
   document.writeln('                      <td> ');
   document.writeln('                        <div align="center"><u><a href="'+j_url+'/cttnet-bin/cbusiness.cgi?&cooklang=1'+icartNo1+'" class="vig_g" target="_top">商業服務</a></u></div>');
   document.writeln('                      </td>');
   document.writeln('                    </tr>');
   document.writeln('                  </table>');
   document.writeln('                </td>');
   document.writeln('                <td width="4" valign="bottom"><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=1&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=1&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=1&PV=BC.B'+icartNo1+'" class="j-1" target="_top">詢價車..</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="60" align="center"><font color="#CCCCCC"><a href="'+j_url+'/html/csearch/csearch_keyword.htm?PV=B1.B'+icartNo1+'" class="bm2" target="_top">關鍵字搜尋</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/csearch.htm?PV=B2.B'+icartNo1+'" class="bm2" target="_top">分類搜尋</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="60" align="center"><font color="#CCCCCC"><a href="'+j_url+'/cttnet-bin/cprod_wanted.cgi?form=Y&cooklang=1&PV=B3.B'+icartNo1+'" class="bm2" target="_top">代客搜尋</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=1&PV=B4.B'+icartNo1+'" class="bm2" target="_top">資料修改</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="60" align="center"><font color="#CCCCCC"><a href="'+j_url+'/cttnet-bin/cinq_manager.cgi?inqtabl.x=Y&cooklang=1&PV=B5.B'+icartNo1+'" class="bm2" target="_top">詢價紀錄</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=1&PV=B6.B'+icartNo1+'" class="bm2" target="_top">我的廠商名錄</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=1&PV=B7.B'+icartNo1+'" class="bm2" target="_top">我的文筆</a></font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="1"><font color="#CCCCCC">|</font></td>');
   document.writeln('<td bgcolor="#8C9D45" width="87" align="center"><font color="#CCCCCC" class="bm2"><a href="'+j_url+'/cttnet-bin/cbiz_alert.cgi?alert02=Y&cooklang=1&PV=G42.B'+icartNo1+'" class="bm2" target="_top">線上商品推薦</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; 
} 
