function toggle(id, max)
{
	for (i=1;i<=max;i++)
		document.getElementById('preview' + i).style.display = 'none';
	document.getElementById('preview' + id).style.display = 'block';
}

function ims(i,n,p,e)
{
	if (n == 1)
		document.images[i].src = p + i + e;
	else
		document.images[i].src = p + i + '_' + n + e;
}

function owin(u,t,f) { window.open(u,t,f); }
function owinp(u) { if (parent.opener) { parent.opener.location=u; parent.opener.focus(); } else if (self.opener) { self.opener.location=u; } else { self.location = u; } }
function owinpt(u)
{
	if (parent.opener)
	{
		parent.opener.top.location=u;
		parent.opener.top.focus();
	}
	else if (self.opener)
	{
		self.opener.top.location=u;
	}
	else
	{
	}
}
function uconf(u) { var c = confirm('Are you sure? Click OK to proceed.'); if (c) document.location = u; }
function go_url(u) { location.replace(u); }
function go_url2(u) { location.href = u; }

function am_buy(i) { var curr='USD', g='4t', a='0885824975728553', r='solucija', w=800, h=500, l=Math.max((screen.availWidth - w) / 2,0), t=Math.max((screen.availHeight / 2) - (h / 2), 0); owin('https://secure.arixmedia.com/index.php?action=pi&cmd=sip&alt=' + a + '&ruid=' + r + '&gid=' + g + '&id=' + i + '&curr=' + curr, 'ft_buy' + i, 'scrollbars=yes, status=yes, resizable=yes, width=' + w + ', height=' + h + ', left=' + l +', top=' + t); }
function am_cart() { var curr='USD', r='solucija', a='0885824975728553', w=800, h=500, l=Math.max((screen.availWidth - w) / 2,0), t=Math.max((screen.availHeight / 2) - (h / 2), 0); owin('https://secure.arixmedia.com/index.php?action=cart&alt=' + a + '&ruid=' + r + '&curr=' + curr, 'cart' + r, 'scrollbars=yes, status=yes, resizable=yes, width=' + w + ', height=' + h + ', left=' + l +', top=' + t); }
function am_cart_add(i) { var curr='USD', g='4t', r='solucija', a='0885824975728553', w=800, h=500, l=Math.max((screen.availWidth - w) / 2,0), t=Math.max((screen.availHeight / 2) - (h / 2), 0); owin('https://secure.arixmedia.com/index.php?action=cart&cmd=add&alt=' + a + '&ruid=' + r + '&gid=' + g + '&id=' + i + '&curr=' + curr, 'cart' + r, 'scrollbars=yes, status=yes, resizable=yes, width=' + w + ', height=' + h + ', left=' + l +', top=' + t); }
function owins(u,ttl,w,h)
{
	var nw=w,nh=h;

	if (h > screen.availHeight)
		nh = screen.availHeight - 50;
	if (w > screen.availWidth)
		nw = screen.availWidth;

        var l=Math.max((screen.availWidth / 2) - (nw / 2),0);
        var t=Math.max((screen.availHeight / 2) - (nh / 2), 0);

        owin(u,ttl,'scrollbars=yes,status=yes,resizable=yes,width=' + nw + ',height=' + nh + ',left=' + l + ',top=' + t);
}
function ow_preview(i)
{
	owins("http://p7d6.arixmedia.com/0885824975728553/preview/" + i, "0885824975728553" + i, 620, 900);
}
function ow_preview_full(i)
{
	owins("http://p7d6.arixmedia.com/0885824975728553/preview/" + i + "/full", "0885824975728553" + i, 620, 900);
}
function wthemes(i) { ow_help('themes/' + '#' + i); }
function wstyles(i) { ow_help('styles/' + '#' + i); }
function wresolutions(i) { ow_help('resolutions/' + '#' + i); }
function wfeatures(t,i) { ow_help('features_' + t + '/#' + i); }
function whelp(a,b)
{
	ow_help(a + '#' + b);
}
function ow_help(s)
{
	owins('http://p7d6.arixmedia.com/0885824975728553/help/' + s, '0885824975728553' + 'help', 640, 800);
}