if (!window.DHTMLSuite)
	var DHTMLSuite = new Object();
if (!String.trim)
	String.prototype.trim = function() {
		return this.replace(/^\s+|\s+$/, '')
	};
var DHTMLSuite_funcs = new Object();
if (!window.DHTML_SUITE_THEME)
	var DHTML_SUITE_THEME = 'blue';
if (!window.DHTML_SUITE_THEME_FOLDER)
	var DHTML_SUITE_THEME_FOLDER = '../themes/';
if (!window.DHTML_SUITE_JS_FOLDER)
	var DHTML_SUITE_JS_FOLDER = '../js/separateFiles/';
var DHTMLSuite = new Object();
var standardObjectsCreated = false;
DHTMLSuite.eventEls = new Array();
var widgetDep = new Object();
widgetDep['formValidator'] = [ 'dhtmlSuite-formUtil.js' ];
widgetDep['paneSplitter'] = [ 'dhtmlSuite-paneSplitter.js',
		'dhtmlSuite-paneSplitterModel.js', 'dhtmlSuite-dynamicContent.js',
		'ajax.js' ];
widgetDep['menuBar'] = [ 'dhtmlSuite-menuBar.js', 'dhtmlSuite-menuItem.js',
		'dhtmlSuite-menuModel.js' ];
widgetDep['windowWidget'] = [ 'dhtmlSuite-windowWidget.js',
		'dhtmlSuite-resize.js', 'dhtmlSuite-dragDropSimple.js', 'ajax.js',
		'dhtmlSuite-dynamicContent.js' ];
widgetDep['colorWidget'] = [ 'dhtmlSuite-colorWidgets.js',
		'dhtmlSuite-colorUtil.js' ];
widgetDep['colorSlider'] = [ 'dhtmlSuite-colorWidgets.js',
		'dhtmlSuite-colorUtil.js', 'dhtmlSuite-slider.js' ];
widgetDep['colorPalette'] = [ 'dhtmlSuite-colorWidgets.js',
		'dhtmlSuite-colorUtil.js' ];
widgetDep['calendar'] = [ 'dhtmlSuite-calendar.js',
		'dhtmlSuite-dragDropSimple.js' ];
widgetDep['dragDropTree'] = [ 'dhtmlSuite-dragDropTree.js' ];
widgetDep['slider'] = [ 'dhtmlSuite-slider.js' ];
widgetDep['dragDrop'] = [ 'dhtmlSuite-dragDrop.js' ];
widgetDep['imageEnlarger'] = [ 'dhtmlSuite-imageEnlarger.js',
		'dhtmlSuite-dragDropSimple.js' ];
widgetDep['imageSelection'] = [ 'dhtmlSuite-imageSelection.js' ];
widgetDep['floatingGallery'] = [ 'dhtmlSuite-floatingGallery.js',
		'dhtmlSuite-mediaModel.js' ];
widgetDep['contextMenu'] = [ 'dhtmlSuite-contextMenu.js',
		'dhtmlSuite-menuBar.js', 'dhtmlSuite-menuItem.js',
		'dhtmlSuite-menuModel.js' ];
widgetDep['dynamicContent'] = [ 'dhtmlSuite-dynamicContent.js', 'ajax.js' ];
widgetDep['textEdit'] = [ 'dhtmlSuite-textEdit.js',
		'dhtmlSuite-textEditModel.js', 'dhtmlSuite-listModel.js' ];
widgetDep['listModel'] = [ 'dhtmlSuite-listModel.js' ];
widgetDep['resize'] = [ 'dhtmlSuite-resize.js' ];
widgetDep['dragDropSimple'] = [ 'dhtmlSuite-dragDropSimple.js' ];
widgetDep['dynamicTooltip'] = [ 'dhtmlSuite-dynamicTooltip.js',
		'dhtmlSuite-dynamicContent.js', 'ajax.js' ];
widgetDep['modalMessage'] = [ 'dhtmlSuite-modalMessage.js',
		'dhtmlSuite-dynamicContent.js', 'ajax.js' ];
widgetDep['tableWidget'] = [ 'dhtmlSuite-tableWidget.js', 'ajax.js' ];
widgetDep['progressBar'] = [ 'dhtmlSuite-progressBar.js' ];
widgetDep['tabView'] = [ 'dhtmlSuite-tabView.js',
		'dhtmlSuite-dynamicContent.js', 'ajax.js' ];
widgetDep['infoPanel'] = [ 'dhtmlSuite-infoPanel.js',
		'dhtmlSuite-dynamicContent.js', 'ajax.js' ];
widgetDep['form'] = [ 'dhtmlSuite-formUtil.js', 'dhtmlSuite-dynamicContent.js',
		'ajax.js' ];
