function showMenu(el){
	document.getElementById(el).style.display="block";
}

function hideMenu(el){
	document.getElementById(el).style.display="none";
}

function showMenuColor(el){
	document.getElementById(el).style.backgroundColor="#828282";
}

function hideMenuColor(el){
	document.getElementById(el).style.backgroundColor="#909295";
}

function goTo(url){
	window.location = url;
}

function naytaTiedosto(tyyppi,id){
	window.open("http://www.renor.fi/tiedosto.php?tyyppi="+tyyppi+"&id="+id+"","ikkuna","width=550, height=500");
}

function showMenu2(el,top){
	$('#'+el+'').css('top', '-'+top+'px');	
	document.getElementById(el).style.display="block";
}

function hideMenu2(el){
	document.getElementById(el).style.display="none";
}

function showMenuColor2(el){
	document.getElementById(el).style.backgroundColor="#e3e6ea";
}

function hideMenuColor2(el){
	document.getElementById(el).style.backgroundColor="#ffffff";
}

function checkFormFields()
{
	if(document.lomake.nimi.value=="")
	{
		alert("Nimi on pakollinen");
		document.lomake.nimi.focus();
		return false;
	}
	else if(document.lomake.yritys.value=="")
	{
		alert("Yritys on pakollinen");
		document.lomake.yritys.focus();
		return false;
	}
	else if(document.lomake.puhelinnumero.value=="")
	{
		alert("Puhelinnumero on pakollinen");
		document.lomake.puhelinnumero.focus();
		return false;
	}
	else if(document.lomake.email.value=="")
	{
		alert("Sähköpostiosoite on pakollinen");
		document.lomake.email.focus();
		return false;
	}
	return true;
}
