// ####################################################
// ----------------------------------------------------
// JavaScript Document
// check_all Class
// licence - GNU GPL 2.0
// programing - Martin.Chudoba
// email - martin.chudoba@seznam.cz
// ----------------------------------------------------
// ####################################################
function resize(width, height)
{
	var height = height+200;
	var browName = navigator.appName;
	
	if (browName == "Microsoft Internet Explorer")
	{
		if (width < 600)
			width += 87;
		else
			width += 18;
		
		if (width < 480)
		{
			width = 480;
		}
	}
	else
	{
		if (width < 600)
			width += 83;
		else
			width += 18;
			
		if (width < 480)
		{
			width = 520;
		}
	}
	
	window.resizeTo(width, height);
	var obj = document.getElementById('fotogalerie');
	var img = document.getElementById('fotka');
	var reklama = document.getElementById('reklama');
	
	if (browName == "Microsoft Internet Explorer")
	{
		reklama.style.width = 468;
		
		if (width > 800)
		{
			obj.style.width = img.width;
		}
		else if (width < 742)
		{
			obj.style.width = img.width+85;
		}
	}
	else
	{
		reklama.style.width = 468+'px';
		if (width > 800)
		{
			obj.style.width = 644+'px';
		}
		else
			obj.style.width = 630+'px';
	}
}

function jCheckAll()
{
	for (x = 0; x < 33; x++)
	{
		var obj = document.getElementById('pozice'+x);
		
		if (obj)
		{
			if (obj.checked)
				obj.checked = false;
			else
				obj.checked = true;
		}
	}
}

function jCheckAll2()
{
	var x = 0;
	
	while(true)
	{
		var obj = document.getElementById('pozice2'+x);
		
		if (obj)
		{
			if (obj.checked)
				obj.checked = false;
			else
				obj.checked = true;
				
			x++;
		}
		else
			break;
	}
}