widgetDep['autoComplete'] = [ 'dhtmlSuite-autoComplete.js', 'ajax.js' ];
widgetDep['chainedSelect'] = [ 'dhtmlSuite-chainedSelect.js', 'ajax.js' ];
var depCache = new Object();
DHTMLSuite.include = function(widget) {
	if (!widgetDep[widget]) {
		alert('Cannot find the files for widget ' + widget + '. Please verify that the name is correct');
		return
	}
	var files = widgetDep[widget];
	for ( var no = 0; no < files.length; no++) {
		if (!depCache[files[no]]) {
			document.write('<' + 'script');
			document.write(' language="javascript"');
			document.write(' type="text/javascript"');
			document.write(' src="' + DHTML_SUITE_JS_FOLDER + files[no] + '">');
			document.write('</' + 'script' + '>');
			depCache[files[no]] = true
		}
	}
}
DHTMLSuite.discardElement = function(element) {
	element = DHTMLSuite.commonObj.getEl(element);
	var gBin = document.getElementById('IELeakGBin');
	if (!gBin) {
		gBin = document.createElement('DIV');
		gBin.id = 'IELeakGBin';
		gBin.style.display = 'none';
		document.body.appendChild(gBin)
	}
	gBin.appendChild(element);
	gBin.innerHTML = ''
}
DHTMLSuite.createStandardObjects = function() {
	DHTMLSuite.clientInfoObj = new DHTMLSuite.clientInfo();
	DHTMLSuite.clientInfoObj.init();
	if (!DHTMLSuite.configObj) {
		DHTMLSuite.configObj = new DHTMLSuite.config();
		DHTMLSuite.configObj.init()
	}
	DHTMLSuite.commonObj = new DHTMLSuite.common();
	DHTMLSuite.variableStorage = new DHTMLSuite.globalVariableStorage();
	;
	DHTMLSuite.commonObj.init();
	DHTMLSuite.domQueryObj = new DHTMLSuite.domQuery();
	DHTMLSuite.commonObj.addEvent(window, 'unload', function() {
		DHTMLSuite.commonObj.__clearMemoryGarbage()
	});
	standardObjectsCreated = true
}
DHTMLSuite.config = function() {
	var imagePath;
	var cssPath;
	var defaultCssPath;
	var defaultImagePath
}
DHTMLSuite.config.prototype = {
	init : function() {
		this.imagePath = DHTML_SUITE_THEME_FOLDER + DHTML_SUITE_THEME
				+ '/images/';
		this.cssPath = DHTML_SUITE_THEME_FOLDER + DHTML_SUITE_THEME + '/css/';
		this.defaultCssPath = this.cssPath;
		this.defaultImagePath = this.imagePath
	},
	setCssPath : function(newCssPath) {
		this.cssPath = newCssPath
	},
	resetCssPath : function() {
		this.cssPath = this.defaultCssPath
	},
	resetImagePath : function() {
		this.imagePath = this.defaultImagePath
	},
	setImagePath : function(newImagePath) {
		this.imagePath = newImagePath
	}
}
DHTMLSuite.globalVariableStorage = function() {
	var menuBar_highlightedItems;
	this.menuBar_highlightedItems = new Array();
	var arrayDSObjects;
	var arrayOfDhtmlSuiteObjects;
	this.arrayDSObjects = new Array();
	this.arrayOfDhtmlSuiteObjects = this.arrayDSObjects;
	var ajaxObjects;
	this.ajaxObjects = new Array()
}
DHTMLSuite.globalVariableStorage.prototype = {}
DHTMLSuite.common = function() {
	var loadedCSSFiles;
	var cssCacheStatus;
	var eventEls;
	var isOkToSelect;
	this.okToSelect = true;
	this.cssCacheStatus = true;
	this.eventEls = new Array()
}
DHTMLSuite.common.prototype = {
	init : function() {
		this.loadedCSSFiles = new Array()
	},
	loadCSS : function(cssFile, prefixConfigPath) {
		if (!prefixConfigPath && prefixConfigPath !== false)
			prefixConfigPath = true;
		if (!this.loadedCSSFiles[cssFile]) {
			this.loadedCSSFiles[cssFile] = true;
			var lt = document.createElement('LINK');
			if (!this.cssCacheStatus) {
				if (cssFile.indexOf('?') >= 0)
					cssFile = cssFile + '&';
				else
					cssFile = cssFile + '?';
				cssFile = cssFile + 'rand=' + Math.random()
			}
			if (prefixConfigPath) {
				lt.href = DHTMLSuite.configObj.cssPath + cssFile
			} else {
				lt.href = cssFile
			}
			lt.rel = 'stylesheet';
			lt.media = 'screen';
			lt.type = 'text/css';
			document.getElementsByTagName('HEAD')[0].appendChild(lt)
		}
	},
	__setTextSelOk : function(okToSelect) {
		this.okToSelect = okToSelect
	},
	__isTextSelOk : function() {
		return this.okToSelect
	},
	setCssCacheStatus : function(cssCacheStatus) {
		this.cssCacheStatus = cssCacheStatus
	},
	getEl : function(elRef) {
		if (typeof elRef == 'string') {
			if (document.getElementById(elRef))
				return document.getElementById(elRef);
			if (document.forms[elRef])
				return document.forms[elRef];
			if (document[elRef])
				return document[elRef];
			if (window[elRef])
				return window[elRef]
		}
		return elRef
	},
	isArray : function(el) {
		if (el.constructor.toString().indexOf("Array") != -1)
			return true;
		return false
	},
	getStyle : function(el, property) {
		el = this.getEl(el);
		if (document.defaultView && document.defaultView.getComputedStyle) {
			var retVal = null;
			var comp = document.defaultView.getComputedStyle(el, '');
			if (comp) {
				retVal = comp[property]
			}
			return el.style[property] || retVal
		}
		if (document.documentElement.currentStyle
				&& DHTMLSuite.clientInfoObj.isMSIE) {
			var retVal = null;
			if (el.currentStyle)
				value = el.currentStyle[property];
			return (el.style[property] || retVal)
		}
		return el.style[property]
	},
	getLeftPos : function(el) {
		if (document.getBoxObjectFor) {
			if (el.tagName != 'INPUT' && el.tagName != 'SELECT'
					&& el.tagName != 'TEXTAREA')
				return document.getBoxObjectFor(el).x
		}
		var returnValue = el.offsetLeft;
		while ((el = el.offsetParent) != null) {
			if (el.tagName != 'HTML') {
				returnValue += el.offsetLeft;
				if (document.all)
					returnValue += el.clientLeft
			}
		}
		return returnValue
	},
	getTopPos : function(el) {
		if (document.getBoxObjectFor) {
			if (el.tagName != 'INPUT' && el.tagName != 'SELECT'
					&& el.tagName != 'TEXTAREA')
				return document.getBoxObjectFor(el).y
		}
		var returnValue = el.offsetTop;
		while ((el = el.offsetParent) != null) {
			if (el.tagName != 'HTML') {
				returnValue += (el.offsetTop - el.scrollTop);
				if (document.all)
					returnValue += el.clientTop
			}
		}
		return returnValue
	},
	getCookie : function(name) {
		var start = document.cookie.indexOf(name + "=");
		var len = start + name.length + 1;
		if ((!start) && (name != document.cookie.substring(0, name.length)))
			return null;
		if (start == -1)
			return null;
		var end = document.cookie.indexOf(";", len);
		if (end == -1)
			end = document.cookie.length;
		return unescape(document.cookie.substring(len, end))
	},
	setCookie : function(name, value, expires, path, domain, secure) {
		expires = expires * 60 * 60 * 24 * 1000;
		var today = new Date();
		var expires_date = new Date(today.getTime() + (expires));
		var cookieString = name + "=" + escape(value)
				+ ((expires) ? ";expires=" + expires_date.toGMTString() : "")
				+ ((path) ? ";path=" + path : "")
				+ ((domain) ? ";domain=" + domain : "")
				+ ((secure) ? ";secure" : "");
		document.cookie = cookieString
	},
	deleteCookie : function(name, path, domain) {
		if (this.getCookie(name))
			document.cookie = name + "=" + ((path) ? ";path=" + path : "")
					+ ((domain) ? ";domain=" + domain : "")
					+ ";expires=Thu,01-Jan-1970 00:00:01 GMT"
	},
	cancelEvent : function() {
		return false
	},
	addEvent : function(obj, type, fn, suffix) {
		if (!suffix)
			suffix = '';
		if (obj.attachEvent) {
			if (typeof DHTMLSuite_funcs[type + fn + suffix] != 'function') {
				DHTMLSuite_funcs[type + fn + suffix] = function() {
					fn.apply(window.event.srcElement)
				};
				obj.attachEvent('on' + type, DHTMLSuite_funcs[type + fn
						+ suffix])
			}
			obj = null
		} else {
			obj.addEventListener(type, fn, false)
		}
		this.__addEventEl(obj)
	},
	removeEvent : function(obj, type, fn, suffix) {
		if (obj.detachEvent) {
			obj.detachEvent('on' + type, DHTMLSuite_funcs[type + fn + suffix]);
			DHTMLSuite_funcs[type + fn + suffix] = null;
			obj = null
		} else {
			obj.removeEventListener(type, fn, false)
		}
	},
	__clearMemoryGarbage : function() {
		if (!DHTMLSuite.clientInfoObj.isMSIE)
			return;
		for ( var no = 0; no < DHTMLSuite.eventEls.length; no++) {
			try {
				var el = DHTMLSuite.eventEls[no];
				el.onclick = null;
				el.onmousedown = null;
				el.onmousemove = null;
				el.onmouseout = null;
				el.onmouseover = null;
				el.onmouseup = null;
				el.onfocus = null;
				el.onblur = null;
				el.onkeydown = null;
				el.onkeypress = null;
				el.onkeyup = null;
				el.onselectstart = null;
				el.ondragstart = null;
				el.oncontextmenu = null;
				el.onscroll = null;
				el = null
			} catch (e) {
			}
		}
		for ( var no in DHTMLSuite.variableStorage.arrayDSObjects) {
			DHTMLSuite.variableStorage.arrayDSObjects[no] = null
		}
		window.onbeforeunload = null;
		window.onunload = null;
		DHTMLSuite = null
	},
	__addEventEl : function(el) {
		DHTMLSuite.eventEls[DHTMLSuite.eventEls.length] = el
	},
	getSrcElement : function(e) {
		var el;
		if (e.target)
			el = e.target;
		else if (e.srcElement)
			el = e.srcElement;
		if (el.nodeType == 3)
			el = el.parentNode;
		return el
	},
	getKeyFromEvent : function(e) {
		var code = this.getKeyCode(e);
		return String.fromCharCode(code)
	},
	getKeyCode : function(e) {
		if (e.keyCode)
			code = e.keyCode;
		else if (e.which)
			code = e.which;
		return code
	},
	isObjectClicked : function(obj, e) {
		var src = this.getSrcElement(e);
		var string = src.tagName + '(' + src.className + ')';
		if (src == obj)
			return true;
		while (src.parentNode && src.tagName.toLowerCase() != 'html') {
			src = src.parentNode;
			string = string + ',' + src.tagName + '(' + src.className + ')';
			if (src == obj)
				return true
		}
		return false
	},
	getObjectByClassName : function(e, className) {
		var src = this.getSrcElement(e);
		if (src.className == className)
			return src;
		while (src && src.tagName.toLowerCase() != 'html') {
			src = src.parentNode;
			if (src.className == className)
				return src
		}
		return false
	},
	getObjectByAttribute : function(e, attribute) {
		var src = this.getSrcElement(e);
		var att = src.getAttribute(attribute);
		if (!att)
			att = src[attribute];
		if (att)
			return src;
		while (src && src.tagName.toLowerCase() != 'html') {
			src = src.parentNode;
			var att = src.getAttribute('attribute');
			if (!att)
				att = src[attribute];
			if (att)
				return src
		}
		return false
	},
	getUniqueId : function() {
		var no = Math.random() + '';
		no = no.replace('.', '');
		var no2 = Math.random() + '';
		no2 = no2.replace('.', '');
		return no + no2
	},
	getAssociativeArrayFromString : function(propertyString) {
		if (!propertyString)
			return;
		var retArray = new Array();
		var items = propertyString.split(/,/g);
		for ( var no = 0; no < items.length; no++) {
			var tokens = items[no].split(/:/);
			retArray[tokens[0]] = tokens[1]
		}
		return retArray
	},
	correctPng : function(el) {
		el = DHTMLSuite.commonObj.getEl(el);
		var img = el;
		var width = img.width;
		var height = img.height;
		var html = '<span style="display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''
				+ img.src
				+ '\',sizingMethod=\'scale\');width:'
				+ width
				+ ';height:' + height + '"></span>';
		img.outerHTML = html
	},
	__evaluateJs : function(obj) {
		obj = this.getEl(obj);
		var scriptTags = obj.getElementsByTagName('SCRIPT');
		var string = '';
		var jsCode = '';
		for ( var no = 0; no < scriptTags.length; no++) {
			if (scriptTags[no].src) {
				var head = document.getElementsByTagName("head")[0];
				var scriptObj = document.createElement("script");
				scriptObj.setAttribute("type", "text/javascript");
				scriptObj.setAttribute("src", scriptTags[no].src)
			} else {
				if (DHTMLSuite.clientInfoObj.isOpera) {
					jsCode = jsCode + scriptTags[no].text + '\n'
				} else
					jsCode = jsCode + scriptTags[no].innerHTML
			}
		}
		if (jsCode)
			this.__installScript(jsCode)
	},
	__installScript : function(script) {
		try {
			if (!script)
				return;
			if (window.execScript) {
				window.execScript(script)
			} else if (window.jQuery && jQuery.browser.safari) {
				window.setTimeout(script, 0)
			} else {
				window.setTimeout(script, 0)
			}
		} catch (e) {
		}
	},
	__evaluateCss : function(obj) {
		obj = this.getEl(obj);
		var cssTags = obj.getElementsByTagName('STYLE');
		var head = document.getElementsByTagName('HEAD')[0];
		for ( var no = 0; no < cssTags.length; no++) {
			head.appendChild(cssTags[no])
		}
	}
}
DHTMLSuite.clientInfo = function() {
	var browser;
	var isOpera;
	var isMSIE;
	var isOldMSIE;
	var isFirefox;
	var navigatorVersion;
	var isOldMSIE
}
DHTMLSuite.clientInfo.prototype = {
	init : function() {
		this.browser = navigator.userAgent;
		this.isOpera = (this.browser.toLowerCase().indexOf('opera') >= 0) ? true
				: false;
		this.isFirefox = (this.browser.toLowerCase().indexOf('firefox') >= 0) ? true
				: false;
		this.isMSIE = (this.browser.toLowerCase().indexOf('msie') >= 0) ? true
				: false;
		this.isOldMSIE = (this.browser.toLowerCase().match(/msie\s[0-6]/gi)) ? true
				: false;
		this.isSafari = (this.browser.toLowerCase().indexOf('safari') >= 0) ? true
				: false;
		this.navigatorVersion = navigator.appVersion.replace(
				/.*?MSIE\s(\d\.\d).*/g, '$1') / 1;
		this.isOldMSIE = (this.isMSIE && this.navigatorVersion < 7) ? true
				: false
	},
	getBrowserWidth : function() {
		if (self.innerWidth)
			return self.innerWidth;
		return document.documentElement.offsetWidth
	},
	getBrowserHeight : function() {
		if (self.innerHeight)
			return self.innerHeight;
		return document.documentElement.offsetHeight
	}
}
DHTMLSuite.domQuery = function() {
	document.getElementsByClassName = this.getElementsByClassName;
	document.getElementsByAttribute = this.getElementsByAttribute
}
DHTMLSuite.domQuery.prototype = {}
if (!window.DHTMLSuite)
	var DHTMLSuite = new Object();
