/******************************************************************* * soopaG-rollovers.js * 7/28/2001 * www.youngpup.net * * easiest rollovers on earth, baby! * see www.youngpup.net for documentation. * * * 10/09/2002 * www.fuzzygroove.com * * Added soopaGrouping to link buttons just as easily. * * * 04/13/03 * www.fuzzygroove.com * * Menus pop on rollover *******************************************************************/ function soopaSetup() { var img, sh, sn, sd, sg for (var i = 0; (img = document.images[i]); i++) { img.pos = soopaPos; if (img.getAttribute) { sn = img.getAttribute("src"); sh = img.getAttribute("hsrc"); sd = img.getAttribute("dsrc"); sg = img.getAttribute("group"); sm = img.getAttribute("menu"); if(sm != "" && sm != null) { img.menu = sm; getLayer(img.menu).img = img; } if (sn != "" && sn != null) { img.n = new Image(); img.n.src = img.src; if (sh != "" && sh != null) { img.h = new Image(); img.h.src = sh; img.onmouseover = soopaSwapOn img.onmouseout = soopaSwapOff img.over = soopaSwapOn; img.off = soopaSwapOff; if(img.menu) { getLayer(img.menu).onmouseover = soopaMenuOn; getLayer(img.menu).onmouseout = soopaMenuOff; getLayer(img.menu).over = soopaMenuOn; getLayer(img.menu).off = soopaMenuOff; } } if (sd != "" && sd != null) { img.d = new Image(); img.d.src = sd; img.onmousedown = soopaSwapDown img.down = soopaSwapDown; } if (sg != "" && sg != null) { gSet = eval("typeof("+sg+"RG) != 'undefined'"); if(!gSet) eval(sg+"RG = new soopaGroup('"+sg+"')"); img.g = eval(sg+"RG"); img.g.add(img); } } } } } function soopaSwapOn() { if(this.g && this.g.selected == this.getAttribute("name")) return "selected"; else { this.src = this.h.src; if(this.menu) { this.rollOnTimeout = setTimeout('soopaShowMenu(\''+this.menu+'\')',210); if(this.rollOffTimeout) clearTimeout(this.rollOffTimeout); } } } function soopaMenuOn() { this.img.over(); } function soopaSwapOff() { if(this.g && this.g.selected == this.getAttribute("name")) return "selected"; else { this.src = this.n.src; if(this.menu) { this.rollOffTimeout = setTimeout('soopaHideMenu(\''+this.menu+'\')',200); if(this.rollOnTimeout) clearTimeout(this.rollOnTimeout); } } } function soopaMenuOff() { this.img.off(); } function soopaSwapDown() { if(this.g) { if(this.g.selected == this.getAttribute("name")) { return "selected"; } else { this.src = this.d.src; if(this.g) { this.g.selected = this.getAttribute("name"); for(var i=0;i=4); this.ns4=(this.b=="ns" && this.v==4); this.ns5=(this.b=="ns" && this.v==5); this.ie=(this.b=="ie" && this.v>=4); this.ie4=(this.version.indexOf('MSIE 4')>0); this.ie5=(this.version.indexOf('MSIE 5')>0); this.ie55=(this.version.indexOf('MSIE 5.5')>0); this.dom=((document.createRange&&(document.createRange().createContextualFragment))?true:false); this.min=(this.ns||this.ie); var ua=navigator.userAgent.toLowerCase(); if (ua.indexOf("win")>-1) this.platform="win32"; else if (ua.indexOf("mac")>-1) this.platform="mac"; else this.platform = "other"; this.fcomm = ((this.ie && !(this.platform == "mac")) || (this.ns && this.v < 5))? true : false; } is = new Browser();