﻿
/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display="block"
}
}

function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}

if (window.addEventListener){
window.addEventListener("load", onloadfunction, false)}
else if (window.attachEvent){
window.attachEvent("onload", onloadfunction)}
else if (document.getElementById){
window.onload=onloadfunction}

if (persistmenu=="yes" && document.getElementById){
window.onunload=savemenustate}



document.writeln(
'<html>'
+'<head>'
+'<title>'
+'</title>'
+'</head>'
+'<body>'
+'<div id=\"masterdiv\">'
	+'<div class=\"menutitle4\" onclick=\"SwitchMenu(\'sub3\')\"><a href=\"index.htm\" class=\"six\" target=\"_self\" >ETUSIVU</a></div>'
	+'<span class=\"submenu2\" id=\"sub3\">'
	+'</span>'
	+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub7\')\"><a href=\"yritys.htm\" class=\"six\" target=\"_self\" >YRITYS</a></div>'
	+'<span class=\"submenu2\" id=\"sub7\">'
	+'</span>'
	//YKSITYISASIAKKAILLE
	+'<div class=\"menutitle3\" onclick=\"SwitchMenu(\'sub1\')\"><a href=\"#\" class=\"six\" target=\"_self\">YKSITYISASIAKKAILLE</a></div>'
		+'<span class=\"submenu\" id=\"sub1\">'
			+'<a href=\"ajoneuvolasit.htm\" class=\"three\" target=\"_self\" >Ajoneuvolasit</a><br>'
			+'<a href=\"terassilasit.htm\" class=\"three\" target=\"_self\" >Terassilasit</a><br>'
			+'<a href=\"saunanlasiseinat.htm\" class=\"three\" target=\"_self\" >Saunan lasisein&auml;t</a><br>'
			+'<a href=\"suihkuseinat.htm\" class=\"three\" target=\"_self\" >Suihkusein&auml;t ja -nurkkaukset</a><br>'
			+'<a href=\"keittiolasit.htm\" class=\"three\" target=\"_self\" >Keitti&ouml;n lasit</a><br>'
			+'<a href=\"kaidelasit.htm\" class=\"three\" target=\"_self\" >Lasikaiteet</a><br>'
			+'<a href=\"lasiovet.htm\" class=\"three\" target=\"_self\" >Lasiovet</a><br>'
			+'<a href=\"lasiovenvetimet.htm\" class=\"three\" target=\"_self\" >Lasioven vetimet</a><br>'
			+'<a href=\"peilit.htm\" class=\"three\" target=\"_self\" >Peilit</a><br>'
			+'<a href=\"peililiukuovet.htm\" class=\"three\" target=\"_self\" >Peililiukuovet</a><br>'
			+'<a href=\"kalustelasit.htm\" class=\"three\" target=\"_self\" >Kalustelasit</a><br>'
			+'<a href=\"kalustehelat.htm\" class=\"three\" target=\"_self\" >Kalustehelat</a><br>'
			+'<a href=\"listat.htm\" class=\"three\" target=\"_self\" >Alumiinilistat ja muut profiilit</a><br>'
			+'<a href=\"koristeJaKuviolasit.htm\" class=\"three\" target=\"_self\" >Kuvio- ja s&auml;vylasit</a><br>'
			+'<a href=\"erikoislasit.htm\" class=\"three\" target=\"_self\" >Erikoislasit</a><br>'
			+'<a href=\"silkkipaino.htm\" class=\"three\" target=\"_self\" >Lasien kuviointi</a><br>'
			+'<a href=\"mittausJaAsennuspalvelut.htm\" class=\"three\" target=\"_self\" >Mittaus ja asennuspalvelut</a>'
		+'</span>'
	//JÄLLEENMYYJILLE
	+'<div class=\"menutitle2\" onclick=\"SwitchMenu(\'sub2\')\"><a href=\"#\" class=\"seven\" target=\"_self\">J&Auml;LLEENMYYJILLE JA SUUNNITTELIJOILLE</a></div>'
		+'<span class=\"submenu\" id=\"sub2\">'
			+'<b>Lasityypit</b><br>'
			+'&nbsp;&nbsp;<a href=\"karkaistulasi.htm\" class=\"three\" target=\"_self\" >Karkaistu turvalasi</a><br>'
			+'&nbsp;&nbsp;<a href=\"laminoitulasi.htm\" class=\"three\" target=\"_self\" >Laminoitu turvalasi</a><br>'
			+'&nbsp;&nbsp;<a href=\"hiekkapuhallettulasi.htm\" class=\"three\" target=\"_self\" >Hiekkapuhallettu lasi</a><br>'
			+'&nbsp;&nbsp;<a href=\"silkkipainettulasi.htm\" class=\"three\" target=\"_self\" >Silkkipainettu lasi</a><br>'
			+'&nbsp;&nbsp;<a href=\"julkisivulasi.htm\" class=\"three\" target=\"_self\" >Julkisivulasi</a><br>'
			+'&nbsp;&nbsp;<a href=\"eristyslasit.htm\" class=\"three\" target=\"_self\" >Eristyslasit</a><br>'
			+'&nbsp;&nbsp;<a href=\"koristeJaKuviolasitJS.htm\" class=\"three\" target=\"_self\" >Kuvio- ja s&auml;vylasit</a><br>'
			+'<b>Helat ja profiilit</b><br>'
			+'&nbsp;&nbsp;<a href=\"kaidehelatJS.htm\" class=\"three\" target=\"_self\" >Kaidehelat</a><br>'
			+'&nbsp;&nbsp;<a href=\"kalustehelatJS.htm\" class=\"three\" target=\"_self\" >Kalustehelat</a><br>'
			+'&nbsp;&nbsp;<a href=\"listatJS.htm\" class=\"three\" target=\"_self\" >Alumiinilistat ja muut profiilit</a><br>'
			+'&nbsp;&nbsp;<a href=\"lasiovenvetimetJS.htm\" class=\"three\" target=\"_self\" >Lasioven vetimet</a><br>'
			+'<b>Tekninen tieto</b><br>'
			+'&nbsp;&nbsp;<a href=\"tyostot.htm\" class=\"three\" target=\"_self\" >Ty&ouml;st&ouml;t</a><br>'
			+'<b>Luettelot</b><br>'
			+'&nbsp;&nbsp;<a href=\"lasiLuettelo.htm\" class=\"three\" target=\"_self\" >Lasiluettelo</a><br>'
			+'&nbsp;&nbsp;<a href=\"kalvoLuettelo.htm\" class=\"three\" target=\"_self\" >Kalvoluettelo</a>'
		+'</span>'
	//TARJOUKSET
	+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub10\')\"><a href=\"tarjoukset.htm\" target=\"_self\" class=\"six\">TARJOUKSET</a></div>'
	+'<span class=\"submenu2\" id=\"sub10\">'
	+'</span>'
	//REFERENSSIT
	+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub4\')\"><a href=\"referenssit.htm\" target=\"_self\" class=\"six\">REFERENSSIT</a></div>'
	+'<span class=\"submenu2\" id=\"sub4\">'
	+'</span>'
	//GALLERIA
	+'<div class=\"menutitle3\" onclick=\"SwitchMenu(\'sub8\')\"><a href=\"#\" class=\"six\" target=\"_self\">GALLERIA</a></div>'
		+'<span class=\"submenu\" id=\"sub8\">'
			+'&nbsp;&nbsp;<a href=\"terassilasikuvat.htm\" class=\"three\" target=\"_self\" >Terassilasit</a><br>'
			+'&nbsp;&nbsp;<a href=\"saunanlasiseinakuvat.htm\" class=\"three\" target=\"_self\" >Saunanlasisein&auml;t</a><br>'
			+'&nbsp;&nbsp;<a href=\"suihkutilakuvat.htm\" class=\"three\" target=\"_self\" >Suihkutilat</a><br>'
			+'&nbsp;&nbsp;<a href=\"keittiolasikuvat.htm\" class=\"three\" target=\"_self\" >Keitti&ouml;lasit</a><br>'
			+'&nbsp;&nbsp;<a href=\"lasikaidekuvat.htm\" class=\"three\" target=\"_self\" >Lasikaiteet</a><br>'
			+'&nbsp;&nbsp;<a href=\"lasiovikuvat.htm\" class=\"three\" target=\"_self\" >Lasiovet</a><br>'
			+'&nbsp;&nbsp;<a href=\"peilikuvat.htm\" class=\"three\" target=\"_self\" >Peilit ja peililiukuovet</a><br>'
			+'&nbsp;&nbsp;<a href=\"kalustelasikuvat.htm\" class=\"three\" target=\"_self\" >Kalustelasit</a><br>'
			+'&nbsp;&nbsp;<a href=\"julkisettilatkuvat.htm\" class=\"three\" target=\"_self\" >Julkiset tilat</a><br>'
			+'&nbsp;&nbsp;<a href=\"julkisivukuvat.htm\" class=\"three\" target=\"_self\" >Julkisivut</a>'
		+'</span>'
	//ESITTEET
	+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub5\')\"><a href=\"esitteet.htm\" target=\"_self\" class=\"six\">ESITTEET</a></div>'
	+'<span class=\"submenu2\" id=\"sub5\">'
	+'</span>'
	//MYYNTI/YHTEYSTIEDOT
	+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub6\')\"><a href=\"myyntiYhteystiedot.htm\" target=\"_self\" class=\"six\">MYYNTI/YHTEYSTIEDOT</a></div>'
	+'<span class=\"submenu2\" id=\"sub6\">'
	+'</span>'
	//YHTEYSLOMAKE
	+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub9\')\"><a href=\"yhteyslomake.htm\" target=\"_self\" class=\"six\">OTA YHTEYTT&Auml;</a></div>'
	+'<span class=\"submenu2\" id=\"sub9\">'
	+'</span>'
	//ASENNUSOHJEET
	+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub11\')\"><a href=\"asennusohjeet.htm\" target=\"_self\" class=\"six\">ASENNUSOHJEET</a></div>'
	+'<span class=\"submenu2\" id=\"sub11\">'
	+'</span>'
	//TILAA
	//+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub10\')\"><a href=\"#\" target=\"_self\" class=\"six\">TEE TILAUS</a></div>'
	//+'<span class=\"submenu\" id=\"sub10\">'
	//+'<b>Lasityypit</b><br>'
			//+'<a href=\"peilitilaus.htm\" class=\"three\" target=\"_self\" >Peilitilaus</a><br>'
			//+'<a href=\"lasitilaus.htm\" class=\"three\" target=\"_self\" >Lasitilaus</a><br>'
	//+'</span>'
	//SIVUKARTTA
	//+'<div class=\"menutitle\" onclick=\"SwitchMenu(\'sub8\')\"><a href=\"sivukartta.htm\" target=\"_self\" class=\"six\">SIVUKARTTA</a></div>'
	//+'<span class=\"submenu2\" id=\"sub8\">'
	//+'</span>'
+'</div>'
);





