// JavaScript Document
function mgo()
{
	document.write('<marquee loop="1" class="mq">');
}

function mhlt()
{
	document.write('</marquee>');
}

function przelicz()
{
space=document.forms.cust.space.value;
trans=document.forms.cust.trans.value;
email=document.forms.cust.email.value;

if(space<50)
	{
		alert('Minimalna powierzchnia to 50MB');
		document.forms.cust.space.value=50;
		return false;
	}

if(space>10000)
	{
		alert('Maksymalna powierzchnia to 10 GB');
		document.forms.cust.space.value=10000;
		return false;
	}

if((trans<12)&&(trans!=''))
	{
		alert('Minimalny transfer to 12 GB rocznie');
		document.forms.cust.trans.value=12;
		return false;
	}

if((trans>240)&&(trans!=''))
	{
		alert('Maksymalny transfer to 240 GB rocznie');
		document.forms.cust.trans.value=240;
		return false;
	}

if((email>500)&&(email!=''))
	{
		alert('Maksymalna liczba kont email to 500');
		document.forms.cust.email.value=500;
		return false;
	}




base=36;
p_sp=0.33;
p_tr=1;
p_em=1.3;

output=base+space*p_sp+trans*p_tr+email*p_em;
output=Math.round(output);
if(isNaN(output))
	{
		output='';
		alert('Proszę wypełnić liczbami całkowitymi');
		return false;
	}

document.forms.cust.cena.value=output;
}


function opcja(kt,cl)
{
	if(cl==1)document.getElementById(kt).style.display='block';
	else document.getElementById(kt).style.display='none';
}
