var Util =
{
	currentHost: "",

	libraryScript :
	{
		"script":	["prototype.js", "behaviour.js", "prototype.extensions.js", "onLoadDropDown.js", "DropDown.js", "WriteSubmenu.js"]
	},

	importScript : function()
	{
		Util.setCurrentHost();
		var library = Util.libraryScript;

		for( var libraryPath in library )
		{
			var libraryList = library[libraryPath];
			for(var i=0; i<libraryList.length; i++)
			{
				var libraryName =Util.currentHost + libraryPath + "/" + libraryList[i];
				document.write('<script type="text/javascript" src="' + libraryName + '"></script>\n');
			}
		}
	},

	setCurrentHost: function()
	{
		var scripts = document.getElementsByTagName("script");
		for( var i=0; i<scripts.length; i++ )
		{
			if (scripts[i].src.indexOf("Util.js") != -1)
			{
				var posSlash = scripts[i].src.indexOf("script");
				var newPath = scripts[i].src.substr(0, posSlash);
//				console.info(scripts[i].src);
//				console.info(newPath);
				this.currentHost = newPath;
			}
		}
	}

}

Util.importScript();
