var smooth_timer; var interval_Id; function hidestatus(){ window.status=' '; return true; } function changeScrollbarColor(){ if (document.all){ document.body.style.scrollbarBaseColor = mainbgcolor; document.body.style.scrollbar3dLightColor = mainbgcolor; document.body.style.scrollbarArrowColor = focuscolor; document.body.style.scrollbarDarkShadowColor = mainbgcolor; document.body.style.scrollbarFaceColor = mainbgcolor; document.body.style.scrollbarHighlightColor = focuscolor; document.body.style.scrollbarShadowColor = mainbgcolor; document.body.style.scrollbarTrackColor = focuscolor; } } function upclock(){ var dte = new Date(); var day = GetDayName(dte.getDay()); var daymonth = dte.getDate(); var month = dte.getMonth(); var year = dte.getFullYear(); var hrs = dte.getHours(); var min = dte.getMinutes(); var sec = dte.getSeconds(); var col = ":"; var spc = " "; var com = ""; if (hrs == 0) hrs=12; if (min<=9) min="0"+min; if (sec<=9) sec="0"+sec; if(document.getElementById('clock')){ document.getElementById('clock').innerHTML = daymonth + '-' + month + ' | ' + '<font color="#BC2222">'+hrs+col+min+'</font>'; } } function scrollUp(sObj){ if(!document.getElementById('vmarquee_'+sObj).style.top){document.getElementById('vmarquee_'+sObj).style.top='0px'} if(document.getElementById('vmarquee_'+sObj).offsetTop<0)document.getElementById('vmarquee_'+sObj).style.top=(parseInt(document.getElementById('vmarquee_'+sObj).style.top)+3)+'px'; } function scrollDown(sObj){ if(!document.getElementById('vmarquee_'+sObj).style.top){document.getElementById('vmarquee_'+sObj).style.top='0px'} if(document.getElementById('vmarquee_'+sObj).offsetTop>(document.getElementById('marqueecontainer_'+sObj).offsetHeight-document.getElementById('vmarquee_'+sObj).offsetHeight))document.getElementById('vmarquee_'+sObj).style.top=(parseInt(document.getElementById('vmarquee_'+sObj).style.top)-3)+'px'; } function setMenu(obj, status){ if(status){ obj.src = 'images/'+obj.id+'_o.gif'; } else{ obj.src = 'images/'+obj.id+'.gif'; } obj.style.cursor='pointer'; } function loadPage(id){ location.href=retPageName(id) } function retPageName(id){ switch(parseInt(id)){ case 1: return 'index.php'; case 2: return 'bikes.php'; case 3: return 'contact.php'; case 4: return 'route.php'; default: return 'index'; } } function setSearch(id, visible){ var trObj = (document.getElementById) ? document.getElementById(id) : eval("document.all['" + id + "']"); if (trObj != null) { if (visible) { trObj.style.display=''; trObj.style.height='62px'; SetCookie('search', 1, 30); } else { trObj.style.display='none'; SetCookie('search', '', -1); } } } function showSearch(id) { var trObj = (document.getElementById) ? document.getElementById(id) : eval("document.all['" + id + "']"); var iStep = 2; if(!bIsMSIE){iStep = 5} if (trObj != null) { if (trObj.style.display=="none") { trObj.style.display=""; smoothHeight(id, 0, 60, iStep, 'o'); SetCookie("search", 1, 30); } else { smoothHeight(id, 60, 0, iStep, id); SetCookie("search", "", -1); } } } function smoothHeight(id, curH, targetH, stepH, mode) { diff = targetH - curH; var iPause = 20; if (Math.abs(diff) > stepH) { newH = (diff > 0) ? curH + stepH : curH - stepH; document.getElementById(id).style.height = newH + "px"; if (smooth_timer) window.clearTimeout(smooth_timer); smooth_timer = window.setTimeout( "smoothHeight('" + id + "'," + newH + "," + targetH + "," + stepH + ",'" + mode + "')", iPause); } else if (mode != "o"){document.getElementById(id).style.display="none"}else{document.getElementById(id).style.height='62px'} } function setPic(obj, w, h){ document.getElementById("showpic").src = obj.src.replace('tn_', 's_'); document.getElementById("pic_width").value = w; document.getElementById("pic_height").value = h; } function showPic_back(obj){ document.getElementById("showpic").src = obj.src.replace('tn_', 's_'); } function showOriginal(oPic){ var iPos = oPic.src.indexOf('s_')+2; popUp('showpic.php?pic='+oPic.src.substring(iPos), document.getElementById('pic_width').value, document.getElementById('pic_height').value, false); } function retPic(obj){ var s = obj.style.backgroundImage; s = s.replace('url(upload/s_', ''); s = s.replace(')', ''); return s; }
