//开头加;号是防止前一个js末行代码未加;结束 ;if(!window._addIvyID) document.write(' */ var pconline = { getId : function(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}}, addEvent : function(obj,eventType,func){if(obj.attachEvent){obj.attachEvent("on" + eventType,func);}else{obj.addEventListener(eventType,func,false)}}, delEvent : function(obj,eventType,func){ if(obj.detachEvent){obj.detachEvent("on" + eventType,func)}else{obj.removeEventListener(eventType,func,false)} } }; function LoginSelectClickOther(e){ thisObj = e.target?e.target:event.srcElement; do{ if(thisObj.id == "loginselect") return; if(thisObj.tagName == "BODY"){LoginSelectClose();return;}; thisObj = thisObj.parentNode; }while(thisObj.parentNode); }; function clickLoginSelect(){ if(pconline.getId("loginopt").style.display == "block"){ LoginSelectClose(); }else{ pconline.getId("loginopt").style.display = "block"; pconline.addEvent(document.body,"mousedown",LoginSelectClickOther); } }; function LoginSelectClose(){ pconline.getId("loginopt").style.display = "none"; pconline.delEvent(document.body,"mousedown",LoginSelectClickOther); }; function LoginSelect(title){ var titleName; switch(title){ case "pcclub": titleName = "PCclub"; document.loginform.direction.value="PCclub"; document.loginform.action="http://passport2.pconline.com.cn/passport2/passport/login.jsp"; break; case "company": titleName = "商家"; document.loginform.direction.value="商家"; document.loginform.action="http://eyp.pconline.com.cn/member/login.htm"; break; }; pconline.getId("loginselectdis").innerHTML = titleName; LoginSelectClose(); }; function ajaxLogon() { if(document.getElementById('ajaxLogon') == null) return; document.getElementById('ajaxLogon').innerHTML= //-----未登录 ''+ '
'+ ' '+ ' '+ ''+ //'
'+ //'选择去向'+ //''+ //'
'+ ' '+ '
'+ //-----已登录 '
'+( //* location.host.match(/pconline/)?'太平洋社区': location.host.match(/pcauto/)?'博客管理 ': location.host.match(/pcgames/)?'jClub管理': location.host.match(/pclady/)?'博客管理': location.host.match(/pckids/)?'博客管理': /**/ '')+'帐号管理 退出'+ '
' //以下是雅黑字体功能: ;//+''; var ajaxLogonHasYaHei = typeof dlgHelper!='object'; if(!ajaxLogonHasYaHei) for(var i = dlgHelper.fonts.count-1; i>0; i--) { if(dlgHelper.fonts(i) == '微软雅黑') { ajaxLogonHasYaHei = true; break; } } if(ajaxLogonHasYaHei) { //ajaxLogonYaHei(); /* document.getElementById('ajaxLogon').innerHTML+='  雅黑?'; */ } } ajaxLogon();//main function ajaxLogonYaHei(toggle) { var yahei = !!document.cookie.match(/(^|; )YaHei=/); if(toggle) { yahei = !yahei; jQuery.cookie('YaHei', '1', {expires:yahei?999:-1,path:'/',domain:location.hostname.replace(/^\w+/,'')}); } document.body.style.fontFamily = yahei ? '微软雅黑' : ''; try { if(window!=top) top.document.body.style.fontFamily = yahei ? '微软雅黑' : ''; } catch(e) {} } function ajaxLogonRefresh() { if(!document.cookie.match(/(^|; )common_session_id=[^;]+/) != !jQuery('#ajaxLogon>span:last:visible').length) jQuery('#ajaxLogon>span')//.toggle() 改成下面一行以绕开jquery1.3.2的toggle在这里失效的BUG .each(function(){var a=$(this); if(a.css('display')=='none') a.show(); else a.hide(); }); } function jQueryLoaded4Logon() { var $ = jQuery; $('#ajaxLogon form').append('') .submit(function(){ var usr = this['username'].value, pwd = this['password'].value; if(usr==''||pwd=='') { alert('请填写用户名和密码'); return false; } var direction = this['direction'].value; if(direction=='') { alert('请选择去向'); return false; } if(this.action.match(/member/)) return; //商家 $('input[type=submit]',this).css('opacity',.5).attr('disabled',true); this.target='pconline_login'; var win=window.open('','pconline_login','height=1, width=1, top=9999, left=0, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no'); window.focus(); var time=0; var fm = this; var checker = setInterval(function(){ if(time++ < 600 && !win.closed) return; clearInterval(checker); if(win.closed) { if(document.cookie.match(/(^|; )common_session_id=[^;]+/)) ajaxLogonRefresh(); else alert('登录失败! 请检查帐号和密码是否正确。'); } else { win.close(); alert('登录超时失败,请检查网络状况并再试一次。'); } $('input[type=submit]',fm).css('opacity',1).attr('disabled',false); },100); //$.getScript(this.action+(this.action.match(/\?/)?"&":"?")+"username=" +usr+"&password="+pwd, ajaxLogonRefresh); }); /**/ } setTimeout(function(){ if(typeof jQuery!='undefined') return jQueryLoaded4Logon(); var $_already_defined = typeof $ != 'undefined'; needJS(window.jQuery,'http://www1.pconline.com.cn/js/pc.jquery1.3.js',function(){ if($_already_defined) $ = jQuery.noConflict(); jQueryLoaded4Logon(); }); },1000); //等1秒,先显示页面其它内容 function needJS(fn,src,callback) { if(typeof callback != 'function') return; //非法回调函数 if(typeof fn != 'undefined' && fn != null && fn != '') return callback(false); //功能早已载入 var scripts = window.__needJS__ || (window.__needJS__ = []); var script = scripts[src] || (scripts[src] = {loaded:false,callbacks:[]}); if(script.loaded) return callback(false); else script.callbacks.push(callback); if(script.callbacks.length == 1) { var js = document.createElement('script'); js.src = src; js.onreadystatechange = js.onload = function() { if(!js.readyState || js.readyState == 'loaded' || js.readyState == 'complete') { script.loaded = true; for(var i=0; i ul,li{list-style:none; margin:0px; padding:0px;} #zt_header {overflow:visible;position:relative;z-index:20; background:url(http://www1.pcauto.com.cn/global/2008/images/pcauto_zt_header_bg_re.gif); height:37px; width:100%; font-size:12px;} #zt_header img{vertical-align:top} #zt_header #topnavm { margin:0 auto; width:1000px;background: url(http://www1.pcauto.com.cn/global/2008/images/pcauto_zt_header_bg_re.gif) repeat-x; height:37px } #zt_header #topnavm,#zt_header #topnavm a { color:#5a5a5a; text-decoration:none;vertical-align:middle;} #zt_header #topnavm a:hover { color:#f00;} #zt_header #topnavm #zt_header_logo {float:left; margin-left:2px;} #zt_header_tags{float:left} #zt_header #topnavm #zt_header_tags li { float:left; margin-left:5px; line-height:37px;height:37px; } #zt_header #zt_header_login { height:30px; line-height:30px; float:left; padding-top:8px; margin-right:2px;} #zt_header #ajaxLogon {float:right;width:298px;height:36px;overflow:visible;padding:0 9px;text-align:right;line-height:36px;display:inline;} /*登陆后*/ #on .messImg{ vertical-align:middle;width:11px;height:9px;background:url(http://www1.pcauto.com.cn/2010/login/images/nav.png) no-repeat -2px -43px;} #on .wel_wrap{color:#777} #on #manageWrap{height:36px;width:74px;position:relative;display:inline-block;text-align:left} #on .manage s{width:7px;height:4px;background:url(http://www1.pcauto.com.cn/2010/login/images/nav.png) no-repeat -4px -58px;position:absolute;top:16px;left:53px;overflow:hidden;line-height:0;} #on .manageCon{display:none;left:-6px;top:28px;width:72px;text-indent:4px;position:absolute;padding:1px;background:#ffffff;border:1px solid #d7d7d7;} #on .aHover .manageCon{display:block;z-index:100;} #on .manageCon a{display:inline;display:block;height:22px;overflow:hidden;line-height:22px;margin:0;} #ajaxLogon #on .manageCon a:hover{background:#BCC8D1;color:#ffffff;} #on .manageCon .more{background:#ffffff;font-weight:bold;border:1px solid #d7d7d7;border-bottom:none;position:absolute;top:-24px;left:-1px;z-index:10;line-height:22px;height:23px;width:72px;padding:1px;white-space:nowrap;} #on .manageCon .more:hover{background:#ffffff;font-weight:bold;} #on .manageCon .more s{width:7px;height:4px;background:url(http://www1.pcauto.com.cn/2010/login/images/nav.png) no-repeat -4px -58px;position:absolute;top:10px;left:59px;overflow:hidden;line-height:0;} /*登陆后*/ #zt_header .zt_header_webGroup{float:right;margin-top:8px;} #zt_header #topHead .loginBox .off,#zt_header #topHeadBox .loginBox .off,#zt_header #ajaxLogon .off{display:block;float:none;margin-top:0;} /*网站群下拉S*/ #zt_header .pcSites{ display:inline-block;position:relative;width:130px;height:20px; background:url(http://www1.pconline.com.cn/global/sites.gif) no-repeat 0 -20px;font-size:12px;text-align:left;line-height:20px;} #zt_header .pcSites .siteTop{padding-left:3px;} #zt_header .pcSites .sites{ position:absolute;left:0;top:18px;width:128px;border:1px solid #8f9ca4;border-top:none; background:#fff;padding:0;margin:0;display:none;} #zt_header .pcSites .sites li{ position:relative;list-style:none;line-height:24px;padding:0;margin:0; vertical-align:top;zoom:1;} #zt_header #topnavm .pcSites .sites a{display:block;padding-left:28px;color:#535b61;text-decoration:none;} #zt_header #topnavm .pcSites .sites a:hover{color:#fff; background:url(http://www1.pconline.com.cn/global/sites.gif) no-repeat 0 -49px;} #zt_header .pcSites .sites s{position:absolute;top:4px;left:6px;width:16px;height:16px; background:url(http://www1.pconline.com.cn/global/sites.gif) no-repeat; cursor:pointer; } #zt_header .pcSites .sites .online{ background-position:0 0;} #zt_header .pcSites .sites .auto{ background-position:-20px 0;} #zt_header .pcSites .sites .games{ background-position:-40px 0;} #zt_header .pcSites .sites .lady{ background-position:-60px 0;} #zt_header .pcSites .sites .baby{ background-position:-80px 0;} #zt_header .pcSites .sites .house{ background-position:-100px 0;} #zt_header .hoverSite .sites{display:block} /*网站群下拉E*/ /*下拉E*/ #zt_header #zt_header_tags li{display:inline-block} #zt_header #zt_header_tags span{position:relative; display:inline-block; vertical-align:middle} #zt_header #zt_header_tags .links{display:none} #zt_header #zt_header_tags .aHover .links{display:block; position:absolute; padding:0 5px;background:#FFF;left:-4px; top:29px; border:1px solid #D7D7D7; z-index:100} #zt_header #zt_header_tags .links a{text-align:left;display:block; height:20px;overflow:hidden; border-bottom:1px dashed #D7D7D7; padding:0 5px; line-height:22px; margin:0 0 -1px} #zt_header #zt_header_tags .links a:hover{background:#A4BFCE;color:#fff; text-decoration:underline} #zt_header #zt_header_tags .link1{width:175px} #zt_header #zt_header_tags .link1 a{float:left;width:49px;padding:0 4px;} #zt_header #zt_header_tags .link2{width:61px} #zt_header #zt_header_tags .link2 a{float:left; width:50px;} #zt_header #zt_header_tags .links .more{background:#fff;width:auto; color:#f60; font-weight:bold; border:1px solid #D7D7D7; border-bottom:none; position:absolute; top:-24px; left:-1px; z-index:10; line-height:22px; height:23px; padding:0 2px} #zt_header #topnavm #zt_header_tags .links .more:hover{background:#fff; text-decoration:none; color:#f60; font-weight:bold} /*下拉E*/
"); } ;function siteLinksSelector(site,siteLinks){ var THIS = this; this.site = document.getElementById(site); this.siteLinks = document.getElementById(siteLinks); this.site.onclick = function(){ if(THIS.siteLinks.style.display=='none'){ THIS.siteLinks.style.display='block'; THIS.site.className='tag_select_open' }else{ THIS.siteLinks.style.display='none'; THIS.site.className='tag_select' } } this.siteLinks.onmouseout = function(){ THIS.siteLinks.style.display='none'; THIS.site.className='tag_select' } this.siteLinks.onmouseover = function(){ THIS.siteLinks.style.display='block'; THIS.site.className='tag_select_open' } }