//var mark = '#'; //if(window.location.href=='http://www.yoka.com/' //||window.location.href=='http://www.yoka.com' //||window.location.href.indexOf('http://www.yoka.com/index.shtml')>-1 //||window.location.href.indexOf('http://www.yoka.com/homekh/main/index.html')>-1 //||window.location.href.indexOf('http://www.yoka.com/union/homesyth/main/index.html')>-1 //||window.location.href.indexOf('http://www.yoka.com/homehq/index.html')>-1 //||window.location.href.indexOf('http://www.yoka.com/default/indexdj.html')>-1 //) //{ var mark='about:blank'; var pic_other = 'http://p1.yokacdn.com/pic/div/public/img/space.gif'; //} function byid(sId){return document.getElementById(sId);} var Class = {create:function(){return function(){this.init.apply(this,arguments)}}} function bindFun(o,fun){var ar=Array.prototype.slice.call(arguments).slice(2);return function(){return fun.apply(o,ar);};}; function addEvent(o,s,fun){o.attachEvent?o.attachEvent("on"+s,fun):o.addEventListener(s,fun,false);} // 绑定QQ登录、注册浮层处理 function connectLoginWin(el,w,h){ if(!document.getElementById(el)) return false; var o = document.getElementById(el), mask = o.getElementsByTagName('div'), close = o.getElementsByTagName('i')[0], ww = document.documentElement.offsetWidth || document.body.offsetWidth, wh = document.documentElement.clientHeight, ie6 = navigator.appName=='Microsoft Internet Explorer' && navigator.appVersion.split(';')[1].indexOf('MSIE 6.0')>0 ? true :false; mask = mask[mask.length-1]; o.style.width = mask.style.width = ww+'px'; o.style.height = mask.style.height = wh+'px'; if(ie6){ var t= document.body.scrollTop || document.documentElement.scrollTop;; o.style.width =mask.style.width = ww-24+'px'; o.style.top = t +'px'; try { addEvent(window,'scroll',function(){ t = document.body.scrollTop || document.documentElement.scrollTop; o.style.top = t +'px'; }) } catch (exx) { alert('window: ' + exx.message); } } addEvent(close,'click',function(){toggleWin(el);}) var li = document.getElementById('loginType').getElementsByTagName('li'), div = document.getElementById('loginCon').getElementsByTagName('div'); for(var i=0;i<2;i++){ show(i) } function show(n){ addEvent(li[n],'mouseover',function(){ for(var i=0;i<2;i++){ li[i].className=''; div[i].style.display='none'; } li[n].className = 'on'; div[n].style.display = 'block'; }) } return true; } // QQ连接绑定浮层的显示与隐藏处理 function toggleWin(el,third_source){ if (!document.getElementById(el)) return; var o = document.getElementById(el); o.style.display = o.style.display == 'none' ? 'block' : 'none'; if (third_source != 'undefined' && o.style.display == 'block') { var third_source_arr = new Array("QQ","人人","新浪微博","开心001","支付宝"); document.getElementById("loginWin_tips_div").innerHTML = "您好!已通过"+third_source_arr[third_source-1]+"成功登录,现在可以连接YOKA了!"; } } // 输出页面中的登录、注册表单 function initConnect() { var connect_login_qq = '
'; connect_login_qq += ' '; // alert(connect_login_qq); document.write(connect_login_qq); /* var connect_div = document.createElement('div'); connect_div.innerHTML = connect_login_qq; document.body.appendChild(connect_div); */ loadConnectInfo(); } function loadConnectInfo() { try { if (connectLoginWin("divLoginWin",546,317) == false) { setTimeout(loadConnectInfo, 100); return; } if (document.getElementById('header_connect_qq')) { document.getElementById('header_connect_qq').style.display = ''; } } catch (exx) { // alert(exx.message); setTimeout(loadConnectInfo, 100); } } // 初始化QQ连接代码 function loadConnectJs() { document.write(''); // document.write('