
function show(id) 
{ 
		if(document.getElementById(id).style.visibility == "visible")
		{
			document.getElementById(id).style.visibility = "hidden"; 
			document.getElementById(id).style.display="none";
		}
		else
		{
			document.getElementById(id).style.visibility = "visible"; 
			document.getElementById(id).style.display="block";
		}

	
}

function show2(id1, id2)
{
	document.getElementById(id1).style.visibility = "visible"; 
	document.getElementById(id1).style.display="block";

	document.getElementById(id2).style.visibility = "hidden"; 
	document.getElementById(id2).style.display="none";
}


function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no' );
}

function order_cover_1()
{
	document.or1.cover_2.checked = false;
	document.or1.cover_3.checked = false;
	if(document.or1.cover_1.checked == true)
	{
		document.or1.bind_colour.disabled = false;
		document.or1.soft_cover_colour.disabled = true;
		document.or1.hard_cover_colour.disabled = true;
		document.or1.hard_cover_title.disabled = true;
	}
	else
	{
		document.or1.bind_colour.disabled = true;
	}

}
function order_cover_2()
{
	document.or1.cover_1.checked = false;
	document.or1.cover_3.checked = false;
	if(document.or1.cover_2.checked == true)
	{
		document.or1.soft_cover_colour.disabled = false;
		document.or1.bind_colour.disabled = true;
		document.or1.hard_cover_colour.disabled = true;
		document.or1.hard_cover_title.disabled = true;
	}
	else
	{
		document.or1.soft_cover_colour.disabled = true;
	}
}
function order_cover_3()
{
	document.or1.cover_2.checked = false;
	document.or1.cover_1.checked = false;
	if(document.or1.cover_3.checked == true)
	{
		document.or1.hard_cover_colour.disabled = false;
		document.or1.hard_cover_title.disabled = false;
		document.or1.soft_cover_colour.disabled = true;
		document.or1.bind_colour.disabled = true;
	}
	else
	{
		document.or1.hard_cover_colour.disabled = true;
		document.or1.hard_cover_title.disabled = true;
	}
}

function check_form_on_show()
{
	if(document.or1.cover_1.checked == true)
	{
		document.or1.bind_colour.disabled = false;
		document.or1.soft_cover_colour.disabled = true;
		document.or1.hard_cover_colour.disabled = true;
		document.or1.hard_cover_title.disabled = true;
	}
	else if(document.or1.cover_2.checked == true)
	{
		document.or1.soft_cover_colour.disabled = false;
		document.or1.bind_colour.disabled = true;
		document.or1.hard_cover_colour.disabled = true;
		document.or1.hard_cover_title.disabled = true;
	}
	else if(document.or1.cover_3.checked == true)
	{
		document.or1.hard_cover_colour.disabled = false;
		document.or1.hard_cover_title.disabled = false;
		document.or1.soft_cover_colour.disabled = true;
		document.or1.bind_colour.disabled = true;
	}
}

function change_order_form( chb )
{
	if(chb.value == "Drukowanie pliku")
	{
		go_to('index.php?id=zloz_zlecenie&order_type=1');
	}
	else if(chb.value == "Drukowanie zdj��")
	{
		go_to('index.php?id=zloz_zlecenie&order_type=2');
	}
	else if(chb.value == "Drukowanie ulotek")
	{
		go_to('index.php?id=zloz_zlecenie&order_type=3');
	}
	
}

function admin_change_price_list( chb )
{
	url = 'index.php?id=Cennik&title=' + chb.value;
	go_to(url);
}


function go_to( url ) {
	window.location.href = url;
}

function navigation_bar( tableCellRef, hoverFlag, navStyle ) {
	if ( hoverFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#f90';	//kolor po najechaniu
				break;
			default:
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#c00';
				}
		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#999';	//kolor glowny #036
				break;
			default:
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#000';
				}
		}
	}
}

function navigation_bar_click( tableCellRef, navStyle, url ) {
	navigation_bar( tableCellRef, 0, navStyle );
	go_to( url );
}

function go_to( url ) {
	window.location.href = url;
}

function Info( url )
{if (confirm("UWAGA! Czy potwierdzasz skasowanie u�ytkownika?"))
window.location.href = url;return " "}
