// javascript document function getstyle(a) { return document.defaultview && document.defaultview.getcomputedstyle ? document.defaultview.getcomputedstyle(a, null) : a.currentstyle } var openbox = { show: function(a) { this.mask || this.createmask(); var b = getw(), a = document.getelementbyid(a); a.style.display = "block"; a.style.top = b.s + b.h / 2 - 0.5 * a.offsetheight + "px"; if (parseint(a.style.top) <= 0) { a.style.top = "0px"; }; //document.title = b.s + b.h / 2 - 0.5 *parseint($(a).height())+"px"; a.style.zindex = 99999; this.mask.style.display = "block" }, createmask: function() { var a = getw(); this.mask = document.createelement("div"); a.s_h < a.h && (a.s_h = a.h); this.mask.style.height = a.s_h + "px"; this.mask.style.top = "0px"; this.mask.style.left = "0px"; this.mask.style.position = "absolute"; this.mask.style.width = a.w + "px"; this.mask.style.zindex = 9999; this.mask.style.background = "#000"; this.mask.style.opacity = "0.6"; this.mask.classname = "mask_openbox"; this.mask.style.filter = "alpha(opacity:60)"; document.body.appendchild(this.mask) }, hide: function(a) { this.mask && (this.mask.style.display = "none"); document.getelementbyid(a) .style.display = "none" } }; function getw() { var a, b; a = document.documentelement.clientheight || document.body.clientheight; b = document.documentelement.clientwidth || document.body.clientwidth; screen_h = document.documentelement.scrollheight || document.body.scrollheight; return o = { w: b, h: a, s: document.documentelement.scrolltop || document.body.scrolltop, s_h: screen_h } } var showhdhl = { init:function(){ this.hllqwrapul = $("#hllqwrapul"); this.li = this.hllqwrapul.find(".hllqwrapul222"); this.l =this.li.length; this.w = this.li.outerwidth(true); this.hllqwrapul.width(this.w*this.l); this.c = 0; this.numli = $("#hllqwrapul_tab b"); var that= this; this.numli.bind("click",function(){ if(that.c==$(this).index())return false; that.c = $(this).index(); that.move(); }); this.hllqwrapul_pre = $("#hllqwrapul_pre"); this.hllqwrapul_next = $("#hllqwrapul_next"); var that = this; that.timer = null; this.hllqwrapul_pre.bind("click",function(){ that.c > 0 ?that.c-- : that.c = that.l-1; clearinterval(that.timer); that.move(1); }); this.hllqwrapul_next.bind("click",function(){ that.c < that.l-1 ? that.c++ : that.c = 0; clearinterval(that.timer); that.move(1); }); this.move(); that.autoplay(); }, autoplay:function(){ var that= this; that.timer = setinterval(function(){ that.c < that.l-1 ? that.c++ : that.c = 0; that.move(); },8000); }, move:function(t){ var that= this; var pos = this.c*this.w; this.numli.removeclass("on"); this.numli.eq(this.c).addclass("on"); this.hllqwrapul.stop().animate({left:-pos},function(){ if(t){ that.autoplay(); }; }); } }; function showhdhl(o){ this.hllqwrapul = $("#"+o.box); this.li = this.hllqwrapul.find(o.li); this.auto = o.auto || false; this.l =this.li.length; this.w = this.li.outerwidth(true); this.hllqwrapul.width(this.w*this.l); //alert(this.w); this.c = 0; this.numli = $(o.numli); var that= this; this.numli.bind("click",function(){ if(that.c==$(this).index())return false; that.c = $(this).index(); that.move(); }); this.hllqwrapul_pre = $("#"+o.pre); this.hllqwrapul_next = $("#"+o.next); var that = this; that.timer = null; this.hllqwrapul_pre.bind("click",function(){ that.c > 0 ?that.c-- : that.c = that.l-1; clearinterval(that.timer); that.move(1); }); this.hllqwrapul_next.bind("click",function(){ that.c < that.l-1 ? that.c++ : that.c = 0; clearinterval(that.timer); that.move(1); }); this.move(); that.autoplay(); } showhdhl.prototype = { autoplay:function(){ var that= this; if(this.auto){ that.timer = setinterval(function(){ that.c < that.l-1 ? that.c++ : that.c = 0; that.move(); },8000); }; }, move:function(t){ var that= this; var pos = this.c*this.w; this.numli.removeclass("on"); this.numli.eq(this.c).addclass("on"); this.hllqwrapul.stop().animate({left:-pos},function(){ if(t){ that.autoplay(); }; }); } }; var loginfn = { init:function(){ var l = (getw().w - 1000)*0.5; var t = (getw().h - 600)*0.5; $(".nologin a").bind("click",function(){ window.open ('denglu.html','newwindow','height=600,width=1000,top='+t+',left='+l+',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no'); return false; }); } }