function genPopup(menuID,fade,tout) {
	
	var tout = tout;
	if (fade) {
	var config = {    
		     sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)    
		     interval: 20, // number = milliseconds for onMouseOver polling interval    
		     over: function(){ $(this).find('ul:first').stop(true,true).fadeIn(300); },
		     timeout: tout, // number = milliseconds delay before onMouseOut    
		     out: function(){ $(this).find('ul:first').stop(true,true).fadeOut(300);  }
		};
	} else {
		var config = {    
			     sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)    
			     interval: 20, // number = milliseconds for onMouseOver polling interval    
			     over: function(){ $(this).find('ul:first').show(); },
			     timeout: tout, // number = milliseconds delay before onMouseOut    
			     out: function(){ $(this).find('ul:first').hide();  }
			};
		
	}
	
	
	
	
	$('#'+menuID+'li ul').css('z-index',99999);
	$('#'+menuID+' li').find('ul:first').hide();
	$('#'+menuID+' li').hoverIntent(config);
	
	/*
	if (fade) {
	$('#'+menuID+' li').hover( function(){ $(this).find('ul:first').animate({opacity:'show'}).show(); }, function(){ $(this).find('ul:first').stop(true,true).hide();  } );
	} else {
	$('#'+menuID+' li').hover( function(){ $(this).find('ul:first').show(); }, function(){ $(this).find('ul:first').hide();  } );
	}
	*/
	
	
	
	
}

function initPopup(menuID,fade,tout) {
	var myMenuID = menuID;
	var myFade = fade;
	$().ready( function () { genPopup(myMenuID,fade,tout); } );
	
}




// usage: initPopup(**ID OF FIRST UL**);

