/** Method for converting old skinSubmenus to initSubmenuData code.
	* to be adapted to actual skin(s) */
	function parseSkinSubmenu() {
		$lines = file('skinSubMenu.php');
		$depth = 1;
		$data = array();
		forEach($lines as $line) {
			$pieces = explode('   ', $line);
			if (count($pieces) > 1)
				$depth = count($pieces)-1;
			
			$qPos = strPos($line, '?');
			if ($qPos===false) continue;
			
			$qStart = $qPos + 1; 
			$hrefEind = strPos($line, '>', $qStart);
			$qString = subStr($line, $qStart, $hrefEind-$qStart);
			$params = array();
			parse_str($qString, $params);
			if (!isSet($params['pntHandler'])) $params['pntHandler'] = '';
			
			$labelEnd = strPos($line, '</a>', $hrefEind+1);
			$label = subStr($line, $hrefEind+1, $labelEnd-$hrefEind-1);
			
			$data[] = array($depth, $params['pntType'], $params['pntHandler'], "Zoek $params[pntType]", $label);
			//to generate code:
			print "<br>\n".'$'."this->submenuData[] = array($depth, '$params[pntType]', '$params[pntHandler]', 'Zoek $params[pntType]', '$label');";
		}
		return $data;
	}
	
}
?>