function getLogin()
{
  if (Element.visible('login'))
  {
    new Effect.BlindUp('login', { duration: 0.8 });
    $('noeffect').morph('background:#cccccc; width:100px;');
    
  }
  else
  {
    new Effect.BlindDown('login', { duration: 0.5 });
    $('noeffect').morph('background:#27c; width:535px;');
  }

  return false;
}

function setClass(i)
{
document.getElementsByTagName('a')[i].className = "active";

}

function strtr(text, array, variable)
{
	

		for(i = 0; i < array.length; i++)
		{
			for ( j=0; j < text.length; j++)
			{
				if (text.charAt(j) == array.charAt(i))
				{text = text.replace(text.charAt(j),variable.charAt(i)); }
			}
		
		}
		
		return text;
}

function linkTo()
{
var city = document.dojazd_form.city.value;
var street = document.dojazd_form.street.value;



if ( city != "" && street != "")
{
window.open('http://www.zumi.pl/trasa.html?loc1='+strtr(city,'ĘęÓóĄąŚśŁłŹźŻżĆćŃń', 'EeOoAaSsLlZzZzCcNn')+'%2C+'+strtr(street,'ĘęÓóĄąŚśŁłŹźŻżĆćŃń', 'EeOoAaSsLlZzZzCcNn')+'&loc2=Wroc%B3aw%2C+Kosciuszki%2C+135&byCar=on&cId1=&sId1=&cId2=&sId2=&x=52&y=11','newwin');
return true;
}else 
{
alert("Wszystkie pola muszą być wypełnione prawidłowo", "Błąd");
return false;
}
}

