function noSpam(domain, user, extension){ locationstring = "mailto:" + user + "@" + domain + "." +extension; window.location = locationstring; } function focusTo(elemName) { var input = document.getElementById(elemName); if (input) input.focus(); } var calendarTimerID = null ; var calendarTargetHeight = 0; var ie4 = (document.all) ? true : false; var ns4 = (document.layers) ? true : false; var ns6 = (document.getElementById && !document.all) ? true : false; function writeToLayer(lay,txt) { if (ie4) { document.all[lay].innerHTML = txt; } if (ns4) { document[lay].document.write(txt); document[lay].document.close(); } if (ns6) { over = document.getElementById([lay]); range = document.createRange(); range.setStartBefore(over); domfrag = range.createContextualFragment(txt); while (over.hasChildNodes()) { over.removeChild(over.lastChild); } over.appendChild(domfrag); } } function _setHeight(elem, h) { if (h == 1 && !elem.expanding) { elem.style.display = 'none'; } else { elem.style.display = 'block'; } elem.style.height = '' + h + 'px'; } function showCalendarInfo(text) { var elem = document.getElementById('slider'); if (elem == null) { elem = document.createElement('div'); elem.id='slider'; elem.style.overflow='hidden'; elem.style.height='0px'; elem.style.display='none'; elem.expanding=false; elem.height=0; div = document.createElement('div'); div.id='tapahtumat'; div.style.fontSize='1em'; div.style.padding='0px'; elem.appendChild(div); div = document.getElementById('sliderContainer'); div.appendChild(elem); } writeToLayer('tapahtumat', text); elem.expanding = true; _setHeight(elem, parseInt(elem.style.height)); calendarTargetHeight = parseInt(elem.firstChild.offsetHeight); if (calendarTimerID == null) { calendarTimerID = setInterval('calendarAcc()', 20); } } function hideCalendarInfo() { var elem = document.getElementById('slider'); elem.expanding = false; elem.height = parseInt(elem.style.height); calendarTargetHeight = 1; if (calendarTimerID == null) { calendarTimerID = setInterval('calendarAcc()', 20); } } function calendarAcc() { var delta = 0; var reset = false; var elem = document.getElementById('slider'); var height = elem.height; var rheight = 0; delta = (calendarTargetHeight - height); if (delta != 0) delta = delta * 0.15; if (delta < 1 && delta > -1) delta = 1; height += delta; rheight = Math.round(height); if (((delta > 0) && (rheight >= calendarTargetHeight)) || ((delta < 0) && (rheight <= calendarTargetHeight))) { rheight = height = calendarTargetHeight; clearTimeout(calendarTimerID); calendarTimerID = null; } elem.height = height; _setHeight(elem, rheight); } var tuotteet = new Array(); function addProduct(i,j,id,name) { if (tuotteet[i] == null) { tuotteet[i] = new Array(); } tuotteet[i][j] = new Array(); tuotteet[i][j][0] = id; tuotteet[i][j][1] = name; } function selectProducts(k,sel) { var list = document.getElementById('muo'); list.length = 0; if (k == 0) return; list.options[list.length] = new Option('Kaikki',''); if (tuotteet[k] != null) { for (i=0; i < tuotteet[k].length; i++) { list.options[list.length] = new Option(tuotteet[k][i][1],tuotteet[k][i][0]); if (sel != null && tuotteet[k][i][0]==sel) list.selectedIndex=i+1; } } } function viewImage(sec, img) { window.open ("/view_image.php?sec="+sec+"&img="+img, "ProductImage","menubar=0,location=0,status=0,scrollbars=0,resize=1,width=10,height=10,top=150,left=150"); return false; } function loggerA(siteID) { dt=(new Date()).getHours(); sv = 10; ss="na"; sc="na"; ln=""; pl=""; rf=""; si=siteID; rf=escape(document.referrer)+""; if((rf=="undefined") || (rf=="")) { rf="bookmark"; }; bn=navigator.appName; if(bn.substring(0,9)=="Microsoft") { bn="MSIE"; }; bv=Math.round(parseFloat(navigator.appVersion)*100); if((bn=="MSIE")&&(parseInt(bv)==2)) { bv=301; }; ja="na"; if(navigator.appName=="Netscape") { if(bv>400) { ln=navigator.language; } if(bv>300) { for(var i=0;i