/*document.write("
显示框×
");*/ document.write("
"); document.write("
"); document.write("
"); document.write(" 显示框"); document.write(" ×"); document.write("
"); document.write("
"); document.write(" "); document.write("
"); document.write("
"); document.write("
"); function loadcss(url) { var link = document.createelement("link"); link.type = "text/css"; link.rel = "stylesheet"; link.href = url; document.getelementsbytagname("head")[0].appendchild(link); } var isie = (document.all) ? true : false; var isie6 = isie && ([/msie (\d+)\.0/i.exec(navigator.useragent)][0][1] == 6); var $g = function (id) { return "string" == typeof id ? document.getelementbyid(id) : id; }; var class = { create: function() { return function() { this.initialize.apply(this, arguments); } } } var extend = function(destination, source) { for (var property in source) { destination[property] = source[property]; } } var bind = function(object, fun) { return function() { return fun.apply(object, arguments); } } var each = function(list, fun){ for (var i = 0, len = list.length; i < len; i++) { fun(list[i], i); } }; var contains = function(a, b){ return a.contains ? a != b && a.contains(b) : !!(a.comparedocumentposition(b) & 16); } var overlay = class.create(); overlay.prototype = { initialize: function(options) { this.setoptions(options); this.lay = $g(this.options.lay) || document.body.insertbefore(document.createelement("div"), document.body.childnodes[0]); this.color = this.options.color; this.opacity = parseint(this.options.opacity); this.zindex = parseint(this.options.zindex); with(this.lay.style){ display = "none"; zindex = this.zindex; left = top = 0; position = "fixed"; width = height = "100%"; } if(isie6){ this.lay.style.position = "absolute"; //ie6设置覆盖层大小程序 this._resize = bind(this, function(){ this.lay.style.width = math.max(document.documentelement.scrollwidth, document.documentelement.clientwidth) + "px"; this.lay.style.height = math.max(document.documentelement.scrollheight, document.documentelement.clientheight) + "px"; }); //遮盖select this.lay.innerhtml = '' } }, //设置默认属性 setoptions: function(options) { this.options = {//默认值 lay: null,//覆盖层对象 color: "#000",//背景色 opacity: 50,//透明度(0-100) zindex: 2147483640//层叠顺序 }; extend(this.options, options || {}); }, //显示 show: function() { //兼容ie6 if(isie6){ this._resize(); window.attachevent("onresize", this._resize); } //设置样式 with(this.lay.style){ //设置透明度 filter = "alpha(opacity:" + this.opacity + ")"; opacity = this.opacity / 100; backgroundcolor = this.color; display = "block"; } }, //关闭 close: function() { this.lay.style.display = "none"; if(isie6){ window.detachevent("onresize", this._resize); } } }; var lightbox = class.create(); lightbox.prototype = { initialize: function(box, options) { this.box = $g(box);//显示层 this.overlay = new overlay(options);//覆盖层 this.setoptions(options); this.fixed = !!this.options.fixed; this.over = !!this.options.over; this.center = !!this.options.center; this.onshow = this.options.onshow; this.box.style.zindex = this.overlay.zindex + 99990; //this.box.style.display = "none"; //兼容ie6用的属性 if(isie6){ this._top = this._left = 0; this._select = []; this._fixed = bind(this, function(){ this.center ? this.setcenter() : this.setfixed(); }); } }, //设置默认属性 setoptions: function(options) { this.options = {//默认值 over: true,//是否显示覆盖层 fixed: true,//是否固定定位 center: true,//是否居中 onshow: function(){}//显示时执行 }; extend(this.options, options || {}); }, //兼容ie6的固定定位程序 setfixed: function(){ this.box.style.top = document.documentelement.scrolltop - this._top + this.box.offsettop + "px"; this.box.style.left = document.documentelement.scrollleft - this._left + this.box.offsetleft + "px"; this._top = document.documentelement.scrolltop; this._left = document.documentelement.scrollleft; }, //兼容ie6的居中定位程序 setcenter: function(){ this.box.style.margintop = document.documentelement.scrolltop - this.box.offsetheight / 2 + "px"; this.box.style.marginleft = document.documentelement.scrollleft - this.box.offsetwidth / 2 + "px"; }, //显示 show: function(options) { if(typeof options == 'undefined') options = {width:'800px', height:'500px'}; if(typeof options != 'undefined' && options.height){ if(parseint(options.height)<($(window).height()-130)) document.getelementbyid('showiframe').height = options.height; else document.getelementbyid('showiframe').height = $(window).height()-130; } if(typeof options != 'undefined' && options.width){ $("#idbox").css("max-width", options.width);//document.getelementbyid('showiframe').width = options.width; var idboxwidth = $("#idbox").width(); var idboxheight = $("#idbox").height(); $("#idbox").css("margin-left",-idboxwidth/2); $("#idbox").css("margin-top",-idboxheight/2); } //刷新验证码 //getobject('img').src='/has_client/include/code.asp?'+(new date().gettime()); //固定定位 //this.box.style.position = this.fixed && !isie6 ? "fixed" : "absolute"; //覆盖层 this.over && this.overlay.show(); this.box.style.display = ""; //document.login_club.username.focus(); //居中 /* if(this.center){ this.box.style.top = this.box.style.left = "50%"; //设置margin if(this.fixed){ this.box.style.margintop = - this.box.offsetheight / 2 + "px"; this.box.style.marginleft = - this.box.offsetwidth / 2 + "px"; }else{ this.setcenter(); } }*/ //兼容ie6 if(isie6){ if(!this.over){ //没有覆盖层ie6需要把不在box上的select隐藏 this._select.length = 0; each(document.getelementsbytagname("select"), bind(this, function(o){ if(!contains(this.box, o)){ o.style.visibility = "hidden"; this._select.push(o); } })) } //设置显示位置 this.center ? this.setcenter() : this.fixed && this.setfixed(); //设置定位 this.fixed && window.attachevent("onscroll", this._fixed); } this.onshow(); }, //关闭 close: function() { this.box.style.display = "none"; this.overlay.close(); document.getelementbyid("idbox").style.height = ''; if(isie6){ window.detachevent("onscroll", this._fixed); each(this._select, function(o){ o.style.visibility = "visible"; }); } } }; if(typeof loadextendfilecache==='undefined'){ var loadextendfilecache = {'css':[],'js':[]}; } if(typeof loadextendfile==='undefined'){ function loadextentfile(filepath, filetype){ if(filetype == "js"){ if(loadextendfileexists(filepath,filetype))return false; var ojs = document.createelement('script'); ojs.setattribute("type","text/javascript"); ojs.setattribute("src", filepath);//文件的地址 ,可为绝对及相对路径 document.getelementsbytagname("head")[0].appendchild(ojs);//绑定 loadextendfilecache['js'].push(filepath); }else if(filetype == "css"){ if(loadextendfileexists(filepath,filetype))return false; var ocss = document.createelement("link"); ocss.setattribute("rel", "stylesheet"); ocss.setattribute("type", "text/css"); ocss.setattribute("href", filepath); document.getelementsbytagname("head")[0].appendchild(ocss);//绑定 loadextendfilecache['css'].push(filepath); } } } if(typeof loadextendfileexists==='undefined'){ function loadextendfileexists(filepath,filetype){ if(typeof loadextendfilecache[filetype]=='undefined')return false; for(var i=0;i1){ var para = arrurl[1]; var arrurl2=para.split("&"); arrurl2.foreach(function(e){ if(e.indexof("mod=")>=0||e.indexof("act=")>=0){ return; }else{ paras+=e+"&"; } }) } return paras; } */ function goserverurl(sys_url,diy_js_server,diy_website_id){ var params = geturlpara(); var serverurl='http://'+diy_js_server+'/systools.php?mod=viewsconn&idweb='+diy_website_id+'&'+params+sys_url; var newserverurl=""; $("body").append(newserverurl); } function price_format(s,n){ n = n > 0 && n <= 20 ? n : 2; s = parsefloat((s + "").replace(/[^\d\.-]/g, "")).tofixed(n) + ""; var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1]; t = ""; for (i = 0; i < l.length; i++) { t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : ""); } return t.split("").reverse().join("") + "." + r; } function _requestparamsstr(){ var strhref = window.document.location.href; var intpos = strhref.indexof('?'); var strright = strhref.substr(intpos+1); return strright; } /*得到html参数,code by nicenic.com, icefire*/ function request(strname){ var arrtmp = _requestparamsstr().split("&"); for(var i=0,len=arrtmp.length; i obj.getattribute("filesize") ) { obj.value=''; alert('文件过大'); return false; } if((mysuffix = obj.getattribute("mysuffix")) && mysuffix.indexof(suffix) == -1) { obj.value=''; alert('文件类型不正确'); return false; } res += filename + ','; i++; } return res ? res.substr(0, res.length - 1) : ''; } function btntop(){$("html,body").animate({scrolltop:"0px"},1000);} function btnbottom(){var bodyh = $("html,body").height();$("html,body").animate({scrolltop:bodyh},1000);} var box = new lightbox("idbox");