obr = new Array(
"gts_themes/red/images/arrow_back.gif",
"gts_themes/red/images/arrow_down.gif",
"gts_themes/red/images/arrow_more.gif",
"gts_themes/red/images/arrow_next.gif",
"gts_themes/red/images/arrow_prev.gif",
"gts_themes/red/images/arrow_up.gif",
"gts_themes/red/images/bg_button.gif",
"gts_themes/red/images/bg_html.gif",
"gts_themes/red/images/bg_input.gif",
"gts_themes/red/images/bg_mainmenu.gif",
"gts_themes/red/images/dotted_color.gif",
"gts_themes/red/images/dotted_light.gif",
"gts_themes/red/images/logo.gif",
"gts_themes/red/images/logo2.gif",
"gts_themes/red/lightbox/images/blank.gif",
"gts_themes/red/lightbox/images/closelabel.gif",
"gts_themes/red/lightbox/images/loading.gif",
"gts_themes/red/lightbox/images/nextlabel.gif",
"gts_themes/red/lightbox/images/prevlabel.gif"
);
img = new Array();
for (i=0;i<obr.length;i++)
{
img[i] = new Image();
img[i].src = obr[i];
};

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 download(src)
{
	txt = new String(src);
	arr = txt.split("/");
	self.location.href = self.location+"&file="+arr.pop();
	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 (anchors[i].className == "download") anchors[i].onclick = function() { return download(this); };
		}
	}
	if (dTables = document.getElementsByTagName("table"))
	{
		for (var i = 0; i<dTables.length; i++)
		{
			if (dTables[i].className == "thumbnails")
			{
				dTables[i].getElementsByTagName("tbody")[0].style.visibility = "visible";
				dTables[i].style.backgroundImage = "none";
			}
		}
	}
	if (document.all && !window.opera) autoForm();
	if (bHide = document.getElementById("dHide")) bHide.style.visibility = "visible";
}

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