if (self != top)
{
	top.location.href = self.location;
}

function autoForm()
{
	if (df = document.forms)
	{
		for (var i = 0; i < df.length; i++)
		{
			df[i].setAttribute('autocomplete', 'off');
			for (var j = 0; j < df[i].elements.length; j++)
				if ((df[i].elements[j].type == "submit") && (df[i].elements[j].type == "image"))
					df[i].elements[j].click = function(){ return null; }
		}
	}
}

function popupWin(src)
{
	h = window.opera ? window.innerHeight-10 : screen.availHeight;
	pwi = window.open(src, 'blank', 'width=800, height='+h+', left=0, top=0, resizable=yes, scrollbars=yes');
	pwi.focus();
	void(0);
	return false;
}

function autoLoad()
{
	if (anchors = document.getElementsByTagName("a"))
	{
		for (var i = 0; i<anchors.length; i++)
		{
			if (anchors[i].className == "blank") anchors[i].target = "_blank";
			if (anchors[i].className == "popup") anchors[i].onclick = function() { return popupWin(this); };
		}
	}
	if (document.all && !window.opera) autoForm();
}

try
{
	window.addEventListener("load", autoLoad, true);
}
catch(e)
{
	window.attachEvent("onload", autoLoad);
}

