/*-------------------------------------------------------------------------*/ // IPS BASIC MENU CLASS (EXTENSION: BUILD SIMPLE MENU) // (c) 2005 Invision Power Services, Inc // Assumes that "ips_menu.js" has been loaded /*-------------------------------------------------------------------------*/ //---------------------------------- // INIT some CSS classes //---------------------------------- var css_mainwrap = 'popupmenu'; var css_menusep = 'popupmenu-item'; var css_menusep_last = 'popupmenu-item-last'; //---------------------------------- // INIT some images //---------------------------------- var img_item = ""; var img_action = ""; /*-------------------------------------------------------------------------*/ // Return formed image /*-------------------------------------------------------------------------*/ function make_image( img ) { return ""; } /*-------------------------------------------------------------------------*/ // menu_build_menu // cid: ID of opener object (img, div, etc) // menuinput: Array of menu entries | Variable of menu HTML // complexmenu: Treat as HTML stream if true, else treat as array of HTML /*-------------------------------------------------------------------------*/ function menu_build_menu(cid, menuinput, complexmenu) { var html = "\n\n"; if ( ! complexmenu ) { len = parseInt(menuinput.length); if ( len > 0 ) { for( var i=0; i< menuinput.length; i++ ) { t = parseInt(i) + 1; thisclass = ( t == len ) ? css_menusep_last : css_menusep; if ( menuinput[i].match( /^~~NODIV~~/ ) ) { html += menuinput[i].replace( /^~~NODIV~~/, '' ); } else { html += "\n" + menuinput[i] + "\n\n"; } } } } else { html += menuinput; } html += "\n\n"; //---------------------------------- // Workaround for IE bug which shows // select boxes and other windows GUI // over divs. Write iframe //---------------------------------- if ( is_ie ) { html += "\n"+''+"\n"; } //---------------------------------- // Write the html //---------------------------------- if ( html != '' ) { document.getElementById( cid ).parentNode.innerHTML += html; } //---------------------------------- // Register and init //---------------------------------- ipsmenu.dynamic_register[ ipsmenu.dynamic_register.length + 1 ] = cid; }