DHTMLSuite.menuModelItem = function() {
	var id;
	var itemText;
	var itemIcon;
	var url;
	var parentId;
	var separator;
	var jsFunction;
	var depth;
	var hasSubs;
	var type;
	var helpText;
	var state;
	var submenuWidth;
	var visible;
	this.state = 'regular'
}
DHTMLSuite.menuModelItem.prototype = {
	setMenuVars : function(id, itemText, itemIcon, url, parentId, helpText,
			jsFunction, type, submenuWidth) {
		this.id = id;
		this.itemText = itemText;
		this.itemIcon = itemIcon;
		this.url = url;
		this.parentId = parentId;
		this.jsFunction = jsFunction;
		this.separator = false;
		this.depth = false;
		this.hasSubs = false;
		this.helpText = helpText;
		this.submenuWidth = submenuWidth;
		this.visible = true;
		if (!type) {
			if (this.parentId)
				this.type = 'top';
			else
				this.type = 'sub'
		} else
			this.type = type
	},
	setAsSeparator : function(id, parentId) {
		this.id = id;
		this.parentId = parentId;
		this.separator = true;
		this.visible = true;
		if (this.parentId)
			this.type = 'top';
		else
			this.type = 'sub'
	},
	setVisibility : function(visible) {
		this.visible = visible
	},
	getState : function() {
		return this.state
	},
	setState : function(newState) {
		this.state = newState
	},
	setSubMenuWidth : function(newWidth) {
		this.submenuWidth = newWidth
	},
	setIcon : function(iconPath) {
		this.itemIcon = iconPath
	},
	setText : function(newText) {
		this.itemText = newText
	}
}
DHTMLSuite.menuModel = function() {
	var menuItems;
	var menuItemsOrder;
	var submenuType;
	var mainMenuGroupWidth;
	this.menuItems = new Object();
	this.menuItemsOrder = new Array();
	this.submenuType = new Array();
	this.submenuType[1] = 'top';
	for ( var no = 2; no < 20; no++) {
		this.submenuType[no] = 'sub'
	}
	try {
		if (!standardObjectsCreated)
			DHTMLSuite.createStandardObjects()
	} catch (e) {
		alert('Include the dhtmlSuite-common.js file')
	}
}
DHTMLSuite.menuModel.prototype = {
	addItem : function(id, itemText, itemIcon, url, parentId, helpText,
			jsFunction, type, submenuWidth) {
		if (!id)
			id = this.__getUniqueId();
		try {
			this.menuItems[id] = new DHTMLSuite.menuModelItem()
		} catch (e) {
			alert('Error: Include dhtmlSuite-menuModel.js in your html file')
		}
		this.menuItems[id].setMenuVars(id, itemText, itemIcon, url, parentId,
				helpText, jsFunction, type, submenuWidth);
		this.menuItemsOrder[this.menuItemsOrder.length] = id;
		return this.menuItems[id]
	},
	addItemsFromMarkup : function(ulId) {
		if (!document.getElementById(ulId)) {
			alert('<UL> tag with id ' + ulId + ' does not exist');
			return
		}
		var ulObj = document.getElementById(ulId);
		var liTags = ulObj.getElementsByTagName('LI');
		for ( var no = 0; no < liTags.length; no++) {
			var id = liTags[no].id.replace(/[^0-9]/gi, '');
			if (!id || this.menuItems[id])
				id = this.__getUniqueId();
			try {
				this.menuItems[id] = new DHTMLSuite.menuModelItem()
			} catch (e) {
				alert('Error: Include dhtmlSuite-menuModel.js in your html file')
			}
			this.menuItemsOrder[this.menuItemsOrder.length] = id;
			var parentId = 0;
			if (liTags[no].parentNode != ulObj)
				parentId = liTags[no].parentNode.parentNode.id;
			var type = liTags[no].getAttribute('itemType');
			if (!type)
				type = liTags[no].itemType;
			if (type == 'separator') {
				this.menuItems[id].setAsSeparator(id, parentId);
				continue
			}
			if (parentId)
				type = 'sub';
			else
				type = 'top';
			var aTag = liTags[no].getElementsByTagName('A')[0];
			if (!aTag) {
				continue
			}
			if (aTag)
				var itemText = aTag.innerHTML;
			var itemIcon = liTags[no].getAttribute('itemIcon');
			var url = aTag.href;
			if (url == '#' || url.substr(url.length - 1, 1) == '#')
				url = '';
			var jsFunction = liTags[no].getAttribute('jsFunction');
			var submenuWidth = false;
			var helpText = aTag.getAttribute('title');
			if (!helpText)
				helpText = aTag.title;
			this.menuItems[id].setMenuVars(id, itemText, itemIcon, url,
					parentId, helpText, jsFunction, type, submenuWidth)
		}
		var subUls = ulObj.getElementsByTagName('UL');
		for ( var no = 0; no < subUls.length; no++) {
			var width = subUls[no].getAttribute('width');
			if (!width)
				width = subUls[no].width;
			if (width) {
				var id = subUls[no].parentNode.id.replace(/[^0-9]/gi, '');
				this.setSubMenuWidth(id, width)
			}
		}
		ulObj.style.display = 'none'
	},
	setSubMenuWidth : function(id, newWidth) {
		this.menuItems[id].setSubMenuWidth(newWidth)
	},
	setMainMenuGroupWidth : function(newWidth) {
		this.mainMenuGroupWidth = newWidth
	},
	addSeparator : function(parentId) {
		id = this.__getUniqueId();
		if (!parentId)
			parentId = 0;
		try {
			this.menuItems[id] = new DHTMLSuite.menuModelItem()
		} catch (e) {
			alert('Error: Include dhtmlSuite-menuModel.js in your html file')
		}
		this.menuItems[id].setAsSeparator(id, parentId);
		this.menuItemsOrder[this.menuItemsOrder.length] = id;
		return this.menuItems[id]
	},
	init : function() {
		this.__getDepths();
		this.__setHasSubs()
	},
	setMenuItemVisibility : function(id, visible) {
		this.menuItems[id].setVisibility(visible)
	},
	setSubMenuType : function(depth, newType) {
		this.submenuType[depth] = newType;
		this.__getDepths()
	},
	getItems : function(parentId, returnArray) {
		if (!parentId)
			return this.menuItems;
		if (!returnArray)
			returnArray = new Array();
		for ( var no = 0; no < this.menuItemsOrder.length; no++) {
			var id = this.menuItemsOrder[no];
			if (!id)
				continue;
			if (this.menuItems[id].parentId == parentId) {
				returnArray[returnArray.length] = this.menuItems[id];
				if (this.menuItems[id].hasSubs)
					return this.getItems(this.menuItems[id].id, returnArray)
			}
		}
		return returnArray
	},
	__getUniqueId : function() {
		var num = Math.random() + '';
		num = num.replace('.', '');
		num = '99' + num;
		num = num / 1;
		while (this.menuItems[num]) {
			num = Math.random() + '';
			num = num.replace('.', '');
			num = num / 1
		}
		return num
	},
	__getDepths : function() {
		for ( var no = 0; no < this.menuItemsOrder.length; no++) {
			var id = this.menuItemsOrder[no];
			if (!id)
				continue;
			this.menuItems[id].depth = 1;
			if (this.menuItems[id].parentId) {
				this.menuItems[id].depth = this.menuItems[this.menuItems[id].parentId].depth + 1
			}
			this.menuItems[id].type = this.submenuType[this.menuItems[id].depth]
		}
	},
	__setHasSubs : function() {
		for ( var no = 0; no < this.menuItemsOrder.length; no++) {
			var id = this.menuItemsOrder[no];
			if (!id)
				continue;
			if (this.menuItems[id].parentId) {
				this.menuItems[this.menuItems[id].parentId].hasSubs = 1
			}
		}
	},
	__hasSubs : function(id) {
		for ( var no = 0; no < this.menuItemsOrder.length; no++) {
			var id = this.menuItemsOrder[no];
			if (!id)
				continue;
			if (this.menuItems[id].parentId == id)
				return true
		}
		return false
	},
	__deleteChildNodes : function(parentId, recursive) {
		var itemsToDeleteFromOrderArray = new Array();
		for ( var prop = 0; prop < this.menuItemsOrder.length; prop++) {
			var id = this.menuItemsOrder[prop];
			if (!id)
				continue;
			if (this.menuItems[id].parentId == parentId && parentId) {
				this.menuItems[id] = false;
				itemsToDeleteFromOrderArray[itemsToDeleteFromOrderArray.length] = id;
				this.__deleteChildNodes(id, true)
			}
		}
		if (!recursive) {
			for ( var prop = 0; prop < itemsToDeleteFromOrderArray.length; prop++) {
				if (!itemsToDeleteFromOrderArray[prop])
					continue;
				this
						.__deleteItemFromItemOrderArray(itemsToDeleteFromOrderArray[prop])
			}
		}
		this.__setHasSubs()
	},
	__deleteANode : function(id) {
		this.menuItems[id] = false;
		this.__deleteItemFromItemOrderArray(id)
	},
	__deleteItemFromItemOrderArray : function(id) {
		for ( var no = 0; no < this.menuItemsOrder.length; no++) {
			var tmpId = this.menuItemsOrder[no];
			if (!tmpId)
				continue;
			if (this.menuItemsOrder[no] == id) {
				this.menuItemsOrder.splice(no, 1);
				return
			}
		}
	},
	__appendMenuModel : function(newModel, parentId) {
		if (!newModel)
			return;
		var items = newModel.getItems();
		for ( var no = 0; no < newModel.menuItemsOrder.length; no++) {
			var id = newModel.menuItemsOrder[no];
			if (!id)
				continue;
			if (!items[id].parentId)
				items[id].parentId = parentId;
			this.menuItems[id] = items[id];
			for ( var no2 = 0; no2 < this.menuItemsOrder.length; no2++) {
				if (!this.menuItemsOrder[no2])
					continue;
				if (this.menuItemsOrder[no2] == items[id].id) {
					this.menuItemsOrder.splice(no2, 1)
				}
			}
			this.menuItemsOrder[this.menuItemsOrder.length] = items[id].id
		}
		this.__getDepths();
		this.__setHasSubs()
	}
}
if (!window.DHTMLSuite)
	var DHTMLSuite = new Object();
