var welive_lastScrollY = -108; var panel_status = welive_getCookie("PANELsd4sUwqz4Okz"); function welive_setCookie (name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*3600*1000)); var expires = "; expires="+date.toGMTString(); }else{ var expires = ""; } document.cookie = name+"="+value+expires+"; path=/"; } function welive_getCookie(name){ var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); if(arr != null) return unescape(arr[2]); return 1; } function welive_close_panel(){ document.getElementById("welive-righDiv").style.display="none"; document.getElementById("welive-closeDiv").style.display="block"; welive_setCookie("PANELsd4sUwqz4Okz", 0, 1); } function welive_open_panel(){ document.getElementById("welive-righDiv").style.display="block"; document.getElementById("welive-closeDiv").style.display="none"; welive_setCookie("PANELsd4sUwqz4Okz", 1, 1); } function welive_move(){ var diffY; if (document.documentElement && document.documentElement.scrollTop){ diffY = document.documentElement.scrollTop; }else if (document.body){ diffY = document.body.scrollTop; } percent=0.1*(diffY-welive_lastScrollY); if(percent>0){ percent=Math.ceil(percent); }else{ percent=Math.floor(percent); } document.getElementById("welive-righDiv").style.top = parseInt(document.getElementById("welive-righDiv").style.top)+percent+"px"; document.getElementById("welive-closeDiv").style.top = parseInt(document.getElementById("welive-closeDiv").style.top)+percent+"px"; welive_lastScrollY=welive_lastScrollY+percent; } window.setInterval("welive_move()",1); var welive_panel_top = "" + "
" + "
" + "
" + "
"; var welive_panel_main = "
"; var welive_panel_foot = "
"; document.write(welive_panel_top); document.write(welive_panel_main); document.write(welive_panel_foot);