window.onload = counterPath;
function counterPath()
{
	var ScreenW = screen.width;
	var ScreenH = screen.height;
	var ScreenD = screen.colorDepth;
	
	var thisurl = window.location.pathname;
	var path = thisurl.split("/");
	var num = path.length;
	var dateiname = path[(num-1)];

	var countbox = "sw=" + ScreenW + "&sh=" + ScreenH + "&sd=" + ScreenD + "&refuri=" + dateiname;
	var retcode = "counter.php?" + countbox;
	document.getElementById('statscount').src = retcode;
}

function show_popup(w,h,cmd,vals,poptitel,sb,rs)
{
	myleft = (screen.width)?(screen.width-w)/2:100;
	mytop = (screen.height)?(screen.height-h)/2:100;

	settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=" + sb + ",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=" + rs + "";
	win=window.open('popup.php?cmd=' + cmd + '&vals=' + vals,poptitel,settings);
	win.focus();
}

function omover(x,y,z)
{
	x.className='ns_on';
	document.getElementById(y).className='sn2';
	document.getElementById(z).src='layout/gfx/menu/arrow.png';
}

function omout(x,y,z)
{
	x.className='ns_off';
	document.getElementById(y).className='sn';
	document.getElementById(z).src='layout/gfx/menu/arrow2.png';
}

function refreshCaptcha(p)
{
	document.getElementById('cappic').src=p+'random.php';
}
