//开头加;号是防止前一个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="//passport2.pconline.com.cn/passport2/passport/login.jsp"; break; case "company": titleName = "商家"; document.loginform.direction.value="商家"; document.loginform.action="//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,'//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 #header {width:1000px;height:113px;overflow:hidden;padding-bottom:2px;background:#ddd url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat;margin:auto;text-align:left;font-size:12px;} #logo {float:left;width:190px;height:112px;text-indent:-999px} #logo a {display:block;width:190px;height:113px;} #ajaxLogon {float:left;width:356px;height:18px;overflow:hidden;padding:3px 0 4px 10px;line-height:20px;} #ajaxLogon input {float:left;width:90px;height:16px;margin-right:4px;border:1px solid #7B7B7B;} #ajaxLogon input.submit {width:47px;height:18px;border:none;background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat -200px -130px;text-indent:-9999px;color:#767676;cursor:pointer} #ajaxLogon input.reg {width:47px;height:18px;border:none;background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat -260px -130px;text-indent:-9999px;color:#767676;cursor:pointer} #ajaxLogon .auto_login_check,#ajaxLogon #auto_login{float:left;margin-right:0;width:auto;border:none;} #ajaxLogon .auto_login_label{float:left;margin-right:4px;} #header .siteLink {float:right;height:24px; line-height:24px;width:438px;} #header .siteLink a{color:#000;} #header .siteLink a:hover{color:#ff0000; text-decoration:underline;} #header .aMap{padding-left:10px;background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat -838px -127px;} ul,li{list-style:none; margin:0px; padding:0px; font-size:12px;} a{text-decoration:none;} #nav {float:left;width:810px;height:57px;overflow:hidden;padding:5px 0 1px 0;} #nav ul {display:block;float:left;width:60px;height:48px;padding:5px 20px 4px;background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat left -130px;} #nav li {float:left;width:60px;height:24px;line-height:24px;text-align:center;} #nav a {color:#FFF;} #nav a:hover{text-decoration:underline;} #nav .nava {width:120px;padding:5px 11px 4px;} #nav .navb {width:110px;padding:5px 11px 4px;} #nav .navc {width:140px;padding:5px 11px 4px;} #nav .nav2 {width:40px} #nav .nav3 {width:50px} #nav .nav3a {letter-spacing:3px} #nav .nav3a a {margin-left:3px;} #nav .navT1{display:block;float:left;width:27px;height:48px;padding:5px 18px 4px 13px;background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat right -320px;} #nav .navT1 li {float:left;width:27px;height:24px;line-height:24px;text-align:center;} #nav ul{display:block;float:left;height:48px;padding:5px 15px 4px 3px;background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat right -320px;} #nav .navN1{width:226px;} #nav .navN2{width:120px;} #nav .navN3{width:106px;} #nav .navN4{width:34px;padding:5px 4px 4px;background:none} #nav .w2{float:left;width:35px;height:24px;line-height:24px;text-align:center;} #nav .w4{float:left;width:60px;height:24px;line-height:24px;text-align:center;} #nav .icon{width:40px;margin-left:10px;display:inline;float:left;height:57px;} #nav .i1{background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat -200px -250px;} #nav .i2{background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat -280px -250px;} #nav .i3{background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat -360px -250px;} #nav .i4{background:url(//www1.pcauto.com.cn/global/2008/images/global.png) no-repeat -440px -250px;} #subNav {float:left;width:810px;height:25px;text-align:center;line-height:25px;color:#B0B0B0;} #subNav a {margin-right:20px;} #subNav i {color:#000; float:left; margin:0px 10px;} #subNav span { float:left; height:25px; overflow:hidden;} #subNav .city {background:url(//www1.pcauto.com.cn/global/2008/images/global_ge1.gif) no-repeat; display:inline; float:left;} #subNav .city a{color:#000;} #subNav .city a:hover{color:#ff0000; text-decoration:underline;} #subNav span ul li { float:left;}