function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function basket()
{
   wmapd = window.open('http://cn.ec21.com/app/servlet/CRequestProcessor?event=CMyInquiryBasketList.Click','new', 'toolbar=no,alwaysRaised=yes,location=no,status=1,menubar=no,scrollbars=yes,width=616,height=533,resizable=no,hotkey=no');
   wmapd.focus;
}

function userCookie(name)
{
    var arg = name + "=";
    var alen = arg.length;
    var clen=document.cookie.length;
    var i=0;

    while(i< clen){
        var j = i+alen;
        if(document.cookie.substring(i,j)==arg) {
            var end = document.cookie.indexOf(";",j);
            if (end == -1) {
                end = document.cookie.length;
            }
            return unescape(document.cookie.substring(j,end));
        }
        i = document.cookie.indexOf(" ",i)+1;
        if (i==0) {
            break;
        }
    }
    return null;
}

function parse( OrgStr, Delimiter )
{
	param = new Array()
	if ( OrgStr == null || OrgStr == "")
	{
		return param;
	}
	var pos = 0;
	var i = 0;
	var Val = "";

	while ( (pos = OrgStr.indexOf(Delimiter)) > 0 )
	{
		Val = OrgStr.substring(0, pos);
		param[i] = Val;
		OrgStr = OrgStr.substring(pos+1, OrgStr.length);
		++i;
	}
	return param;
}

var TotalCount = 0;
var inquiries = "";
inquiries = userCookie("CProductInquiry");
collect = parse(inquiries, "~");
TotalCount += collect.length;
inquiries = userCookie("CTradeInquiry");
collect = parse( inquiries, "~" );
TotalCount += collect.length;
inquiries = userCookie("CCompanyInquiry");
collect = parse(inquiries, "~");
TotalCount += collect.length;

document.writeln("<link rel=\"stylesheet\" href=\"http://cn.ec21.com/ec21_cn_index.css\" type=\"text/css\">");
document.writeln("<style type=\"text/css\">");
document.writeln("<!--");
document.writeln(":root .header_menu{margin-top:-5px}");
document.writeln(".header_right{float:none}");
document.writeln("-->");
document.writeln("</style>");
document.writeln("<div class=\"container\" style=\"margin-bottom: 1px; width: 100%\">");
document.writeln("		<div id=\"header\"> ");
document.writeln("						<div id=\"logo\"><a href=\"http://cn.ec21.com/\"><img src=\"http://image.ec21.com/cimg/main/ec21_logo.gif\" title=\"EC21\" alt=\"EC21\" border=\"0\"></a></div> ");
document.writeln("						<div class=\"header_right\"> ");
document.writeln("								<div class=\"header_link\"><a href=\"http://cn.ec21.com/app/servlet/CRequestProcessor?event=CSuccessStoryList.Click\">成功故事</a> <img src=\"http://cn.ec21.com/cimages/bottom_dot.gif\" vspace=\"5\" align=\"absmiddle\" width=\"11\" height=\"11\"> <a href=\"http://www.cjol.com/Co_Site/ec21/default.asp\">人才热线</a> <img src=\"http://cn.ec21.com/cimages/bottom_dot.gif\" vspace=\"5\" align=\"absmiddle\" width=\"11\" height=\"11\"> <a href=\"javascript:basket();\"> <img src=\"http://cn.ec21.com/images/app/cec/icon_basket.gif\" align=\"absmiddle\" border=\"0\" width=\"15\" height=\"13\">询盘篮[ "); 
document.write(TotalCount);
document.writeln(" ]</a> ");
if ( getCookie("cuser") != null )
		document.write("<img src=\"http://cn.ec21.com/cimages/bottom_dot.gif\" vspace=\"5\" align=\"absmiddle\" width=\"11\" height=\"11\"> <a href=\"http://cn.ec21.com/app/servlet/CRequestProcessor?event=CLogout.Click\">退出</a> ");
else
		document.write("<img src=\"http://cn.ec21.com/cimages/bottom_dot.gif\" vspace=\"5\" align=\"absmiddle\" width=\"11\" height=\"11\"> <a href=\"http://cn.ec21.com/app/servlet/CRequestProcessor?event=CLogin.Click&nextEvent=CMyEC21.Click\">登录</a> ");
document.writeln("		<img src=\"http://cn.ec21.com/cimages/bottom_dot.gif\" vspace=\"5\" align=\"absmiddle\" width=\"11\" height=\"11\"> <a href=\"http://cn.ec21.com/info/sitemap.html\">站点地图</a> ");
document.writeln("								</div> ");
document.writeln("								<div class=\"header_menu\"> <a href=\"http://cn.ec21.com/info/premium_pro01.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('topmenu_1','','http://image.ec21.com/cimg/main/header_menu1_on.gif',1)\"><img src=\"http://image.ec21.com/cimg/main/header_menu1.gif\" name=\"topmenu_1\" width=\"80\" height=\"26\" border=\"0\"></a><a href=\"http://cn.ec21.com/info/help.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('topmenu_2','','http://image.ec21.com/cimg/main/header_menu2_on.gif',1)\"><img src=\"http://image.ec21.com/cimg/main/header_menu2.gif\" name=\"topmenu_2\" width=\"62\" height=\"26\" border=\"0\"></a><a href=\"http://search2.ec21.com/search/ChinaProductCategoryCount.cgi\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('topmenu_3','','http://image.ec21.com/cimg/main/header_menu3_on.gif',1)\"><img src=\"http://image.ec21.com/cimg/main/header_menu3.gif\" name=\"topmenu_3\" width=\"80\" height=\"26\" border=\"0\"></a><a href=\"http://search2.ec21.com/search/ChinaTradeCategoryCount.cgi\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('topmenu_4','','http://image.ec21.com/cimg/main/header_menu4_on.gif',1)\"><img src=\"http://image.ec21.com/cimg/main/header_menu4.gif\" name=\"topmenu_4\" width=\"80\" height=\"26\" border=\"0\"></a><a href=\"http://search2.ec21.com/search/ChinaCompanyCategoryCount.cgi\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('topmenu_5','','http://image.ec21.com/cimg/main/header_menu5_on.gif',1)\"><img src=\"http://image.ec21.com/cimg/main/header_menu5.gif\" name=\"topmenu_5\" width=\"80\" height=\"26\" border=\"0\"></a><a href=\"http://cn.ec21.com/app/servlet/CRequestProcessor?event=CMyEC21.Click\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('topmenu_6','','http://image.ec21.com/cimg/main/header_menu6_on.gif',1)\"><img src=\"http://image.ec21.com/cimg/main/header_menu6.gif\" name=\"topmenu_6\" width=\"83\" height=\"26\" border=\"0\"></a> ");
document.writeln("								</div> ");
document.writeln("								<div class=\"global_link\"><a href=\"http://big5.ec21.com/\"><img src=\"http://cn.ec21.com/cimages/global_cn.gif\" width=\"48\" height=\"13\" border=\"0\"></a> ");
document.writeln("										<a href=\"http://www.ec21.com/\"><img src=\"http://cn.ec21.com/cimages/global_en.gif\" width=\"40\" height=\"13\" hspace=\"2\" border=\"0\"></a> ");
document.writeln("										<a href=\"http://kr.ec21.com/\"><img src=\"http://cn.ec21.com/cimages/global_kr.gif\" width=\"23\" height=\"13\" border=\"0\"></a> ");
document.writeln("								</div> ");
document.writeln("						</div> ");
document.writeln("				</div> ");
document.writeln("</div>");