/* $Id: menutool.js,v 1.6 2005/06/01 01:49:16 brad Exp $ */ /** begin menutool functions **/ function Rollover( base_name ) { this.name = base_name; this.image_dir = "/images"; this.img = null; this.Load = doRollLoad; this.Over = doRollNull; this.Out = doRollNull; } function doRollNull() { ; } function doRollLoad() { this.img = new Array(); this.img[0] = new Image(); this.img[0].src = this.image_dir + "/" + this.name + ".gif"; this.img[1] = new Image(); this.img[1].src = this.image_dir + "/" + this.name + "_o.gif"; this.Over = doRollOver; this.Out = doRollOut; } function doRollOver() { if( document.images ) { image = document.images[ this.name ]; image.src = this.img[1].src; } } function doRollOut() { if( document.images ) { image = document.images[ this.name ]; image.src = this.img[0].src; } } function doRollDown() { if( document.images && (this.src3 != '') ) { image = document.images[ this.name ]; image.src = this.img[2].src; } } MenuRollovers = Array(); function MenuRollover( base_name, src1, src2, src3 ) { this.name = base_name; this.img = null; this.src1 = src1; this.src2 = src2; this.src3 = src3; if( this.src3 + "" == "undefined" ) { this.src3 = ""; } this.Load = doMenuRollLoad; this.Over = doRollNull; this.Out = doRollNull; this.Down = doRollNull; MenuRollovers[ MenuRollovers.length ] = this; this.loaded = false; } function doMenuRollLoad() { this.img = new Array(); this.img[0] = new Image(); this.img[0].src = this.src1; this.img[1] = new Image(); this.img[1].src = this.src2; if( this.src3 != "" ) { this.img[2] = new Image(); this.img[2].src = this.src3; } this.Over = doRollOver; this.Out = doRollOut; if( navigator.userAgent.indexOf('Mac') == -1 ) { this.Down = doRollDown; } } function MenuRollover_OnLoad() { for( i=0; i0? " ": "") + "m_hideme" } } g_te_count++; if( this.te_state != 0 ) return; this.className+=(this.className.length>0? " ": "") + "m_hover"; this.te_state = 1; prev_id = g_te_id; g_te_id = this.id; if( prev_id != 0 ) { template_engine_close_menu( prev_id ); } } m_els[i].onmouseout=function() { g_te_count--; setTimeout("template_engine_close_menu('" + this.id + "')",g_te_hide_delay); } } } function template_engine_close_menu( id ) { if( g_te_count==0 ) { g_te_id = ""; var m_forms = document.getElementsByTagName("SELECT"); for (var j=0; j= 5) try { o = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { o = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { o = false; } } @end @*/ if (!o && typeof XMLHttpRequest!='undefined') { o = new XMLHttpRequest(); } return o; } function ajax_init_triggers( el ) { var a = el.getElementsByTagName( 'a' ); var regex = new RegExp("\\bajax\\s(\\w+)\\b"); var res; for( var i=0; i0 ); if( abort_countdown<0 ) { return false; } return true; }; } addLoadEvent( function() { ajax_init_triggers( document ); }); /** end ajax.js **/