var MyLink;
var Clicked = 0;

function ChangeClass(ID, NewClass)
{
	document.getElementById(ID).className = NewClass;
}

function ShowDiv(ID)
{
	document.getElementById(ID).style.display = 'block';
}

function HideDiv(ID)
{
	document.getElementById(ID).style.display = 'none';
}

function SetMyLink(Link)
{
	MyLink = Link;
}

function GetMyLink()
{
	return MyLink;
}

function GoTo(Link)
{
	document.location.href = Link;
}

function GoToWait(Link, Wait)
{
	window.setTimeout("GoTo('" + Link + "')", Wait);
}

function SetLoading(Theme, ID)
{
	document.getElementById(ID).innerHTML = '<img class=\"GeneralLinkImg\" src=\"themes/' + Theme + '/images/loading.gif\" alt=\"\"/>';
}

function OpenImgBox(Image, Width, Height)
{
	var Width2 = parseInt(Width) + 18;

	newWindow = window.open("", "newWindow", 'width=' + Width2 + ', height=' + Height);
	newWindow.document.open();
	newWindow.document.write('<html><body topmargin="0">'); 
	newWindow.document.write('<center><a href="javascript:self.close();"><img width=\"' + Width + '\" height=\"' + Height + '\" src=\"'+ Image +'\" border=\"0\"></a></center>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}