/* © 2004 graphservice GmbH, Waldbronn * $Id: index.js,v 1.8 2005/11/11 12:32:43 ms Exp $ */ entry = false; INIT = false; sWidth = screen.width; sHeight = screen.height; res = new Array; res[0] = new Array; res[0][0] = '800.jsp'; res[0][1] = 790; res[0][2] = 506; res[0][3] = 490; res[0][4] = 430; res[1] = new Array; res[1][0] = '1024.jsp'; res[1][1] = 985; res[1][2] = 676; res[1][3] = 685; res[1][4] = 600; var imgCache = new Array( "gfx/map/arrow_e.gif", "gfx/map/loading.gif", "gfx/map/arrow_n.gif", "gfx/map/arrow_ne.gif", "gfx/map/arrow_nw.gif", "gfx/map/arrow_s.gif", "gfx/map/arrow_se.gif", "gfx/map/arrow_sw.gif", "gfx/map/arrow_w.gif", "gfx/misc/arrow.gif", "gfx/misc/blank.gif", "gfx/misc/bookmark.gif", "gfx/misc/button.gif", "gfx/misc/close.gif", "gfx/misc/gs.gif", "gfx/misc/print.gif", "gfx/search/search.gif", "gfx/themes/checked.gif", "gfx/themes/invisible.gif", "gfx/themes/unchecked.gif", "gfx/themes/visible.gif", "gfx/toolbar/area.gif", "gfx/toolbar/desel.gif", "gfx/toolbar/home.gif", "gfx/toolbar/line.gif", "gfx/toolbar/move.gif", "gfx/toolbar/pdf.gif", "gfx/toolbar/point.gif", "gfx/toolbar/print.gif", "gfx/toolbar/undo.gif", "gfx/toolbar/zoomin.gif", "gfx/toolbar/zoomout.gif", "gfx/toolbar/calcdistance.gif", "gfx/toolbar/calcarea.gif" ); window.onload = init; function init() { rForm = document.getElementById('resForm'); l = imgCache.length; for ( var i = 0; i < l; i++ ) { var dummy = new Image(); dummy.src = imgCache[i]; } if ( ( sWidth >= 800) && (sHeight >= 600) ) { rForm.selNo.selectedIndex = 0; } if ( (sWidth >= 1024) && (sHeight >= 768) ) { rForm.selNo.selectedIndex = 1; } document.getElementById( 'startbutton' ).onclick = function() { parameter = ''; //setMapSize(); openEntry(); } /* document.getElementById( 'entrypoint1' ).onclick = function() { parameter = 'action=moveToFeature&key=19000&layername=%2FAdressverzeichnis&z=1000'; openEntry(); } document.getElementById( 'entrypoint2' ).onclick = function() { parameter = 'action=moveToFeature&key=21671&layername=%2FAdressverzeichnis&z=1000'; openEntry(); } */ } /* function setMapSize() { //d = new Date(); //rN = rForm.selNo.selectedIndex; //document.getElementById( 'mapsize' ).src = 'size/setSize' + res[rN][0] + '?id=' + d.getTime(); //document.getElementById( 'mapsize' ).src = 'size/setSize755.jsp?id=' + d.getTime(); } */ function openEntry() { rN = rForm.selNo.selectedIndex; wWidth = res[rN][1]; wHeight = res[rN][2]; mWidth = res[rN][3]; mHeight = res[rN][4]; if ( document.all && !document.compatMode ) { wWidth -= 4; wHeight -= 4; } mLeft = (sWidth - wWidth - 10) / 2; mTop = (sHeight - wHeight - 23) / 2; if ( entry != false ) entry.close(); var mapsize = 'mapWidth='+mWidth+'&mapHeight='+mHeight+'&'; /* ../entry.jsp ist richtig, da der aktuelle Pfad zum Zeitpunkt des Aufrufs "size/" ist */ //alert(mWidth+'x'+mHeight); //alert('entry.jsp?' + mapsize + parameter ); entry = window.open( 'entry.jsp?' + mapsize + parameter, 'Entry', 'width=' + wWidth + ',height=' + wHeight + ',left=' + mLeft + ',top=' + mTop + ',menubar=no,toolbar=no,resizable=no' ); entry.focus(); }