addEvent(document, 'DOMContentLoaded', function()
	{
		var feature = document.getElementById("feature");
		if (feature)
		{
			var imgs = feature.getElementsByTagName("img");
			for (var i = 0; i < imgs.length; ++i)
			{
				imgs[i].galleryImg = false;
			}
		}
	});

addEvent(document, 'DOMContentLoaded', function()
	{
		var anchors = getElementsByClassName(document, 'a', 'clickcall');
		for (var i = 0; i < anchors.length; ++i)
		{
			addEvent(anchors[i], 'click', function(e)
				{
					showPopup(this.href, 'clickcall', 370, 450, false, false, false);
					return doPreventDefault(e);
				});
			addEvent(anchors[i], 'mouseover', function(e)
				{
					window.status = this.getElementsByTagName("img")[0].alt;
				});
			addEvent(anchors[i], 'mouseout', function(e)
				{
					window.status = '';
				});
		}
	});

addEvent(document, 'DOMContentLoaded', function()
	{

		var menus = getElementsByClassName(document, 'ul', 'menu');
		for (var idxMenu = 0; idxMenu < menus.length; ++idxMenu)
		{
			var anchors = menus[idxMenu].getElementsByTagName("a");
			for (var idxAnchors = 0; idxAnchors < anchors.length; ++idxAnchors)
			{
				var a = anchors[idxAnchors];
				var a_host = a.href.split('/')[2];
				if (a_host != location.host)
				{
					a.rel = "external";
				}
			}
		}

		var anchors = document.getElementsByTagName("a");
		for (var i = 0; i < anchors.length; ++i)
		{
			var anchor = anchors[i];
			if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
			{
				anchor.target = "_blank";
			}
		}

	});