DHTMLSuite.menuBar = function() {
	var menuItemObj;
	var layoutCSS;
	var menuBarBackgroundImage;
	var menuItem_objects;
	var menuBarObj;
	var menuBarHeight;
	var menuItems;
	var highlightedItems;
	var menuBarState;
	var activeSubItemsOnMouseOver;
	var submenuGroups;
	var submenuIframes;
	var createIframesForOldIeBrowsers;
	var targetId;
	var menuItemCssPrefix;
	var cssPrefix;
	var menuItemLayoutCss;
	var objectIndex;
	this.cssPrefix = 'DHTMLSuite_';
	this.menuItemLayoutCss = false;
	this.layoutCSS = 'menu-bar.css';
	this.menuBarBackgroundImage = 'menu_strip_bg.jpg';
	this.menuItem_objects = new Object();
	DHTMLSuite.variableStorage.menuBar_highlightedItems = new Array();
	this.menuBarState = false;
	this.menuBarObj = false;
	this.menuBarHeight = 26;
	this.submenuGroups = new Array();
	this.submenuIframes = new Array();
	this.targetId = false;
	this.activeSubItemsOnMouseOver = false;
	this.menuItemCssPrefix = false;
	this.createIframesForOldIeBrowsers = true;
	try {
		if (!standardObjectsCreated)
			DHTMLSuite.createStandardObjects()
	} catch (e) {
		alert('Include the dhtmlSuite-common.js file')
	}
	this.objectIndex = DHTMLSuite.variableStorage.arrayDSObjects.length;
	;
	DHTMLSuite.variableStorage.arrayDSObjects[this.objectIndex] = this
}
DHTMLSuite.menuBar.prototype = {
	init : function() {
		DHTMLSuite.commonObj.loadCSS(this.layoutCSS);
		this.__createMainMenuDiv();
		this.__createMenuItems();
		this.__setBasicEvents();
		window.refToThismenuBar = this
	},
	setTarget : function(idOfHTMLElement) {
		this.targetId = idOfHTMLElement
	},
	setLayoutCss : function(nameOfNewCssFile) {
		this.layoutCSS = nameOfNewCssFile
	},
	setMenuItemLayoutCss : function(nameOfNewCssFile) {
		this.menuItemLayoutCss = nameOfNewCssFile
	},
	setCreateIframesForOldIeBrowsers : function(createIframesForOldIeBrowsers) {
		this.createIframesForOldIeBrowsers = createIframesForOldIeBrowsers
	},
	addMenuItems : function(menuItemObj) {
		this.menuItemObj = menuItemObj;
		this.menuItems = menuItemObj.getItems()
	},
	setActiveSubItemsOnMouseOver : function(activateSubOnMouseOver) {
		this.activeSubItemsOnMouseOver = activateSubOnMouseOver
	},
	setMenuItemState : function(menuItemId, state) {
		try {
			this.menuItem_objects[menuItemId].setState(state)
		} catch (e) {
			alert('menu item with id ' + menuItemId + ' does not exists or you have called the setMenuItemState method before the menu has been initialized')
		}
	},
	setMenuItemCssPrefix : function(newCssPrefix) {
		this.menuItemCssPrefix = newCssPrefix
	},
	setCssPrefix : function(newCssPrefix) {
		this.cssPrefix = newCssPrefix
	},
	deleteAllMenuItems : function() {
		this.hideSubMenus();
		this.__deleteMenuItems(0, false);
		this.__clearAllMenuItems()
	},
	replaceMenuItems : function(idOfParentMenuItem, newMenuModel) {
		this.hideSubMenus();
		this.__deleteMenuItems(idOfParentMenuItem);
		this.menuItemObj.__appendMenuModel(newMenuModel, idOfParentMenuItem);
		this.__clearAllMenuItems();
		this.__createMenuItems()
	},
	deleteMenuItems : function(idOfParentMenuItem, deleteParentElement) {
		this.__deleteMenuItems(idOfParentMenuItem, deleteParentElement);
		this.__clearAllMenuItems();
		this.__createMenuItems()
	},
	appendMenuItems : function(idOfParentMenuItem, newMenuModel) {
		this.hideSubMenus();
		this.menuItemObj.__appendMenuModel(newMenuModel, idOfParentMenuItem);
		this.__clearAllMenuItems();
		this.__createMenuItems()
	},
	hideMenuItem : function(menuItemId) {
		this.menuItem_objects[menuItemId].hide()
	},
	showMenuItem : function(menuItemId) {
		this.menuItem_objects[menuItemId].show()
	},
	setText : function(menuItemId, newText) {
		this.menuItem_objects[menuItemId].setText(newText)
	},
	setIcon : function(menuItemId, newPath) {
		this.menuItem_objects[menuItemId].setIcon(newPath)
	},
	__clearAllMenuItems : function() {
		for ( var prop = 0; prop < this.menuItemObj.menuItemsOrder.length; prop++) {
			var id = this.menuItemObj.menuItemsOrder[prop];
			if (!id)
				continue;
			if (this.submenuGroups[id]) {
				var div = document.getElementById(this.submenuGroups[id]);
				DHTMLSuite.discardElement(div);
				this.submenuGroups[id] = null
			}
			if (this.submenuIframes[id]) {
				var ref = document.getElementById(this.submenuIframes[id]);
				DHTMLSuite.discardElement(ref);
				this.submenuIframes[id] = null
			}
		}
		this.submenuGroups = new Array();
		this.submenuIframes = new Array();
		this.menuBarObj.innerHTML = ''
	},
	__deleteMenuItems : function(idOfParentMenuItem, includeParent) {
		if (includeParent)
			this.menuItemObj.__deleteANode(idOfParentMenuItem);
		if (!this.submenuGroups[idOfParentMenuItem])
			return;
		this.menuItem_objects[idOfParentMenuItem].__setHasSub(false);
		this.menuItemObj.__deleteChildNodes(idOfParentMenuItem);
		var groupBox = document
				.getElementById(this.submenuGroups[idOfParentMenuItem]);
		DHTMLSuite.discardElement(groupBox);
		if (this.submenuIframes[idOfParentMenuItem]) {
			DHTMLSuite.discardElement(this.submenuIframes[idOfParentMenuItem])
		}
		this.submenuGroups.splice(idOfParentMenuItem, 1);
		this.submenuIframes.splice(idOfParentMenuItem, 1)
	},
	__changeMenuBarState : function() {
		var objectIndex = this.getAttribute('objectRef');
		var obj = DHTMLSuite.variableStorage.arrayDSObjects[objectIndex];
		var parentId = this.id.replace(/[^0-9]/gi, '');
		var state = obj.menuItem_objects[parentId].getState();
		if (state == 'disabled')
			return;
		obj.menuBarState = !obj.menuBarState;
		if (!obj.menuBarState)
			obj.hideSubMenus();
		else {
			obj.hideSubMenus();
			setTimeout('DHTMLSuite.variableStorage.arrayDSObjects['
					+ objectIndex + '].__expandGroup(' + parentId + ')', 10)
		}
	},
	__createMainMenuDiv : function() {
		window.refTomenuBar = this;
		this.menuBarObj = document.createElement('DIV');
		this.menuBarObj.className = this.cssPrefix + 'menuBar_'
				+ this.menuItemObj.submenuType[1];
		if (!document.getElementById(this.targetId)) {
			alert('No target defined for the menu object');
			return
		}
		var target = document.getElementById(this.targetId);
		target.appendChild(this.menuBarObj)
	},
	hideSubMenus : function(e) {
		if (this && this.tagName) {
			if (document.all)
				e = event;
			var srcEl = DHTMLSuite.commonObj.getSrcElement(e);
			if (srcEl.tagName.toLowerCase() == 'img')
				srcEl = srcEl.parentNode;
			if (srcEl.className && srcEl.className.indexOf('arrow') >= 0) {
				return
			}
		}
		for ( var no = 0; no < DHTMLSuite.variableStorage.menuBar_highlightedItems.length; no++) {
			if (DHTMLSuite.variableStorage.menuBar_highlightedItems[no]
					.getState() != 'disabled')
				DHTMLSuite.variableStorage.menuBar_highlightedItems[no]
						.setState('regular');
			DHTMLSuite.variableStorage.menuBar_highlightedItems[no]
					.__hideGroup()
		}
		DHTMLSuite.variableStorage.menuBar_highlightedItems = new Array()
	},
	__hideSubMenusAfterSmallDelay : function() {
		var ind = this.objectIndex;
		setTimeout(
				'DHTMLSuite.variableStorage.arrayDSObjects[' + ind + '].hideSubMenus()',
				15)
	},
	__expandGroup : function(idOfParentMenuItem) {
		var groupRef = document
				.getElementById(this.submenuGroups[idOfParentMenuItem]);
		var subDiv = groupRef.getElementsByTagName('DIV')[0];
		var numericId = subDiv.id.replace(/[^0-9]/g, '');
		groupRef.style.visibility = 'visible';
		if (this.submenuIframes[idOfParentMenuItem])
			document.getElementById(this.submenuIframes[idOfParentMenuItem]).style.visibility = 'visible';
		DHTMLSuite.variableStorage.menuBar_highlightedItems[DHTMLSuite.variableStorage.menuBar_highlightedItems.length] = this.menuItem_objects[numericId];
		this.__positionSubMenu(idOfParentMenuItem);
		if (DHTMLSuite.clientInfoObj.isOpera) {
			var subDiv = groupRef.getElementsByTagName('DIV')[0];
			subDiv.className = subDiv.className.replace('_over', '_over')
		}
	},
	__activateMenuElements : function(e, firstIteration, parentMenuItemObject) {
		if (!parentMenuItemObject) {
			if (document.all)
				e = event;
			parentMenuItemObject = DHTMLSuite.commonObj.getSrcElement(e);
			if (!parentMenuItemObject.getAttribute('DHTMLSuite_menuItem'))
				parentMenuItemObject = parentMenuItemObject.parentNode;
			if (!parentMenuItemObject.getAttribute('DHTMLSuite_menuItem'))
				parentMenuItemObject = parentMenuItemObject.parentNode
		}
		var numericId = parentMenuItemObject.id.replace(/[^0-9]/g, '');
		var state = this.menuItem_objects[numericId].getState();
		if (state == 'disabled')
			return;
		this.menuItem_objects[numericId].setState('over');
		if (!this.menuBarState && !this.activeSubItemsOnMouseOver)
			return;
		if (firstIteration
				&& DHTMLSuite.variableStorage.menuBar_highlightedItems.length > 0) {
			this.hideSubMenus()
		}
		var newState = 'over';
		if (!firstIteration)
			newState = 'active';
		this.menuItem_objects[numericId].setState(newState);
		if (this.submenuGroups[numericId]) {
			this.__expandGroup(numericId)
		}
		DHTMLSuite.variableStorage.menuBar_highlightedItems[DHTMLSuite.variableStorage.menuBar_highlightedItems.length] = this.menuItem_objects[numericId];
		if (this.menuItems[numericId].parentId) {
			this
					.__activateMenuElements(
							false,
							false,
							document
									.getElementById(this.menuItem_objects[this.menuItems[numericId].parentId].divElement))
		}
	},
	__createMenuItems : function() {
		var index = this.objectIndex;
		var firstChild = false;
		var firstChilds = document.getElementsByTagName('DIV');
		if (firstChilds.length > 0)
			firstChild = firstChilds[0]
		for ( var no = 0; no < this.menuItemObj.menuItemsOrder.length; no++) {
			var indexThis = this.menuItemObj.menuItemsOrder[no];
			if (!this.menuItems[indexThis].id)
				continue;
			try {
				this.menuItem_objects[this.menuItems[indexThis].id] = new DHTMLSuite.menuItem()
			} catch (e) {
				alert('Error: Include dhtmlSuite-menuItem.js in your html file')
			}
			if (this.menuItemCssPrefix)
				this.menuItem_objects[this.menuItems[indexThis].id]
						.setCssPrefix(this.menuItemCssPrefix);
			if (this.menuItemLayoutCss)
				this.menuItem_objects[this.menuItems[indexThis].id]
						.setLayoutCss(this.menuItemLayoutCss);
			var ref = this.menuItem_objects[this.menuItems[indexThis].id]
					.createItem(this.menuItems[indexThis]);
			ref.setAttribute('DHTMLSuite_menuItem', 1);
			if (!this.menuItems[indexThis].separator) {
				ref.onmouseover = function(e) {
					DHTMLSuite.variableStorage.arrayDSObjects[index]
							.__activateMenuElements(e, true)
				}
			}
			if (!this.menuItems[indexThis].jsFunction
					&& !this.menuItems[indexThis].url) {
				ref.setAttribute('objectRef', index);
				ref.onclick = this.__changeMenuBarState
			}
			DHTMLSuite.commonObj.__addEventEl(ref);
			if (this.menuItem_objects[this.menuItems[indexThis].id].expandElement
					&& 1 == 2) {
				try {
					var expandRef = document
							.getElementById(this.menuItem_objects[this.menuItems[indexThis].id].expandElement);
					var parentId = DHTMLSuite.variableStorage.arrayDSObjects[index].menuItems[indexThis].parentId + '';
					var tmpId = expandRef.id.replace(/[^0-9]/gi, '');
					expandRef.setAttribute('objectRef', index / 1);
					expandRef.objectRef = index / 1
				} catch (e) {
				}
			}
			var target = this.menuBarObj;
			if (this.menuItems[indexThis].depth == 1
					&& this.menuItemObj.submenuType[this.menuItems[indexThis].depth] != 'top'
					&& this.menuItemObj.mainMenuGroupWidth) {
				var tmpWidth = this.menuItemObj.mainMenuGroupWidth + '';
				if (tmpWidth.indexOf('%') == -1)
					tmpWidth = tmpWidth + 'px';
				target.style.width = tmpWidth
			}
			if (this.menuItems[indexThis].depth == '1') {
				if (this.menuItemObj.submenuType[this.menuItems[indexThis].depth] == 'top') {
					ref.style.styleFloat = 'left';
					ref.style.cssText = 'float:left'
				}
			} else {
				if (!this.menuItems[indexThis].depth) {
					alert('Error in menu model(depth not defined for a menu item). Remember to call the init()method for the menuModel object.');
					return
				}
				if (!this.submenuGroups[this.menuItems[indexThis].parentId]) {
					this.submenuGroups[this.menuItems[indexThis].parentId] = 'DHTMLSuite_menuBarSubGroup' + this.menuItems[indexThis].parentId;
					var div = document.createElement('DIV');
					div.style.zIndex = 30000;
					div.style.position = 'absolute';
					div.id = this.submenuGroups[this.menuItems[indexThis].parentId];
					div.style.visibility = 'hidden';
					div.className = this.cssPrefix
							+ 'menuBar_'
							+ this.menuItemObj.submenuType[this.menuItems[indexThis].depth];
					if (firstChild) {
						firstChild.parentNode.insertBefore(div, firstChild)
					} else {
						document.body.appendChild(div)
					}
					if (DHTMLSuite.clientInfoObj.isMSIE
							&& this.createIframesForOldIeBrowsers) {
						this.submenuIframes[this.menuItems[indexThis].parentId] = 'DHTMLSuite_menuBarIframe_' + this.menuItems[indexThis].parentId;
						var iframe = document
								.createElement('<IFRAME src="about:blank" frameborder=0>');
						iframe.id = this.submenuIframes[this.menuItems[indexThis].parentId];
						iframe.style.position = 'absolute';
						iframe.style.zIndex = 9000;
						iframe.style.visibility = 'hidden';
						if (firstChild) {
							firstChild.parentNode.insertBefore(iframe,
									firstChild)
						} else {
							document.body.appendChild(iframe)
						}
					}
				}
				target = document
						.getElementById(this.submenuGroups[this.menuItems[indexThis].parentId])
			}
			target.appendChild(ref);
			if (this.menuItems[indexThis].visible == false)
				this.hideMenuItem(this.menuItems[indexThis].id);
			if (this.menuItems[indexThis].state != 'regular')
				this.menuItem_objects[this.menuItems[indexThis].id]
						.setState(this.menuItems[indexThis].state)
		}
		this.__setSizeOfAllSubMenus();
		this.__positionAllSubMenus();
		if (DHTMLSuite.clientInfoObj.isOpera)
			this.__fixMenuLayoutForOperaBrowser()
	},
	__fixMenuLayoutForOperaBrowser : function() {
		for ( var no = 0; no < this.menuItemObj.menuItemsOrder.length; no++) {
			var id = this.menuItemObj.menuItemsOrder[no];
			if (!id)
				continue;
			document.getElementById(this.menuItem_objects[id].divElement).className = document
					.getElementById(this.menuItem_objects[id].divElement).className
					.replace('_regular', '_regular')
		}
	},
	__setSizeOfAllSubMenus : function() {
		for ( var no = 0; no < this.menuItemObj.menuItemsOrder.length; no++) {
			var prop = this.menuItemObj.menuItemsOrder[no];
			if (!prop)
				continue;
			this.__setSizeOfSubMenus(prop)
		}
	},
	__positionAllSubMenus : function() {
		for ( var no = 0; no < this.menuItemObj.menuItemsOrder.length; no++) {
			var prop = this.menuItemObj.menuItemsOrder[no];
			if (!prop)
				continue;
			if (this.submenuGroups[prop])
				this.__positionSubMenu(prop)
		}
	},
	__positionSubMenu : function(parentId) {
		try {
			var shortRef = document
					.getElementById(this.submenuGroups[parentId]);
			var depth = this.menuItems[parentId].depth;
			var dir = this.menuItemObj.submenuType[depth];
			var ref = document
					.getElementById(this.menuItem_objects[parentId].divElement);
			if (dir == 'top') {
				shortRef.style.left = DHTMLSuite.commonObj.getLeftPos(ref) + 'px';
				shortRef.style.top = (DHTMLSuite.commonObj.getTopPos(ref) + ref.offsetHeight) + 'px'
			} else {
				shortRef.style.left = (DHTMLSuite.commonObj.getLeftPos(ref) + ref.offsetWidth) + 'px';
				shortRef.style.top = (DHTMLSuite.commonObj.getTopPos(ref)) + 'px'
			}
			if (DHTMLSuite.clientInfoObj.isMSIE) {
				var iframeRef = document
						.getElementById(this.submenuIframes[parentId]);
				iframeRef.style.left = shortRef.style.left;
				iframeRef.style.top = shortRef.style.top;
				iframeRef.style.width = shortRef.clientWidth + 'px';
				iframeRef.style.height = shortRef.clientHeight + 'px'
			}
		} catch (e) {
		}
	},
	__setSizeOfSubMenus : function(parentId) {
		try {
			var shortRef = document
					.getElementById(this.submenuGroups[parentId]);
			var subWidth = Math
					.max(
							shortRef.offsetWidth,
							document
									.getElementById(this.menuItem_objects[parentId].divElement).offsetWidth);
			if (this.menuItems[parentId].submenuWidth)
				subWidth = this.menuItems[parentId].submenuWidth;
			if (subWidth > 400)
				subWidth = 150;
			subWidth = subWidth + '';
			if (subWidth.indexOf('%') == -1)
				subWidth = subWidth + 'px';
			shortRef.style.width = subWidth;
			if (DHTMLSuite.clientInfoObj.isMSIE) {
				var ref = document
						.getElementById(this.submenuIframes[parentId]);
				ref.style.width = shortRef.style.width;
				ref.style.height = shortRef.style.height
			}
		} catch (e) {
		}
	},
	__repositionMenu : function(inputObj) {
		inputObj.menuBarObj.style.top = document.documentElement.scrollTop + 'px'
	},
	__menuItemRollOver : function(menuItemHTMLElementRef) {
		var numericId = menuItemHTMLElementRef.id.replace(/[^0-9]/g, '');
		menuItemHTMLElementRef.className = 'DHTMLSuite_menuBar_menuItem_over_' + this.menuItems[numericId]['depth']
	},
	__menuItemRollOut : function(menuItemHTMLElementRef) {
		var numericId = menuItemHTMLElementRef.id.replace(/[^0-9]/g, '');
		menuItemHTMLElementRef.className = 'DHTMLSuite_menuBar_menuItem_' + this.menuItems[numericId]['depth']
	},
	__menuNavigate : function(menuItemHTMLElementRef) {
		var numericIndex = menuItemHTMLElementRef.id.replace(/[^0-9]/g, '');
		var url = this.menuItems[numericIndex]['url'];
		if (!url)
			return
	},
	__setBasicEvents : function() {
		var ind = this.objectIndex;
		DHTMLSuite.commonObj.addEvent(document.documentElement, "click",
				this.hideSubMenus);
		DHTMLSuite.commonObj.addEvent(document.documentElement, "mouseup",
				this.hideSubMenus)
	}
}
if (!window.DHTMLSuite)
	var DHTMLSuite = new Object();
