function changeClass(obj, new_class)
{
    obj.className = new_class;
}

function changeBgColor(obj, new_color)
{
	obj.style.backgroundColor=new_color;
}

function changePic(name, pic)
{
	name.src = pic;
}

function popup(url, name, width, height)
{
	left_pos = (screen.width / 2) - (width / 2);
	top_pos = (screen.height / 2) - (height / 2);
	window.open(url, name, 'width=' + width + ',height=' + height + ',left=' + left_pos + ',top=' + top_pos);	
}

function externalLinks()
{
	if (!document.getElementsByTagName) return;
	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";
	}
}
window.onload = externalLinks;

 function popup (url)
{
	var sizeX=520;
	var sizeY=540;
	window.open(url, 'NovoOkno', 'resizable=yes,scrollbars=no, width='+sizeX+', height='+sizeY+', screenX=0, screenY=0, top=0, left=0');
	return false;
}