/* rh) rw = rh; if (rw >= 1.0) return 1; return rw; } var coords; function saveCoords(el) { coords = el.areas[i].coords.split(','); } function correctImage() { var ratio = getRatio(); if ((el = document.getElementById("slide")) != null) { el.width = 850 * ratio; el.height = 567 * ratio; } if ((el = document.getElementById("imap")) != null) { var cs; if (coords == null) { var s; coords = new Array(el.areas.length); for (i = 0; i < el.areas.length; i++) { cs = el.areas[i].coords.split(','); coords[i] = new Array(cs.length); for (j = 0; j < cs.length; j++) coords[i][j] = parseInt(cs[j], 10); } } for (i = 0; i < el.areas.length; i++) { cs = ""; for (j = 0; j < coords[i].length; j++) { if (j > 0) cs += ','; cs += parseInt(coords[i][j] * ratio); } el.areas[i].coords = cs; } } } function preventDefault(e) { if (document.addEventListener) e.preventDefault(); else e.returnValue=false; return false; } function mousewheel(e) { if(typeof _jaWidgetFocus != 'undefined' && _jaWidgetFocus) return true; var delta = 0; if(!e) var e=window.event; if(e.wheelDelta) delta=e.wheelDelta/120; else if(e.detail) delta=-e.detail/3; if(delta > 0) { window.location="Installation-Auerbach-1-2.html"+"#picttop"; return preventDefault(e); } if(delta < 0) { window.location="Installation-Auerbach-1-4.html"+"#picttop"; return preventDefault(e); } return true; } function setuplisteners() { var isFF = navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1; if (document.addEventListener) { document.addEventListener(isFF? 'DOMMouseScroll':'mousewheel',mousewheel,false); } else if (document.attachEvent) { document.attachEvent('onmousewheel',mousewheel); } } idx0 = new Image(31,31); idx0.src = "../res/idx.gif"; idx1 = new Image(31,31); idx1.src = "../res/idx1.gif"; next0 = new Image(31,31);next0.src = "../res/next.gif"; next1 = new Image(31,31);next1.src = "../res/next1.gif"; prev0 = new Image(31,31);prev0.src = "../res/prev.gif"; prev1 = new Image(31,31);prev1.src = "../res/prev1.gif"; show0 = new Image(31,31);show0.src = "../res/show.gif"; show1 = new Image(31,31);show1.src = "../res/show1.gif"; stop0 = new Image(31,31);stop0.src = "../res/stop.gif"; stop1 = new Image(31,31);stop1.src = "../res/stop1.gif"; var show_param = -1; if (window.location.search.length > 1) { var parms = window.location.search.substring(1,location.search.length).split("&"); for (var i = 0; i < parms.length; i++) { if(parms[i].substring(0, parms[i].indexOf("=")) == "show_param") delay = show_param = parms[i].substring(parms[i].indexOf("=") + 1, parms[i].length); } } var show_delay = show_param; function show_timer() { if (show_delay >= 0) { show_delay--; if (show_delay < 0 && show_param > 0) { window.location="Installation-Auerbach-1-4.html?show_param=" + show_param + "#picttop"; } else if(show_param > 0) window.status='Time left: '+(show_delay + 1)+' s'; } setTimeout('show_timer()', 1000); } function show_over() { document.getElementById("show").src = (show_param >= 0)? stop1.src : show1.src; window.status = 'Запустить/Остановить слайд-шоу - Двойной клик для изменения скорости'; } function show_out() { document.getElementById("show").src = (show_param >= 0)? stop0.src : show0.src; } function show_down() { el = document.getElementById("show"); if (show_param >= 0) { show_param = -1; el.src = stop1.src; window.status=''; } else { show_param = 3; el.src = show1.src; } show_delay = show_param; } function change_delay() { delay = prompt('Пауза', (show_param < 0)? 3 : show_param); show_param = show_delay = delay; document.getElementById("show").src = show1.src; } window.onload = function() { setuplisteners(); show_timer(); show_out(); correctImage(); window.onresize = correctImage; }; /* ]]> */