<?php

$HelpTipID=0;

class HelpTip
{

	var $currentID;
	var $numLinesToDisplay;
	function HelpTip($Text,$numLinesToDisplay=5)
	{
		global $HelpTipID;
		$this->currentID=$HelpTipID;
		$this->numLinesToDisplay=$numLinesToDisplay;

		echo "\n<div id=\"HelpTip_" . $HelpTipID . "\" style=\"Display: none\">\n"
			.$Text
			."</div>\n\n";

		$HelpTipID++;
	}

	function getShowInfoCode()
	{
		global $nukeurl,$helptipTheme;
		$ThemeSel = get_theme();

		$ObjectPath=$nukeurl."/kernel/helptip/themes/".$helptipTheme;
		if (file_exists("themes/".$ThemeSel."/helptip/style/helptip.css")) { $ObjectPath=$nukeurl."/themes/".$ThemeSel."/helptip"; }

		return "ShowInfo(event, this, '".$ObjectPath."', ".$this->numLinesToDisplay.", 'HelpTip_".$this->currentID."')";
	}

	function getOnClickCode()
	{
		return "".$this->getShowInfoCode()."; return false;";
	}

}