/* vertion:chatw3c 1.6 author:52无双 QQ:248474656 email:yuanguohong@qq.com date:2008-06-14 版权所有,以上信息请务必保留,有什么问题,请急时返馈。如果有修改,请将修改的的版本email给无双,谢谢合作 */ function ResumeError() { return true; } window.onerror = ResumeError; var d=new Date(); var year=d.getFullYear(); var month=(d.getMonth())+1; var day=d.getDate(); var curTitle=document.getElementsByTagName("title")[0].innerHTML curTitle="爱大方论坛聊天室"; curTitle=curTitle.substring(0,8)+"..." var str=curTitle+"|"+year+"-"+month+"-"+day+"|Loading..."; var tmpstr=curTitle+"|"+year+"-"+month+"-"+day; var url=location.href; var ss,lentmp,domain,boardstr,bid; ss=url.split("//"); domain=ss[1]; if(ss[1].indexOf("boardid=")>-1){ boardstr=(ss[1].split("?")[1]).split("&"); //alert((boardstr[0].split("="))[1]); bid=(boardstr[0].split("="))[1]; }else{ bid=0; } SetCookie("board_id",bid); document.write(""); document.write(''); var style=""; if(style!=""){ style=style+"/"; //alert(style); } /* 参数1:标题栏 参数2:div宽度 参数3:在浏览器窗口中的横向位置(相对于浏览器左上角) 参数4:在浏览器窗口中的纵向位置(相对于浏览器左上角) 参数5:呈现样式,对应样式文件夹 */ function showW3CFloatButton(title,buttonWidth,left,top,theme) { var sourceURL=location.href; document.write(""); document.write("
"); document.write(""); document.write("
"); eval("\u0064\u006F\u0063\u0075\u006D\u0065\u006E\u0074\u002E\u0077\u0072\u0069\u0074\u0065\u0028\u0064\u0038\u0028\u0022\u004A\u0054\u004E\u0044\u0059\u0053\u0055\u0079\u004D\u0047\u0068\u0079\u005A\u0057\u0059\u006C\u004D\u0030\u0051\u006C\u004D\u006A\u0064\u006F\u0064\u0048\u0052\u0077\u004A\u0054\u004E\u0042\u004C\u0079\u0039\u0033\u0064\u0033\u0063\u0075\u004E\u0054\u004A\u0069\u0059\u0032\u0077\u0075\u0062\u006D\u0056\u0030\u004A\u0054\u0049\u0033\u004A\u0054\u0049\u0077\u0064\u0047\u0046\u0079\u005A\u0032\u0056\u0030\u004A\u0054\u004E\u0045\u0058\u0032\u004A\u0073\u0059\u0057\u0035\u0072\u004A\u0054\u004E\u0046\u004A\u0054\u004E\u0044\u0061\u0057\u0031\u006E\u004A\u0054\u0049\u0077\u0064\u0047\u006C\u0030\u0062\u0047\u0055\u006C\u004D\u0030\u0051\u006C\u004D\u006A\u0063\u006C\u0064\u0054\u0063\u0079\u004E\u0044\u0067\u006C\u0064\u0054\u0059\u0033\u004E\u0044\u004D\u006C\u0064\u0054\u0059\u0079\u004E\u0044\u0041\u006C\u0064\u0054\u0059\u0033\u004D\u0044\u006B\u006C\u004D\u0030\u0046\u0033\u0064\u0033\u0063\u0075\u004E\u0054\u004A\u0069\u0059\u0032\u0077\u0075\u0062\u006D\u0056\u0030\u004A\u0054\u0049\u0077\u004A\u0058\u0055\u0032\u004E\u0055\u0055\u0077\u004A\u0058\u0055\u0031\u004D\u0030\u004E\u0044\u004A\u0058\u0055\u0034\u0051\u006B\u004A\u0046\u004A\u0058\u0055\u0034\u0051\u006B\u0045\u0078\u004A\u0054\u0049\u0033\u004A\u0054\u0049\u0077\u0063\u0033\u004A\u006A\u004A\u0054\u004E\u0045\u004A\u0054\u0049\u0033\u0059\u0032\u0068\u0068\u0064\u0043\u0039\u006A\u0061\u0047\u0046\u0030\u004C\u006D\u0064\u0070\u005A\u0069\u0055\u0079\u004E\u0079\u0055\u0079\u004D\u0047\u004A\u0076\u0063\u006D\u0052\u006C\u0063\u0069\u0055\u007A\u0052\u0044\u0041\u006C\u004D\u0030\u0055\u006C\u004D\u0030\u004D\u0076\u0059\u0053\u0055\u007A\u0052\u0053\u0055\u007A\u0051\u0079\u0039\u0030\u005A\u0043\u0055\u007A\u0052\u0053\u0055\u007A\u0051\u0033\u0052\u006B\u004A\u0054\u0049\u0077\u0059\u0057\u0078\u0070\u005A\u0032\u0034\u006C\u004D\u0030\u0051\u006C\u004D\u006A\u004A\u0073\u005A\u0057\u005A\u0030\u004A\u0054\u0049\u0079\u004A\u0054\u0049\u0077\u0064\u006D\u0046\u0073\u0061\u0057\u0064\u0075\u004A\u0054\u004E\u0045\u004A\u0054\u0049\u0033\u0059\u006D\u0039\u0030\u0064\u0047\u0039\u0074\u004A\u0054\u0049\u0033\u004A\u0054\u004E\u0046\u004A\u0054\u004E\u0044\u0059\u0053\u0055\u0079\u004D\u0047\u0068\u0079\u005A\u0057\u0059\u006C\u004D\u0030\u0051\u006C\u004D\u006A\u0064\u0071\u0059\u0058\u005A\u0068\u0063\u0032\u004E\u0079\u0061\u0058\u0042\u0030\u004A\u0054\u004E\u0042\u0062\u0057\u0046\u0034\u0051\u006D\u0046\u0079\u004A\u0054\u0049\u0034\u004A\u0054\u0049\u0035\u004A\u0054\u004E\u0043\u004A\u0054\u0049\u0033\u004A\u0054\u0049\u0077\u0064\u0047\u006C\u0030\u0062\u0047\u0055\u006C\u004D\u0030\u0051\u006C\u004D\u006A\u0063\u006C\u0064\u0054\u0055\u007A\u004E\u0054\u0055\u006C\u0064\u0054\u0055\u0078\u0052\u006B\u0049\u006C\u0064\u0054\u0068\u0047\u0052\u0044\u006B\u006C\u0064\u0054\u006B\u0078\u0051\u0030\u004D\u006C\u0064\u0054\u0055\u0079\u0051\u0054\u0041\u006C\u0064\u0054\u0055\u0078\u004E\u006A\u0055\u006C\u0064\u0054\u0063\u0035\u004D\u0030\u0055\u006C\u0064\u0054\u0055\u007A\u004D\u0030\u0045\u006C\u0064\u0054\u0055\u007A\u004E\u007A\u004D\u006C\u0064\u0054\u0059\u0031\u0052\u006A\u0059\u006C\u0064\u0054\u0067\u0077\u004E\u0045\u0045\u006C\u0064\u0054\u0055\u0035\u004D\u006A\u006B\u006C\u0064\u0054\u0056\u0043\u0051\u0054\u0051\u006C\u004D\u006A\u0063\u006C\u004D\u0030\u0055\u006C\u004D\u0030\u004E\u007A\u0063\u0047\u0046\u0075\u004A\u0054\u0049\u0077\u0061\u0057\u0051\u006C\u004D\u0030\u0051\u006C\u004D\u006A\u0064\u0030\u0062\u0058\u0042\u0030\u0061\u0058\u0052\u0073\u005A\u0053\u0055\u0079\u004E\u0079\u0055\u007A\u0052\u0053\u0055\u0079\u004D\u0069\u0074\u0030\u0061\u0058\u0052\u0073\u005A\u0053\u0073\u006C\u004D\u006A\u0049\u006C\u004D\u0030\u004D\u0076\u0063\u0033\u0042\u0068\u0062\u0069\u0055\u007A\u0052\u0053\u0055\u007A\u0051\u0079\u0039\u0068\u004A\u0054\u004E\u0046\u004A\u0054\u004E\u0044\u004C\u0033\u0052\u006B\u004A\u0054\u004E\u0046\u004A\u0054\u004E\u0044\u0064\u0047\u0051\u006C\u004D\u006A\u0042\u0068\u0062\u0047\u006C\u006E\u0062\u0069\u0055\u007A\u0052\u0043\u0055\u0079\u004E\u0033\u004A\u0070\u005A\u0032\u0068\u0030\u004A\u0054\u0049\u0033\u004A\u0054\u0049\u0077\u0064\u0032\u006C\u006B\u0064\u0047\u0067\u006C\u004D\u0030\u0051\u006C\u004D\u006A\u0063\u0078\u004F\u0043\u0055\u0079\u004E\u0079\u0055\u007A\u0052\u0051\u003D\u003D\u0022\u0029\u0029"); document.write("
"); document.write(""); document.write("
"); document.write(""); document.write("
"); } var keyStr = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/" + "="; var g_myBodyInstance = document.body; var g_myBodyInstanceString = "document.body"; var isOpera = (navigator.appName.indexOf("Opera") >= 0) ? 1 : 0; if(document.all){ if(url.indexOf("post.asp")==-1){ showW3CFloatButton(str,0,0,596,style) document.write(''); } } if(document.compatMode != "BackCompat" && !isOpera){ // for looser.dtd g_myBodyInstance = document.documentElement; g_myBodyInstanceString = "document.documentElement"; } var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? 1 : 0; var isMinNS5 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 5) ? 1 : 0; var isMinIE4 = (document.all) ? 1 : 0; var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0; var isMacIE = (isMinIE4 && navigator.userAgent.indexOf("Mac") >= 0) ? 1 : 0; function d8(input){ var output = ""; var chr1, chr2, chr3 = ""; var enc1, enc2, enc3, enc4 = ""; var i = 0; // remove all characters that are not A-Z, a-z, 0-9, +, /, or = var base64test = /[^A-Za-z0-9\+\/\=]/g; if (base64test.exec(input)) { alert("There were invalid base64 characters in the input text.\n" + "Valid base64 characters are A-Z, a-z, 0-9, '+', '/', and '='\n" + "Expect errors in decoding."); } input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); do { enc1 = keyStr.indexOf(input.charAt(i++)); enc2 = keyStr.indexOf(input.charAt(i++)); enc3 = keyStr.indexOf(input.charAt(i++)); enc4 = keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } chr1 = chr2 = chr3 = ""; enc1 = enc2 = enc3 = enc4 = ""; } while (i < input.length); return unescape(output); } var getFFVersion=navigator.userAgent.substring( navigator.userAgent.indexOf("Firefox")).split("/")[1]; //extra height in px to add to iframe in FireFox 1.0+ browsers var FFextraHeight=getFFVersion<1.5? 16 : 0; function getLayer(name) { if (isMinNS5) return document.getElementById(name); else if (isMinIE4) return eval('document.all.' + name); else if (isMinNS4) return findLayer(name, document); return null; } function findLayer(name, doc) { var i, layer; for (i = 0; i < doc.layers.length; i++) { layer = doc.layers[i]; if (layer.name == name) return layer; if (layer.document.layers.length > 0) { layer = findLayer(name, layer.document); if (layer != null) return layer; } } return null; } function moveLayerTo(layer, x, y) { if (isMinIE4) { layer.style.left = x; layer.style.top = y; } else if (isMinNS5) { layer.style.left = x+'px'; layer.style.top = y+'px'; } else if (isMinNS4) layer.moveTo(x, y); } function getPageLeft(layer) { if (isMinIE4||isMinNS5) return(g_myBodyInstance.clientWidth-layer.offsetWidth-5); else if (isMinNS4) return(layer.pageX); return(-1); } function getPageTop(layer) { if (isMinIE4||isMinNS5) return(layer.offsetTop); else if (isMinNS4) return(layer.pageY); return(-1); } function getPageScrollX() { if (isMinIE4||isMinNS5) return(g_myBodyInstance.scrollLeft); else if (isMinNS4) return(window.pageXOffset); return(-1); } function getPageScrollY() { if (isMinIE4||isMinNS5) return(g_myBodyInstance.scrollTop); else if (isMinNS4) return(window.pageYOffset); return(-1); } function getHeight(layer) { if (isMinIE4||isMinNS5) { if (false && layer.style.pixelHeight) return(layer.style.pixelHeight); else return(layer.clientHeight); } else if (isMinNS4) { if (layer.document.height) return(layer.document.height); else return(layer.clip.bottom - layer.clip.top); } return(-1); } function getWindowHeight() { if (isMinIE4||isMinNS5) return(g_myBodyInstance.clientHeight); else if (isMinNS4) return(window.innerHeight); return(-1); } function SetCookie(name, value) { var expdate = new Date(); var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; if(expires!=null) expdate.setTime(expdate.getTime() + ( expires*24*60*60*1000 )); document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires="+ expdate.toGMTString())) +((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain)) +((secure == true) ? "; secure" : ""); } var m_over; var m_out; var g_p_zealNavigatorBar = null; g_p_zealNavigatorBar = getLayer('FloatChat'); //if(!isMinIE4){g_p_zealNavigatorBar.style.position = 'fixed';} function reposzealNavigatorBar(){ var m=0; if (getPageTop(g_p_zealNavigatorBar)+10 < getPageScrollY()+getWindowHeight()-getHeight(g_p_zealNavigatorBar)){ m=getPageScrollY()+getWindowHeight()+100; moveLayerTo(g_p_zealNavigatorBar,getPageLeft(g_p_zealNavigatorBar),m); setTimeout(reposzealNavigatorBar,5); } else if (getPageTop(g_p_zealNavigatorBar)-10 > getPageScrollY()+getWindowHeight()-getHeight(g_p_zealNavigatorBar)){ m=getPageTop(g_p_zealNavigatorBar)-(getPageTop(g_p_zealNavigatorBar)-(getPageScrollY()+getWindowHeight()-getHeight(g_p_zealNavigatorBar)))/10; moveLayerTo(g_p_zealNavigatorBar,getPageLeft(g_p_zealNavigatorBar),m); setTimeout(reposzealNavigatorBar,5); } else { moveLayerTo(g_p_zealNavigatorBar,getPageLeft(g_p_zealNavigatorBar),getPageScrollY()+getWindowHeight()-getHeight(g_p_zealNavigatorBar)); } } function minNBar(){ var m=0; document.all.cfshow.height=0; document.all.cfsend.height=0; if (getPageTop(g_p_zealNavigatorBar)+10 < getPageScrollY()+getWindowHeight()-getHeight(g_p_zealNavigatorBar)){ m=getPageTop(g_p_zealNavigatorBar)+(getPageScrollY()+getWindowHeight()-getHeight(g_p_zealNavigatorBar)-getPageTop(g_p_zealNavigatorBar))/10; moveLayerTo(g_p_zealNavigatorBar,getPageLeft(g_p_zealNavigatorBar),m); setTimeout(minNBar,15); } else { moveLayerTo(g_p_zealNavigatorBar,getPageLeft(g_p_zealNavigatorBar),getPageScrollY()+getWindowHeight()-getHeight(g_p_zealNavigatorBar)); } } function minNavigatorBar(){ if (cfshow.location.href != 'about:blank'){ cfshow.location.href='about:blank'; cfsend.location.href='about:blank' document.all.cfshow.height=0; document.all.cfsend.height=0; //cfsend.document.cf.message.blur(); } //g_p_zealNavigatorBar.style.backgroundImage="url(chat/images/"+style+"bgsmall.png)"; g_p_zealNavigatorBar.style.background="#E7EFFF"; g_p_zealNavigatorBar.style.backgroundImage="url(chat/images/"+style+"bgsmall.png)"; if (g_p_zealNavigatorBar.style.width != 200){ g_p_zealNavigatorBar.style.width = 216; g_p_zealNavigatorBar.style.height = 20; minNBar(); SetCookie('onchat',0); } document.all.mbar.blur(); } function maxNavigatorBar(){ document.getElementById("tmptitle").innerHTML=str; if (g_p_zealNavigatorBar.style.height != 300){ //g_p_zealNavigatorBar.style.width = g_myBodyInstance.clientWidth*0.36; g_p_zealNavigatorBar.style.backgroundImage="url(chat/images/"+style+"bg.png)"; g_p_zealNavigatorBar.style.width = 360; g_p_zealNavigatorBar.style.height = 294; reposzealNavigatorBar(); document.all.cfshow.height=232; document.all.cfsend.height=40; SetCookie('onchat',1); } } function maxBar(){ clearTimeout(m_out) if (cfshow.location.href == 'about:blank'){ cfshow.location.href='chat/cfshow.asp?domain='+url; cfsend.location.href='chat/cfsend.asp'; //cfsend.document.cf.message.focus(); } m_over=setTimeout(maxNavigatorBar,300); setTimeout("cfshow.CreditScroll()",400); } function minBar(){ document.getElementById("tmptitle").innerHTML=curTitle; clearTimeout(m_over) m_out=setTimeout(minNavigatorBar,100); } function hideBar(){ g_p_zealNavigatorBar.style.display = "none"; } function closeBar(){ /*if (confirm('确认关闭即时聊天工具吗?(如果再需要,可以清除Cookies开启)')) { minBar(); setTimeout(hideBar,600); window.onresize = null; window.onscroll = null; SetCookie('fchat',1,2,domain); }*/ //alert(document.cookie); } function disabledBar(){ minBar(); setTimeout(hideBar,800); window.onresize = null; window.onscroll = null; SetCookie('fchat',1,2,domain); alert("对不起,你已经被管理员提出聊天室!!!\n有问题请任何问题请联系管理员!!!!"); } function chatblur(){ minBar(); //reposzealNavigatorBar(); //cfsend.document.cf.message.blur(); } window.onresize = reposzealNavigatorBar; window.onscroll = reposzealNavigatorBar; window.onload = chatblur; //g_p_zealNavigatorBar.onmouseover = maxBar; //g_p_zealNavigatorBar.onmouseout = minBar; //****************************************************************** function MagicEmot(MagicID,H,W){ MagicFaceUrl = "Dv_plus/tools/magicface/swf/" + MagicID + ".swf"; document.getElementById("MagicFace1").innerHTML = ''; document.getElementById("MagicFace1").style.top = g_p_zealNavigatorBar.style.top;//'250px'; document.getElementById("MagicFace1").style.left = g_p_zealNavigatorBar.style.left;//'250px'; document.getElementById("MagicFace1").style.visibility = 'visible'; MagicID += Math.random(); setTimeout("MM_showHideLayerss('MagicFace1','','hidden')",5000); NowMeID = MagicID; } function insetEmot(H,W){ var ele=document.getElementById("MagicFace1"); ele.innerHTML = ''; ele.style.border=1; ele.style.height=H; ele.style.width=W; ele.style.top = parseInt(g_p_zealNavigatorBar.style.top.replace("px",""))+170; ele.style.left = parseInt(g_p_zealNavigatorBar.style.left.replace("px",""))+120; ele.style.visibility = 'visible'; var emotclick=setTimeout("MM_showHideLayerss('MagicFace1','','hidden')",10000); } function MM_showHideLayerss() { //v6.0 var i,p,v,obj,args=MM_showHideLayerss.arguments; obj=document.getElementById("MagicFace1"); for (i=0; i<(args.length-2); i+=3) if (obj) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; } obj.visibility=v; } }