function skait()
{
	kodas = '<div style="padding: 9px 9px 5px 9px;">';
	for(i=0; i<=6; i++)
	{
		kiek = 50 - d[i];
		kodas = kodas + '<div class="stulp" style="height:' + d[i] + 'px; margin-top: '+kiek+'px"><div style="background:#F7F7F7; height:' + du[i] + 'px"></div></div>';
		if(i != 6)
		{
			kodas = kodas + '<div class="tarps"></div>';
		}
	}
	kodas = kodas + '</div><div class="both"></div><p class="zdt">Viso: '+viso+'<br/>Šiandien: '+snd+'</p>';
	document.getElementById("lank").innerHTML=kodas;
}
a = 0;
function cng(ap, im)
{
	tmp = ' <a href="#" onclick="cng(\'' + ap + '\', \'' + im + '\')">';
	pus = '</a><br/><br/><img alt="' + ap + '" title="' + ap + '" src="' + im + '_';
	tm2 = '.jpg" onclick="self.close()"/>';
	if(a == 0)
	{
		a = 2;
		kds = tmp + '&lt;&lt;&lt; Kita pusė' + pus + 'b' + tm2;
	}
	else
	{
		a = 0;
		kds = tmp + 'Kita pusė &gt;&gt;&gt;' + pus + 'a' + tm2;
	}
	document.getElementById("vs").innerHTML=kds;
}

var  newWindow;
function gonew(url, wnm, para)
{
	if(wnm == '')
	{
		wnm = 'pagr';
	}
//	window.open(url, wnm, para);
	if (newWindow && !newWindow.closed)
	{
		newWindow.location.href = theURL;
		newWindow.focus();
	}
	else
		newWindow = open(url, wnm, para);
}
function here(url)
{
	window.location = url;
}
function externalLinks()
{
	if(!document.getElementsByTagName)
		return;
	var anchors = document.getElementsByTagName("a");
	for(var i=0; i<anchors.length; i++)
	{
		var anchor = anchors[i];
		s = anchor.getAttribute("rel");
		if(!(s == null))
		{
			mas = s.split(' ');
			if(anchor.getAttribute("href") && ((anchor.getAttribute("rel") == "nofollow") || (anchor.getAttribute("rel") == "new")))
				anchor.target = "_blank";
		}
	}
}
window.onload = externalLinks;