﻿var foundIndex = 1;
var foundIndexOut = 0;

function getImageMenu(caption) {	
	foundIndexOut++;
	document.write("<script type='text/javascript' id='myIndex" + foundIndexOut + "'>if(document.getElementById('myIndex" + foundIndexOut + "').parentNode.className.toString().toLowerCase().indexOf('level1') != -1){document.getElementById('myIndex" + foundIndexOut + "').parentNode.parentNode.className += ' icon icon" + foundIndex + "';foundIndex++}</script>");
	document.write(caption);			
	if(foundIndex >= 15) foundIndex = 1;
}
