
/* 2007 Copyright by */
/* Michael Kreutz, www.lumocad.de */
/* Sebastian Beutel, www.s-beutel.de */
 function at(){var specialCtrl=document.getElementById("specialCtrl");specialCtrl.style.left=document.getElementById("map").offsetLeft+"px";specialCtrl.style.top=document.getElementById("map").offsetTop+"px";specialCtrl.style.display=(specialCtrl.style.display=="block")?"none":"block";};var o;var bc;var aU;function j(aS){var x=0;do x+=aS.offsetLeft;while((aS=aS.offsetParent));return x;};function g(aS,evt){o=aS;bc=j(o);aU=evt.clientX;document.onmousemove=am;document.onselectstart=function(){event.returnValue=false};};function am(evt){var val;val=o.parentNode.previousSibling.previousSibling;var round;var scale;if(o.id.search(/TIM/)!= -1){scale=4.995;round=0;}else if(o.id=="GPA"){scale=0.045;round=1;}else if(o.id=="SHS"){scale=0.05;round=1;}else if(o.id=="SVS"){scale=0.025;round=1;}else if(o.id=="SYS"){scale=0.9;round=0;}else if(o.id=="PMH"){scale=10;round=0;}else if(o.id=="PMV"){scale=15;round=0;}else if(o.id=="YMA"){scale=1.795;round=0;}else if(o.id=="YMC"){scale=0.9;round=0;}else if(o.id=="YMR"){scale=1.795;round=0;}else if(o.id=="YSF"){scale=1.795;round=0;}else if(o.id=="WAS"){scale=0.045;round=1;}else if(o.id=="WAL"){scale=0.0245;round=1;}else if(o.id=="EH"){scale=2.495;round=0;}else if(o.id=="CT"){scale=0.5;round=0;}else if(o.id=="CTR"){scale=0.015;round=1;}if(window.attachEvent){o.style.pixelLeft=bc+event.clientX-aU-j(o.parentNode)-100;if(round==1){if(o.id=="WAS"||o.id=="GPA"){val.value=Math.round((bc+event.clientX-aU-j(o.parentNode))*scale*10+10)/10;}else if(o.id=="WAL"){val.value=Math.round((bc+event.clientX-aU-j(o.parentNode))*scale*10+1)/10;}else{val.value=Math.round((bc+event.clientX-aU-j(o.parentNode))*scale*10)/10;}}else if(round==0){val.value=Math.round((bc+event.clientX-aU-j(o.parentNode))*scale);}if(-100>=o.style.pixelLeft){o.style.pixelLeft= -100;if(o.id=="WAS"||o.id=="GPA"||o.id=="EH"){val.value=1;}else if(o.id=="WAL"){val.value=0.1;}else{val.value=0;}}if(o.style.pixelLeft>=100){o.style.pixelLeft=100;if(o.id=="WAS"||o.id=="GPA"||o.id=="EH"){val.value=200*scale+1;}else if(o.id=="WAL"){val.value=200*scale+0.1;}else{val.value=200*scale;}}}else if(window.addEventListener){o.style.left=(bc+evt.clientX-aU)-j(o.parentNode)-100+"px";if(round==1){if(o.id=="WAS"||o.id=="GPA"){val.value=Math.round((bc+evt.clientX-aU-j(o.parentNode))*scale*10+10)/10;}else if(o.id=="WAL"){val.value=Math.round((bc+evt.clientX-aU-j(o.parentNode))*scale*10+1)/10;}else{val.value=Math.round((bc+evt.clientX-aU-j(o.parentNode))*scale*10)/10;}}else if(round==0){val.value=Math.round((bc+evt.clientX-aU-j(o.parentNode))*scale);}if(j(o.parentNode)>=j(o)){o.style.left= -100+"px";if(o.id=="WAS"||o.id=="GPA"||o.id=="EH"){val.value=1;}else if(o.id=="WAL"){val.value=0.1;}else{val.value=0;}}if(j(o)>=j(o.parentNode)+200){o.style.left=100+"px";if(o.id=="WAS"||o.id=="GPA"||o.id=="EH"){val.value=200*scale+1;}else if(o.id=="WAL"){val.value=200*scale+0.1;}else{val.value=200*scale;}}}document.onmouseup=m;};function m(){document.onmousemove=null;o=null;};function newValue(aW){var round;var scale;var offset=0;if(aW.id.search(/TIM/)!= -1){scale=4.995;round=0;}else if(aW.id.search(/GPA/)!= -1){scale=0.045;round=1;offset=1;}else if(aW.id.search(/SHS/)!= -1){scale=0.05;round=1;}else if(aW.id.search(/SVS/)!= -1){scale=0.025;round=1;}else if(aW.id.search(/SYS/)!= -1){scale=0.9;round=0;}else if(aW.id.search(/PMH/)!= -1){scale=10;round=0;}else if(aW.id.search(/PMV/)!= -1){scale=15;round=0;}else if(aW.id.search(/YMA/)!= -1){scale=1.795;round=0;}else if(aW.id.search(/YMC/)!= -1){scale=0.9;round=0;}else if(aW.id.search(/YMR/)!= -1){scale=1.795;round=0;}else if(aW.id.search(/WAS/)!= -1){scale=0.045;round=1;offset=1;}else if(aW.id.search(/WAL/)!= -1){scale=0.0245;round=1;offset=0.1;}else if(aW.id.search(/EH/)!= -1){scale=2.495;round=0;offset=1;}else if(aW.id.search(/CT/)!= -1){scale=0.5;round=0;}else if(aW.id.search(/CTR/)!= -1){scale=0.015;round=1;}if(window.attachEvent){var bf=aW.nextSibling.nextSibling.firstChild;if((aW.value-offset)>scale*200){bf.style.pixelLeft=200-100;alert("Value is out of range and replaced by maximum value!");aW.value=scale*200;}else if((aW.value-offset)<0&&aW.value!=""){bf.style.pixelLeft=0-100;alert("Value is out of range and replaced by minimum value!");aW.value=0;}else if(aW.value==""){bf.style.pixelLeft= -100;aW.onblur=function(){if(aW.value==""){aW.value=offset;}}}else{bf.style.pixelLeft=(aW.value-offset)/scale-100;}}else if(window.addEventListener){var bf=aW.nextSibling.nextSibling.firstChild.nextSibling;if((aW.value-offset)>scale*200){bf.style.left=200-100+"px";alert("Value is out of range and replaced by maximum value! \r\nscale: "+scale+"\r\nvalue: "+aW.value);aW.value=scale*200;}else if((aW.value-offset)<0&&aW.value!=""){bf.style.left=0-100+"px";alert("Value is out of range and replaced by minimum value!");aW.value=0;}else if(aW.value==""){bf.style.left= -100+"px";aW.onBlur=function(){aW.value=offset;}}else{bf.style.left=(aW.value-offset)/scale-100+"px";}}}