DHTMLSuite.menuItem = function() {
	var layoutCSS;
	var divElement;
	var expandElement;
	var cssPrefix;
	var modelItemRef;
	this.layoutCSS = 'menu-item.css';
	this.cssPrefix = 'DHTMLSuite_';
	try {
		if (!standardObjectsCreated)
			DHTMLSuite.createStandardObjects()
	} catch (e) {
		alert('Include the dhtmlSuite-common.js file')
	}
	var objectIndex;
	this.objectIndex = DHTMLSuite.variableStorage.arrayDSObjects.length
}
DHTMLSuite.menuItem.prototype = {
	createItem : function(menuModelItemObj) {
		DHTMLSuite.commonObj.loadCSS(this.layoutCSS);
		DHTMLSuite.variableStorage.arrayDSObjects[this.objectIndex] = this;
		this.modelItemRef = menuModelItemObj;
		this.divElement = 'DHTMLSuite_menuItem' + menuModelItemObj.id;
		var div = document.createElement('DIV');
		document.body.appendChild(div);
		div.id = this.divElement;
		div.className = this.cssPrefix + 'menuItem_' + menuModelItemObj.type
				+ '_regular';
		div.onselectstart = function() {
			return false
		};
		if (menuModelItemObj.helpText) {
			div.title = menuModelItemObj.helpText
		}
		if (menuModelItemObj.type == 'top') {
			this.__createMenuElementsOfTypeTop(div)
		}
		if (menuModelItemObj.type == 'sub') {
			this.__createMenuElementsOfTypeSub(div)
		}
		if (menuModelItemObj.separator) {
			div.className = this.cssPrefix + 'menuItem_separator_'
					+ menuModelItemObj.type;
			div.innerHTML = '<span></span>'
		} else {
			var tmpVar = this.objectIndex / 1;
			div.onclick = function(e) {
				DHTMLSuite.variableStorage.arrayDSObjects[tmpVar].__navigate(e)
			}
			div.onmousedown = this.__clickMenuItem;
			div.onmouseup = this.__rolloverMenuItem;
			div.onmouseover = this.__rolloverMenuItem;
			div.onmouseout = this.__rolloutMenuItem
		}
		DHTMLSuite.commonObj.__addEventEl(div);
		return div
	},
	setLayoutCss : function(newLayoutCss) {
		this.layoutCSS = newLayoutCss
	},
	__createMenuElementsOfTypeTop : function(parentEl) {
		if (this.modelItemRef.itemIcon) {
			var iconDiv = document.createElement('DIV');
			iconDiv.innerHTML = '<img src="' + this.modelItemRef.itemIcon + '">';
			iconDiv.id = 'menuItemIcon' + this.modelItemRef.id
			parentEl.appendChild(iconDiv)
		}
		if (this.modelItemRef.itemText) {
			var div = document.createElement('DIV');
			div.innerHTML = this.modelItemRef.itemText;
			div.className = this.cssPrefix + 'menuItem_textContent';
			div.id = 'menuItemText' + this.modelItemRef.id;
			parentEl.appendChild(div)
		}
		if (this.modelItemRef.hasSubs) {
			var div = document.createElement('DIV');
			div.className = this.cssPrefix + 'menuItem_top_arrowShowSub';
			div.id = 'DHTMLSuite_menuBar_arrow' + this.modelItemRef.id;
			parentEl.appendChild(div);
			this.expandElement = div.id
		}
	},
	__createMenuElementsOfTypeSub : function(parentEl) {
		if (this.modelItemRef.itemIcon) {
			parentEl.style.backgroundImage = 'url(\'' + this.modelItemRef.itemIcon + '\')';
			parentEl.style.backgroundRepeat = 'no-repeat';
			parentEl.style.backgroundPosition = 'left center'
		}
		if (this.modelItemRef.itemText) {
			var div = document.createElement('DIV');
			div.className = 'DHTMLSuite_textContent';
			div.innerHTML = this.modelItemRef.itemText;
			div.className = this.cssPrefix + 'menuItem_textContent';
			div.id = 'menuItemText' + this.modelItemRef.id;
			parentEl.appendChild(div)
		}
		if (this.modelItemRef.hasSubs) {
			var div = document.createElement('DIV');
			div.className = this.cssPrefix + 'menuItem_sub_arrowShowSub';
			parentEl.appendChild(div);
			div.id = 'DHTMLSuite_menuBar_arrow' + this.modelItemRef.id;
			this.expandElement = div.id;
			div.previousSibling.style.paddingRight = '15px'
		}
	},
	setCssPrefix : function(cssPrefix) {
		this.cssPrefix = cssPrefix
	},
	setIcon : function(newPath) {
		this.modelItemRef.setIcon(newPath);
		if (this.modelItemRef.type == 'top') {
			var div = document
					.getElementById('menuItemIcon' + this.modelItemRef.id);
			var img = div.getElementsByTagName('IMG')[0];
			if (!img) {
				img = document.createElement('IMG');
				div.appendChild(img)
			}
			img.src = newPath;
			if (!newPath)
				DHTMLSuite.discardElement(img)
		}
		if (this.modelItemRef.type == 'sub') {
			document.getElementById(this.divElement).style.backgroundImage = 'url(\'' + newPath + '\')'
		}
	},
	setText : function(newText) {
		this.modelItemRef.setText(newText);
		document.getElementById('menuItemText' + this.modelItemRef.id).innerHTML = newText
	},
	__clickMenuItem : function() {
		this.className = this.className.replace('_regular', '_click');
		this.className = this.className.replace('_over', '_click')
	},
	__rolloverMenuItem : function() {
		this.className = this.className.replace('_regular', '_over');
		this.className = this.className.replace('_click', '_over')
	},
	__rolloutMenuItem : function() {
		this.className = this.className.replace('_over', '_regular')
	},
	setState : function(newState) {
		document.getElementById(this.divElement).className = this.cssPrefix
				+ 'menuItem_' + this.modelItemRef.type + '_' + newState;
		this.modelItemRef.setState(newState)
	},
	getState : function() {
		var state = this.modelItemRef.getState();
		if (!state) {
			if (document.getElementById(this.divElement).className
					.indexOf('_over') >= 0)
				state = 'over';
			if (document.getElementById(this.divElement).className
					.indexOf('_click') >= 0)
				state = 'click';
			this.modelItemRef.setState(state)
		}
		return state
	},
	__setHasSub : function(hasSubs) {
		this.modelItemRef.hasSubs = hasSubs;
		if (!hasSubs) {
			document.getElementById(this.cssPrefix + 'menuBar_arrow'
					+ this.modelItemRef.id).style.display = 'none'
		} else {
			document.getElementById(this.cssPrefix + 'menuBar_arrow'
					+ this.modelItemRef.id).style.display = 'block'
		}
	},
	hide : function() {
		this.modelItemRef.setVisibility(false);
		document.getElementById(this.divElement).style.display = 'none'
	},
	show : function() {
		this.modelItemRef.setVisibility(true);
		document.getElementById(this.divElement).style.display = 'block'
	},
	__hideGroup : function() {
		if (this.modelItemRef.parentId) {
			document.getElementById(this.divElement).parentNode.style.visibility = 'hidden';
			if (DHTMLSuite.clientInfoObj.isMSIE) {
				try {
					var tmpId = document.getElementById(this.divElement).parentNode.id
							.replace(/[^0-9]/gi, '');
					document
							.getElementById('DHTMLSuite_menuBarIframe_' + tmpId).style.visibility = 'hidden'
				} catch (e) {
				}
			}
		}
	},
	__navigate : function(e) {
		if (document.all)
			e = event;
		if (e) {
			var srcEl = DHTMLSuite.commonObj.getSrcElement(e);
			if (srcEl.id.indexOf('arrow') >= 0)
				return
		}
		if (this.modelItemRef.state == 'disabled')
			return;
		if (this.modelItemRef.url) {
			location.href = this.modelItemRef.url
		}
		if (this.modelItemRef.jsFunction) {
			try {
				eval(this.modelItemRef.jsFunction)
			} catch (e) {
				alert('Defined Javascript code for the menu item(' + this.modelItemRef.jsFunction + ')cannot be executed')
			}
		}
	}
}
