HQ = {
	Web : {
		loadFile : function(id, file)
		{
			var object = document.getElementById(id);
			var req = new XMLHttpRequest();
			req.open('GET', file, true);
			req.onreadystatechange = function (aEvt)
			{
				if (req.readyState == 4)
				{
					if(req.status == 200)
					{
						object.innerHTML = req.responseText;
					}
				}
			};

			req.send(null);
		},

		loadNextImage : function(imgId, path, images)
		{
			imgObj = document.getElementById(imgId);

			if (typeof HQ.Web.loadNextImage.counter == 'undefined')
			{
				HQ.Web.loadNextImage.counter = 0;
			}

			imgObj.style.visibility = 'hidden';
			imgObj.onload = function() {imgObj.style.visibility = 'visible';}
			imgObj.src = path+images[HQ.Web.loadNextImage.counter];
			HQ.Web.loadNextImage.counter ++;
			if (images.length <= HQ.Web.loadNextImage.counter) HQ.Web.loadNextImage.counter = 0;
		}
	}
}