function map(a,f){f(a);} function getRand(a,b) { if(a) { b=b?b:0; return Math.floor(Math.random()*a+b); }else { a = new Date(); return d.getTime(); } } function $(a){document.write(a);} function $$() { var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') element = document.getElementById(element);
if (arguments.length == 1) return element;
elements.push(element); } return elements; } function fGetCookie(name) { var cookieValue = ""; var search = name + "="; if(document.cookie.length > 0) { offset = document.cookie.indexOf(search); if (offset != -1) { offset += search.length; end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; cookieValue = unescape(document.cookie.substring(offset, end)); } } return cookieValue; } function J_get(name) { var js_get =self.window.document.location.href; var start =js_get.indexOf(name + '='); if (start == -1) return ''; var len = start + name.length + 1; var end = js_get.indexOf('&',len); if (end == -1) end = js_get.length; return unescape(js_get.substring(len,end)); } function writeCookie(name, value, hours) { var expire = ""; var domain = "; domain=jb51.net; path=/"; if(hours != "") { expire = new Date((new Date()).getTime() + hours * 60 * 60 * 1000); expire = "; expires=" + expire.toGMTString(); } document.cookie = name + "=" + escape(value) + domain; } function createXMLHttp() { var ret = null; try { ret = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { ret = new ActiveXObject('Microsoft.XMLHTTP'); } catch (ee) { ret = null; } } if (!ret && typeof XMLHttpRequest != 'undefined') ret = new XMLHttpRequest(); return ret; } function loadXmlToElement(fragment_url, element_id,mode,de) { var element = $$(element_id); var xmlhttp = createXMLHttp(); var str; xmlhttp.open("GET", fragment_url); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { if(!mode) { str = xmlhttp.responseXML.getElementsByTagName("data")[0].childNodes[0].nodeValue; if(!element.innerHTML) { try{ str = xmlhttp.responseXML.firstChild.childNodes[1].nodeValue; }catch(e){} } }else if(mode == 'txt') { str = xmlhttp.responseText; } if(de) str = unescape(str); element.innerHTML = str; } } xmlhttp.send(null); } var oJson = new Object(); var fJson = { "data":{},//[0,y,yes,空值]:默认,[-1,n,no]:不运行flush(), "file":{},//附加js代码文件 "str":{},//附加JS代码 "set":function(element,vars) { for(key in vars) { this[key][element] = vars[key]; } }, "getSrc":function(element) { var rs = ''; if(this['data'][element]) { if(this['data'][element] == 'n' || this['data'][element] == '-1' || this['data'][element] == 'no') { rs +='&gJsonData=n'; } } if(this['str'][element]) { rs +='&gJsonDoStr='+escape(this['str'][element]); } if(this['file'][element]) { rs +='&gJsonDoFile='+escape(this['file'][element]); } return rs; }, "main":function(url,element,un) { un = un?un:0; eval("oJson."+element+" = new fJson.__Json('"+url+"','"+element+"','"+un+"')" ); }, "__Json":function(url,element,un) { var a = document.getElementById("script_"+element) if(!a) { a = document.createElement("script"); a.setAttribute("id","script_"+element); } a.un = un; a.data = ''; a.src = url+((url.indexOf('?') == -1 )?'?':'&')+'gJson='+element+fJson.getSrc(element); if(navigator.appVersion.indexOf("MSIE") == -1 ) { document.getElementById(element).insertBefore(a,null); }else { document.body.insertAdjacentElement("BeforeBegin",a); } return a; }, "flush":function(element) { document.getElementById(element).innerHTML = (oJson[element].un)?unescape(oJson[element].data):oJson[element].data; //oJson[element] = null; } } /* 应用 */ function subPageSelect(b,e,d,a)//b开始 e结束 d默认 a动作 { var shtml =''; return shtml; } function err(a,b,c) { if(b) { if(c) { a.src='http://www.gxlcms.com/space/imgs/all/thu_woman.gif'; }else { a.src='http://v.jb51.net:88/img/user_no_photo.gif'; } }else { a.src='http://v.jb51.net:88/img/flv_no_photo.gif'; } } function img_onerr(a) { err(a); } function gowin(a) { document.location = a; } function CopyInBoard(hahaUrl,note) { note = note?note:'网址复制成功啦!'; window.clipboardData.setData('text',hahaUrl) alert(note); } function fDoMask(a,f,s,c,p,color)//a元素 f刷新调函数 s样式 c内容 p透明度 { a = $$(a); p = p?p:75; s = '
'+(c?c:' 数据加载中... ')+(f?'[刷新]':'')+'
'; color = color?color:'#FFFFFF'; if (a.innerHTML != "") { //window.onunload = fCheckStatus; var objBrother = a.childNodes[0]; var b = document.createElement('DIV'); b.setAttribute('id','maskdiv'); b.style.textAlign = "center"; b.style.position = "absolute"; b.style.filter = "alpha(opacity="+p+")"; b.style.opacity = (p / 100); b.style.MozOpacity = (p / 100); b.style.KhtmlOpacity = (p / 100); b.style.width = a['offsetWidth']+'px'; b.style.height = a['offsetHeight']+'px'; b.style.margin = "0px"; b.style.backgroundColor = color; a.insertBefore(b,objBrother) b.innerHTML = s; } } function switchDisplay(obj1, obj2) { try { obj1 = $$(obj1); obj2 = $$(obj2); if(obj1.style.display=='') { obj1.style.display='none'; obj2.style.display=''; } else { obj1.style.display=''; obj2.style.display='none'; } }catch (ex) { } } function getFlashPlayer(vars,playUrl,id,w,h) { playUrl = playUrl?playUrl:'http://www.gxlcms.com/flashApp/56'; id = id?id:'siteFlvPlayer'; w = w?w:'440'; h = h?h:'371'; AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width',w,'height',h,'id',id,'src',playUrl,'flashvars',vars,'quality','high','scale','noscale','wmode','transparent','name',id,'salign','lt','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',playUrl); //end AC code } function f_js_playObject(a,h,s,player) { h = 'www.gxlcms.com';//#.. player = player?player:'/flashApp/v_player_site_fp7_5.swf'; player = 'http://'+h+player; s = s?s:' width="100%" height="100%" ';