//开头加;号是防止前一个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 {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:350px;height:19px;overflow:hidden;padding:9px;line-height:19px;display:inline;} #zt_header #ajaxLogon input {float:left;width:88px;height:17px;border:1px solid #878787;margin-right:4px;text-indent:0;} #zt_header #ajaxLogon input.submit {width:49px;height:19px;border:none;background:url(http://www1.pcauto.com.cn/global/2008/images/pconline_zt_header_bg2.gif) no-repeat 0 -29px;color:#504f4f;cursor:pointer} #zt_header #ajaxLogon input.reg {width:49px;height:19px;border:none;background:url(http://www1.pcauto.com.cn/global/2008/images/pconline_zt_header_bg2.gif) no-repeat 0 -29px;color:#504f4f;cursor:pointer} #zt_header #ajaxLogon .auto_login_check,#zt_header #ajaxLogon #auto_login{float:left;margin-right:6px;width:auto;border:none;} #zt_header #ajaxLogon .auto_login_label{float:left;} #zt_header .zt_header_webGroup{float:right;margin-top:8px;} #zt_header .subContent{position:absolute;visibility:hidden;border:1px solid #D7D7D7;line-height:20px;padding:5px;background:#FFF url(http://www1.pcauto.com.cn/global/2008/images/pconline_zt_header_bg2.gif) no-repeat center -50px;zoom:1;overflow:hidden; z-index:99999;} #zt_header .subContent a{display:block; height:20px;overflow:hidden; border-bottom:1px dashed #D7D7D7; padding:0 5px 0;} #zt_header .subContent a:hover{background:#A4BFCE;color:#fff;} #zt_header .subBox #winMore{margin-left:-25px;width:80px;width:123px;margin-left:-50px;} #zt_header .subBox #winMore a{float:left; width:50px;} #zt_header .subBox #winMore a:hover{color:#fff;} #zt_header .subBox #webBox{z-index:999;text-align:left;border:1px solid #8F9CA4; border-top:none;position:absolute;visibility:hidden;width:98px;background:#fff;margin-top:-2px;padding-bottom:6px;} #zt_header .subBox #webBox a{color:#525b62;line-height:20px;height:20px;display:block;margin:5px 0 0 3px;padding:0 3px 0 7px;text-decoration:none;} #zt_header .subBox #webBox a:hover{color:#fff;background:url(http://www1.pcauto.com.cn/global/2008/images/pconline_zt_header_bg2.gif) no-repeat 0 0;} #zt_header .subBox #carMarket{width:175px;margin-left:-70px;} #zt_header .subBox #carMarket a{float:left;width:49px;padding:0 4px;} #zt_header .subBox #carMarket a:hover{color:#fff;} #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*/
"); } ;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' } }