//**************************************************************** // icClient.js (_ic303.txt) // // Copyright (c) 2006 Clifford L. Collins // All rights are Reserved // // Collins Software // 7710 Janak Drive, Houston Texas // //---------------------------------------------------------------- // No distribution/publication/use of this code is permitted //**************************************************************** var r1c1,r1c2,r1c3; var r2c1,r2c2,r2c3; var r3c1,r3c2,r3c3; var br1c1,br1c2,br1c3; var br2c1,br2c2,br2c3; var br3c1,br3c2,br3c3; var fr1c1,fr1c2,fr1c3; var fr2c1,fr2c2,fr2c3; var fr3c1,fr3c2,fr3c3; var hr1c1,hr1c2,hr1c3; var hr2c1,hr2c2,hr2c3; var hr3c1,hr3c2,hr3c3; var imgr1c1,imgr1c2,imgr1c3; var imgr2c1,imgr2c2,imgr2c3; var imgr3c1,imgr3c2,imgr3c3; var isNav = (navigator.appName == 'Netscape'); //======================================================= // ic$Client (Constructor) //======================================================= function ic$Client(world,viewHeight,viewWidth) { this.view = new Object(); this.view.height = viewHeight; this.view.width = viewWidth; this.view.cx = this.view.width / 2; this.view.cy = this.view.height / 2; this.view.buf = new Object(); this.view.buf.rows = 1; this.view.buf.cols = 1; this.view.buf.col = 1; this.view.buf.row = 1; this.view.id = 'icClient'; this.view.left = view$left; // functions this.view.right = view$right; this.view.top = view$top; this.view.bottom = view$bottom; this.view.bx = view$bx; this.view.by = view$by; this.view.xToScreen = view$xToScreen; this.view.yToScreen = view$yToScreen; this.view.screenToX = view$screenToX; this.view.screenToY = view$screenToY; this.view.world = world; this.world = world; this.basemap = world.basemap; this.fixedLevel = false; this.mouseMove = CLIENT$mouseMove; this.mouseDown = CLIENT$mouseDown; this.mouseUp = CLIENT$mouseUp; //------------- Functions ------------ this.loadAllHotspot = CLIENT$loadAllHotspot; this.loadImageMapAll = CLIENT$loadImageMapAll; this.getImageMap = CLIENT$getImageMap; this.getImageMapFILE = CLIENT$getImageMapFILE; this.getImageMapHTTP = CLIENT$getImageMapHTTP; this.goXY = CLIENT$goXY; this.setImageMap = CLIENT$setImageMap; this.setColor = CLIENT$setColor; this.loadAllBasemap = CLIENT$loadAllBasemap; this.loadAllBackground = CLIENT$loadAllBackground; this.getHotspotImage = CLIENT$getHotspotImage; this.getBackgroundImage = CLIENT$getBackgroundImage; this.getForegroundImage = CLIENT$getForegroundImage; this.loadAllForeground = CLIENT$loadAllForeground; this.goLevel = CLIENT$goLevel; this.imgName = CLIENT$imgName; this.hotspotName = CLIENT$hotspotName; this.draw = CLIENT$draw; this.getBackgroundObject = CLIENT$getBackgroundObject; this.getForegroundObject = CLIENT$getForegroundObject; this.getImage = CLIENT$getImage; this.clearImageMap = CLIENT$clearImageMap; this.backgroundName = CLIENT$backgroundName; this.foregroundName = CLIENT$foregroundName; this.mapName = CLIENT$mapName; this.newTopRows = CLIENT$newTopRows; this.newBottomRows = CLIENT$newBottomRows; this.newLeftColumns = CLIENT$newLeftColumns; this.newRightColumns = CLIENT$newRightColumns; this.getHotspotObject = CLIENT$getHotspotObject; this.loadHotspot = CLIENT$loadHotspot; this.clearBackgroundAll = CLIENT$clearBackgroundAll; this.clearForegroundAll = CLIENT$clearForegroundAll; this.clearHotspotAll = CLIENT$clearHotspotAll; this.clearBasemapAll = CLIENT$clearBasemapAll; this.drawBasemap = CLIENT$drawBasemap; this.drawForeground = CLIENT$drawForeground; this.drawBackground = CLIENT$drawBackground; this.drawHotspot = CLIENT$drawHotspot; this.setForegroundFilter = CLIENT$setForegroundFilter; this.setBackgroundFilter = CLIENT$setBackgroundFilter; this.setBasemapFilter = CLIENT$setBasemapFilter; this.setHotspotFilter = CLIENT$setHotspotFilter; this.foregroundFilter = CLIENT$foregroundFilter; this.backgroundFilter = CLIENT$backgroundFilter; this.hotspotFilter = CLIENT$hotspotFilter; this.basemapFilter = CLIENT$basemapFilter; this.setTransparent = CLIENT$setTransparent; this.basemapZIndex = CLIENT$basemapZIndex; this.getX = CLIENT$getX; this.getY = CLIENT$getY; this.root = CLIENT$root; this.ext = CLIENT$ext; this.setGrid = CLIENT$setGrid; this.beginPrint = CLIENT$beginPrint; this.endPrint = CLIENT$endPrint; //--------------- Init -------------- this.x1 = 0; this.y1 = 0; this.x2 = 0; this.y2 = 0; this.view.buf.rows = 3; this.view.buf.cols = 3; this.abort = false; this.isLoading = false; this.loadMap = new Array(9); this.loadObj = new Array(9); r1c1 = getObject('oR1C1'); r1c2 = getObject('oR1C2'); r1c3 = getObject('oR1C3'); r2c1 = getObject('oR2C1'); r2c2 = getObject('oR2C2'); r2c3 = getObject('oR2C3'); r3c1 = getObject('oR3C1'); r3c2 = getObject('oR3C2'); r3c3 = getObject('oR3C3'); imgr1c1 = getObject('iR1C1'); imgr1c2 = getObject('iR1C2'); imgr1c3 = getObject('iR1C3'); imgr2c1 = getObject('iR2C1'); imgr2c2 = getObject('iR2C2'); imgr2c3 = getObject('iR2C3'); imgr3c1 = getObject('iR3C1'); imgr3c2 = getObject('iR3C2'); imgr3c3 = getObject('iR3C3'); } //=================================================== // view$screenToX //=================================================== function view$screenToX(sx) { var rx,xorg; xorg = this.cx - (this.width / 2); rx = (sx + xorg) + ( (this.buf.col-1) * this.world.width); rx = (rx * this.world.upp) + this.world.xmin; return rx; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // CLIENT$beginPrint //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function CLIENT$beginPrint() { } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // CLIENT$endPrint //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function CLIENT$endPrint() { } //=================================================== // view$screenToY //=================================================== function view$screenToY(sy) { var ry,yorg; yorg = this.cy - (this.height / 2); ry = (sy + yorg) + ( (this.buf.row-1) * this.world.height); ry = this.world.ymax - (ry * this.world.upp); return ry; } //=================================================== // view$xToScreen //=================================================== function view$xToScreen(x) { var tx,xorg; xorg = this.cx - Math.round(this.width / 2); sx = Math.round((x - this.world.xmin) / this.world.upp); sx = sx - ((this.buf.col-1) * this.world.width); sx = sx - xorg; return sx; } //=================================================== // view$yToScreen //=================================================== function view$yToScreen(y) { var ty,yorg; yorg = this.cy - Math.round(this.height / 2); sy = Math.round((this.world.ymax - y) / this.world.upp); sy = sy - ((this.buf.row-1) * this.world.height); sy = sy - yorg; return sy; } //=================================================== // view$bx //=================================================== function view$bx() { var tx; tx = this.cx + ( (this.buf.col-1) * this.world.width); return tx; } //=================================================== // view$by //=================================================== function view$by() { var ty; ty = this.cy + ((this.buf.row-1) * this.world.height); return ty; } //=================================================== // view$left //=================================================== function view$left(x) { var tx; tx = Math.round(x - (this.width / 2)); return tx; } //=================================================== // view$right //=================================================== function view$right(x) { var tx; tx = Math.round(x + (this.width / 2)); return tx; } //=================================================== // view$top //=================================================== function view$top(y) { var ty; ty = Math.round(y - (this.height / 2)); return ty; } //=================================================== // view$bottom //=================================================== function view$bottom(y) { var ty; ty = Math.round(y + (this.height / 2)); return ty; } //=================================================== // CLIENT$root //=================================================== function CLIENT$root(index) { var name; if (index < 0) return (this.world.root + 'unknown/'); name = this.world.layers[index].root + this.world.layers[index].feature + '/'; return name; } //=================================================== // CLIENT$ext //=================================================== function CLIENT$ext(index) { var name; if (index < 0) return ('.gif'); name = this.world.layers[index].ext; return name; } //=================================================== // CLIENT$setForegroundFilter //=================================================== function CLIENT$setForegroundFilter() { var obj; this.foregroundFilter(imgr1c1); this.foregroundFilter(imgr1c2); this.foregroundFilter(imgr1c3); this.foregroundFilter(imgr2c3); this.foregroundFilter(imgr2c1); this.foregroundFilter(imgr2c2); this.foregroundFilter(imgr3c3); this.foregroundFilter(imgr3c1); this.foregroundFilter(imgr3c2); return true; } //=================================================== // CLIENT$setHotspotFilter //=================================================== function CLIENT$setHotspotFilter() { var obj; this.hotspotFilter(imgr1c1); this.hotspotFilter(imgr1c2); this.hotspotFilter(imgr1c3); this.hotspotFilter(imgr2c3); this.hotspotFilter(imgr2c1); this.hotspotFilter(imgr2c2); this.hotspotFilter(imgr3c3); this.hotspotFilter(imgr3c1); this.hotspotFilter(imgr3c2); return true; } //=================================================== // CLIENT$setBackgroundFilter //=================================================== function CLIENT$setBackgroundFilter() { var obj; this.backgroundFilter(imgr1c1); this.backgroundFilter(imgr1c2); this.backgroundFilter(imgr1c3); this.backgroundFilter(imgr2c3); this.backgroundFilter(imgr2c1); this.backgroundFilter(imgr2c2); this.backgroundFilter(imgr3c3); this.backgroundFilter(imgr3c1); this.backgroundFilter(imgr3c2); return true; } //=================================================== // CLIENT$setBasemapFilter //=================================================== function CLIENT$setBasemapFilter() { var obj; this.basemapFilter(imgr1c1); this.basemapFilter(imgr1c2); this.basemapFilter(imgr1c3); this.basemapFilter(imgr2c3); this.basemapFilter(imgr2c1); this.basemapFilter(imgr2c2); this.basemapFilter(imgr3c3); this.basemapFilter(imgr3c1); this.basemapFilter(imgr3c2); return true; } //=================================================== // CLIENT$foregroundFilter //=================================================== function CLIENT$foregroundFilter(parent_img) { var obj; obj = this.getForegroundObject(parent_img); obj.style.filter = this.world.foreground.filter; } //=================================================== // CLIENT$hotspotFilter //=================================================== function CLIENT$hotspotFilter(parent_img) { var obj; obj = this.getHotspotObject(parent_img); obj.style.filter = this.world.hotspot.filter; } //=================================================== // CLIENT$backgroundFilter //=================================================== function CLIENT$backgroundFilter(parent_img) { var obj; obj = this.getBackgroundObject(parent_img); obj.style.filter = this.world.background.filter; } //=================================================== // CLIENT$basemapFilter //=================================================== function CLIENT$basemapFilter(parent_img) { var obj; obj = parent_img; obj.style.filter = this.world.basemap.filter; } //=================================================== // CLIENT$loadHotspot //=================================================== function CLIENT$loadHotspot() { this.loadImageMapAll() } //=================================================== // CLIENT$drawHotspot //=================================================== function CLIENT$drawHotspot() { this.loadAllHotspot(); this.loadImageMapAll() } //=================================================== // CLIENT$drawBasemap //=================================================== function CLIENT$drawBasemap() { this.loadAllBasemap(); } //=================================================== // CLIENT$drawForeground //=================================================== function CLIENT$drawForeground() { this.loadAllForeground(); } //=================================================== // CLIENT$drawBackground //=================================================== function CLIENT$drawBackground() { this.loadAllBackground(); } //======================================================= // CLIENT$setImageMap //======================================================= function CLIENT$setImageMap(index,parent_img,mapname) { var name; var list; var img; if (! this.world.isHot()) return false; img = getObject('f' + parent_img.id); name = img.useMap; list = name.split("#"); if (list.length == 1) name = list[0]; if (list.length == 2) name = list[1]; name = "m" + name.substr(1); this.imageMap = document.getElementById(name); this.imageMap.innerHTML = ''; this.loadObj[index] = this.imageMap; this.loadMap[index] = mapname; } //======================================================= // CLIENT$basemapZIndex //======================================================= function CLIENT$basemapZIndex(z) { r1c1.style.zIndex = z; r1c2.style.zIndex = z; r1c3.style.zIndex = z; r2c1.style.zIndex = z; r2c2.style.zIndex = z; r2c3.style.zIndex = z; r3c1.style.zIndex = z; r3c2.style.zIndex = z; r3c3.style.zIndex = z; } //======================================================= // CLIENT$clearImageMap //======================================================= function CLIENT$clearImageMap() { mR1C1.innerHTML = ""; mR1C2.innerHTML = ""; mR1C3.innerHTML = ""; mR2C1.innerHTML = ""; mR2C2.innerHTML = ""; mR2C3.innerHTML = ""; mR3C1.innerHTML = ""; mR3C2.innerHTML = ""; mR3C3.innerHTML = ""; } //======================================================= // CLIENT$loadImageMapAll //======================================================= function CLIENT$loadImageMapAll() { this.clearImageMap(); if (! this.world.isHot()) return; this.setImageMap(0,imgr1c1,this.mapName(this.view.buf.row+0,this.view.buf.col+0)); this.setImageMap(1,imgr1c2,this.mapName(this.view.buf.row+0,this.view.buf.col+1)); this.setImageMap(2,imgr1c3,this.mapName(this.view.buf.row+0,this.view.buf.col+2)); this.setImageMap(3,imgr2c1,this.mapName(this.view.buf.row+1,this.view.buf.col+0)); this.setImageMap(4,imgr2c2,this.mapName(this.view.buf.row+1,this.view.buf.col+1)); this.setImageMap(5,imgr2c3,this.mapName(this.view.buf.row+1,this.view.buf.col+2)); this.setImageMap(6,imgr3c1,this.mapName(this.view.buf.row+2,this.view.buf.col+0)); this.setImageMap(7,imgr3c2,this.mapName(this.view.buf.row+2,this.view.buf.col+1)); this.setImageMap(8,imgr3c3,this.mapName(this.view.buf.row+2,this.view.buf.col+2)); this.getImageMap(9); } //======================================================= // CLIENT$getImageMap //======================================================= function CLIENT$getImageMap(count) { var list; if (! this.world.isHot()) return; list = this.world.layers[this.world.hotspot.index].root.split("file://"); if (list.length > 1) { this.getImageMapFILE(count) } // Client File Access (non-internet) else { this.getImageMapHTTP(count) } // Internet Reference return true; } //======================================================= // CLIENT$getImageMapFile //======================================================= function CLIENT$getImageMapFILE(count) { var text; var i; var fname; var root; var list; list = this.world.layers[this.world.hotspot.index].root.split("file://"); root = list[1]; root = root + this.world.layers[this.world.hotspot.index].feature + '/'; if (root == '') return; for (i = 0; i < count; ++i) { this.loadObj[i].innerHTML = ''; if (this.loadMap[i] == "") continue; fname = root + this.loadMap[i]; text = fileToString(fname); this.loadObj[i].innerHTML = text; } } //======================================================= // CLIENT$getImageMapHTTP //======================================================= function CLIENT$getImageMapHTTP(count) { var url; var i; var root; root = this.world.layers[this.world.hotspot.index].root; root = root + this.world.layers[this.world.hotspot.index].feature + '/'; for (i = 0; i < count; ++i) { this.loadObj[i].innerHTML = ''; if (this.loadMap[i] == "") continue; url = root + this.loadMap[i]; this.loadObj[i].innerHTML = urlToStr(url); } } //======================================================= // CLIENT$setColor //======================================================= function CLIENT$setColor() { this.isColor = ! this.isColor; if (this.isColor) { r1c1.style.backgroundColor = "lightsalmon"; r1c2.style.backgroundColor = "yellow"; r1c3.style.backgroundColor = "pink"; r2c1.style.backgroundColor = "lightblue"; r2c2.style.backgroundColor = "lightgreen"; r2c3.style.backgroundColor = "lightcyan"; r3c1.style.backgroundColor = "silver"; r3c2.style.backgroundColor = "orange"; r3c3.style.backgroundColor = "skyblue"; } else { r1c1.style.backgroundColor = ""; r1c2.style.backgroundColor = ""; r1c3.style.backgroundColor = ""; r2c1.style.backgroundColor = ""; r2c2.style.backgroundColor = ""; r2c3.style.backgroundColor = ""; r3c1.style.backgroundColor = ""; r3c2.style.backgroundColor = ""; r3c3.style.backgroundColor = ""; } } //=================================================== // CLIENT$goXY //=================================================== function CLIENT$goXY(x,y) { var tx,ty; var xview, yview; this.world.cx = parseFloat(x); this.world.cy = parseFloat(y); tx = this.world.cx - this.world.xmin; ty = this.world.ymax - this.world.cy; xview = Math.round(tx / this.world.upp); yview = Math.round(ty / this.world.upp); this.view.buf.col = Math.floor(xview / this.world.width); this.view.buf.row = Math.floor(yview / this.world.height); // if (this.world.level == 0) // { // this.view.buf.row = -1; // this.view.buf.col = -1; // } this.view.buf.left = (this.view.buf.col-1) * this.world.width; this.view.buf.top = (this.view.buf.row-1) * this.world.height; this.view.cx = xview - this.view.buf.left; this.view.cy = yview - this.view.buf.top; if (this.view.cx < 0) this.view.cx = Math.round(this.world.width * this.view.buf.cols / 2) if (this.view.cy < 0) this.view.cy = Math.round(this.world.height * this.view.buf.rows / 2) if (this.view.cx > this.world.width * this.view.buf.cols) this.view.cx = Math.round(this.world.width * this.view.buf.cols / 2) if (this.view.cy > this.world.height * this.view.buf.rows) this.view.cy = Math.round(this.world.height * this.view.buf.rows / 2) this.loadAllBasemap(); this.loadAllBackground(); this.loadAllForeground(); this.loadAllHotspot(); this.loadImageMapAll(); } //=================================================== // CLIENT$loadAllForeground //=================================================== function CLIENT$loadAllForeground() { if (! this.world.foreground.hide()) { this.getForegroundImage(imgr1c1,this.foregroundName(this.view.buf.row+0,this.view.buf.col+0)); this.getForegroundImage(imgr1c2,this.foregroundName(this.view.buf.row+0,this.view.buf.col+1)); this.getForegroundImage(imgr1c3,this.foregroundName(this.view.buf.row+0,this.view.buf.col+2)); this.getForegroundImage(imgr2c1,this.foregroundName(this.view.buf.row+1,this.view.buf.col+0)); this.getForegroundImage(imgr2c2,this.foregroundName(this.view.buf.row+1,this.view.buf.col+1)); this.getForegroundImage(imgr2c3,this.foregroundName(this.view.buf.row+1,this.view.buf.col+2)); this.getForegroundImage(imgr3c1,this.foregroundName(this.view.buf.row+2,this.view.buf.col+0)); this.getForegroundImage(imgr3c2,this.foregroundName(this.view.buf.row+2,this.view.buf.col+1)); this.getForegroundImage(imgr3c3,this.foregroundName(this.view.buf.row+2,this.view.buf.col+2)); this.foregroundFilter(imgr1c1); this.foregroundFilter(imgr1c2); this.foregroundFilter(imgr1c3); this.foregroundFilter(imgr2c3); this.foregroundFilter(imgr2c1); this.foregroundFilter(imgr2c2); this.foregroundFilter(imgr3c3); this.foregroundFilter(imgr3c1); this.foregroundFilter(imgr3c2); } else { this.clearForegroundAll() } } //=================================================== // CLIENT$loadAllHotspot //=================================================== function CLIENT$loadAllHotspot() { if (! this.world.hotspot.hide()) { this.getHotspotImage(imgr1c1,this.hotspotName(this.view.buf.row+0,this.view.buf.col+0)); this.getHotspotImage(imgr1c2,this.hotspotName(this.view.buf.row+0,this.view.buf.col+1)); this.getHotspotImage(imgr1c3,this.hotspotName(this.view.buf.row+0,this.view.buf.col+2)); this.getHotspotImage(imgr2c1,this.hotspotName(this.view.buf.row+1,this.view.buf.col+0)); this.getHotspotImage(imgr2c2,this.hotspotName(this.view.buf.row+1,this.view.buf.col+1)); this.getHotspotImage(imgr2c3,this.hotspotName(this.view.buf.row+1,this.view.buf.col+2)); this.getHotspotImage(imgr3c1,this.hotspotName(this.view.buf.row+2,this.view.buf.col+0)); this.getHotspotImage(imgr3c2,this.hotspotName(this.view.buf.row+2,this.view.buf.col+1)); this.getHotspotImage(imgr3c3,this.hotspotName(this.view.buf.row+2,this.view.buf.col+2)); } else { this.clearHotspotAll() } } //=================================================== // CLIENT$loadAllBackground //=================================================== function CLIENT$loadAllBackground() { if (! this.world.background.hide()) { this.getBackgroundImage(imgr1c1,this.backgroundName(this.view.buf.row+0,this.view.buf.col+0)); this.getBackgroundImage(imgr1c2,this.backgroundName(this.view.buf.row+0,this.view.buf.col+1)); this.getBackgroundImage(imgr1c3,this.backgroundName(this.view.buf.row+0,this.view.buf.col+2)); this.getBackgroundImage(imgr2c1,this.backgroundName(this.view.buf.row+1,this.view.buf.col+0)); this.getBackgroundImage(imgr2c2,this.backgroundName(this.view.buf.row+1,this.view.buf.col+1)); this.getBackgroundImage(imgr2c3,this.backgroundName(this.view.buf.row+1,this.view.buf.col+2)); this.getBackgroundImage(imgr3c1,this.backgroundName(this.view.buf.row+2,this.view.buf.col+0)); this.getBackgroundImage(imgr3c2,this.backgroundName(this.view.buf.row+2,this.view.buf.col+1)); this.getBackgroundImage(imgr3c3,this.backgroundName(this.view.buf.row+2,this.view.buf.col+2)); } else { this.clearBackgroundAll() } } //=================================================== // CLIENT$loadAllBasemap //=================================================== function CLIENT$loadAllBasemap() { if (! this.world.basemap.hide()) { this.getImage(imgr1c1,this.imgName(this.view.buf.row+0,this.view.buf.col+0),ZBasemap); this.getImage(imgr1c2,this.imgName(this.view.buf.row+0,this.view.buf.col+1),ZBasemap); this.getImage(imgr1c3,this.imgName(this.view.buf.row+0,this.view.buf.col+2),ZBasemap); this.getImage(imgr2c1,this.imgName(this.view.buf.row+1,this.view.buf.col+0),ZBasemap); this.getImage(imgr2c2,this.imgName(this.view.buf.row+1,this.view.buf.col+1),ZBasemap); this.getImage(imgr2c3,this.imgName(this.view.buf.row+1,this.view.buf.col+2),ZBasemap); this.getImage(imgr3c1,this.imgName(this.view.buf.row+2,this.view.buf.col+0),ZBasemap); this.getImage(imgr3c2,this.imgName(this.view.buf.row+2,this.view.buf.col+1),ZBasemap); this.getImage(imgr3c3,this.imgName(this.view.buf.row+2,this.view.buf.col+2),ZBasemap); } else { this.clearBasemapAll() } } //=================================================== // CLIENT$goLevel //=================================================== function CLIENT$goLevel(lev) { return; } //=================================================== // CLIENT$imgName //=================================================== function CLIENT$imgName(r,c) { var name; name = this.world.root + 'blank.gif' if (this.world.basemap.hide()) return (name); if (this.world.level < 0) return (name); if (this.world.level > this.world.levels) return (name); if (r < 1) return (name); if (c < 1) return (name); if (r > this.world.rows) return (name); if (c > this.world.cols) return (name); name = this.root(this.world.basemap.index) + 'l' + this.world.level + '/r' + r + '/c' + c + this.ext(this.world.basemap.index); return (name); } //=================================================== // CLIENT$backgroundName //=================================================== function CLIENT$backgroundName(r,c) { var name; name = this.world.root + 'blank.gif' if (this.world.background.hide()) return (name); if (this.world.level < 0) return (name); if (this.world.level > this.world.levels) return (name); if (r < 1) return (name); if (c < 1) return (name); if (r > this.world.rows) return (name); if (c > this.world.cols) return (name); name = this.root(this.world.background.index) + 'l' + this.world.level + '/r' + r + '/c' + c + this.ext(this.world.background.index); return name; } //=================================================== // CLIENT$foregroundName //=================================================== function CLIENT$foregroundName(r,c) { var name; name = this.world.root + 'blank.gif' if (this.world.foreground.hide()) return (name); if (this.world.level < 0) return (name); if (this.world.level > this.world.levels) return (name); if (r < 1) return (name); if (c < 1) return (name); if (r > this.world.rows) return (name); if (c > this.world.cols) return (name); name = this.root(this.world.foreground.index) + 'l' + this.world.level + '/r' + r + '/c' + c + this.ext(this.world.foreground.index) return name; } //=================================================== // CLIENT$hotspotName //=================================================== function CLIENT$hotspotName(r,c) { var name; name = this.world.root + 'blank.gif' if (this.world.hotspot.hideGraphics) return (name); if (this.world.hotspot.hide()) return (name); if (this.world.level < 0) return (name); if (this.world.level > this.world.levels) return (name); if (r < 1) return (name); if (c < 1) return (name); if (r > this.world.rows) return (name); if (c > this.world.cols) return (name); name = this.root(this.world.hotspot.index) + 'l' + this.world.level + '/r' + r + '/c' + c + this.ext(this.world.hotspot.index) return name; } //=================================================== // CLIENT$mapName (Client Side image maps) //=================================================== function CLIENT$mapName(r,c) { var name; if (this.world.hotspot.hide()) return (""); if (this.world.level < 0) return (""); if (this.world.level > this.world.levels) return (""); if (r < 1) return (""); if (c < 1) return (""); if (r > this.world.rows) return (""); if (c > this.world.cols) return (""); name = 'l' + this.world.level + '/r' + r + '/c' + c + '.txt' return name; } //=================================================== // CLIENT$newTopRows //=================================================== function CLIENT$newTopRows(y) { var ty,c1,c2,c3; if (this.view.top(y) > 0) return y; if (this.view.buf.row <= 1) return (this.view.height / 2); //------ DIV ---------- c1 = r3c1; c2 = r3c2; c3 = r3c3; r3c1 = r2c1; r3c2 = r2c2; r3c3 = r2c3; r2c1 = r1c1; r2c2 = r1c2; r2c3 = r1c3; r1c1 = c1; r1c2 = c2; r1c3 = c3; //------ DIV ---------- c1 = imgr3c1; c2 = imgr3c2; c3 = imgr3c3; imgr3c1 = imgr2c1; imgr3c2 = imgr2c2; imgr3c3 = imgr2c3; imgr2c1 = imgr1c1; imgr2c2 = imgr1c2; imgr2c3 = imgr1c3; imgr1c1 = c1; imgr1c2 = c2; imgr1c3 = c3; //-------------------- this.view.buf.row = this.view.buf.row - 1; ty = y + this.world.height; if (! this.world.basemap.hide()) { this.getImage(imgr1c1,this.imgName(this.view.buf.row,this.view.buf.col+0),ZBasemap); this.getImage(imgr1c2,this.imgName(this.view.buf.row,this.view.buf.col+1),ZBasemap); this.getImage(imgr1c3,this.imgName(this.view.buf.row,this.view.buf.col+2),ZBasemap); } if (! this.world.background.hide()) { this.getBackgroundImage(imgr1c1,this.backgroundName(this.view.buf.row+0,this.view.buf.col+0)); this.getBackgroundImage(imgr1c2,this.backgroundName(this.view.buf.row+0,this.view.buf.col+1)); this.getBackgroundImage(imgr1c3,this.backgroundName(this.view.buf.row+0,this.view.buf.col+2)); } if (! this.world.foreground.hide()) { this.getForegroundImage(imgr1c1,this.foregroundName(this.view.buf.row+0,this.view.buf.col+0)); this.getForegroundImage(imgr1c2,this.foregroundName(this.view.buf.row+0,this.view.buf.col+1)); this.getForegroundImage(imgr1c3,this.foregroundName(this.view.buf.row+0,this.view.buf.col+2)); } if (! this.world.hotspot.hide()) { this.getHotspotImage(imgr1c1,this.hotspotName(this.view.buf.row+0,this.view.buf.col+0)); this.getHotspotImage(imgr1c2,this.hotspotName(this.view.buf.row+0,this.view.buf.col+1)); this.getHotspotImage(imgr1c3,this.hotspotName(this.view.buf.row+0,this.view.buf.col+2)); this.setImageMap(0,imgr1c1,this.mapName(this.view.buf.row+0,this.view.buf.col+0)); this.setImageMap(1,imgr1c2,this.mapName(this.view.buf.row+0,this.view.buf.col+1)); this.setImageMap(2,imgr1c3,this.mapName(this.view.buf.row+0,this.view.buf.col+2)); this.getImageMap(3); } return ty; } //=================================================== // CLIENT$newBottomRows //=================================================== function CLIENT$newBottomRows(y) { var ty,c1,c2,c3; if (this.view.bottom(y) < (this.world.height * this.view.buf.rows)) return (y); if ((this.view.buf.row+2) >= this.world.rows) return ( (this.world.height * this.view.buf.rows) - (this.view.height / 2) ); //--------- DIV -------- c1 = r1c1; // Save Top Rows c2 = r1c2; c3 = r1c3; r1c1 = r2c1; // Move Rows Up r1c2 = r2c2; r1c3 = r2c3; r2c1 = r3c1; r2c2 = r3c2; r2c3 = r3c3; r3c1 = c1; // Wrap top row to Bottom r3c2 = c2; r3c3 = c3; //--------- IMG -------- c1 = imgr1c1; // Save Top Rows c2 = imgr1c2; c3 = imgr1c3; imgr1c1 = imgr2c1; // Move Rows Up imgr1c2 = imgr2c2; imgr1c3 = imgr2c3; imgr2c1 = imgr3c1; imgr2c2 = imgr3c2; imgr2c3 = imgr3c3; imgr3c1 = c1; // Wrap top row to Bottom imgr3c2 = c2; imgr3c3 = c3; //-------------------- this.view.buf.row = this.view.buf.row + 1; ty = y - this.world.height; if (! this.world.basemap.hide()) { this.getImage(imgr3c1,this.imgName(this.view.buf.row+2,this.view.buf.col+0),ZBasemap); this.getImage(imgr3c2,this.imgName(this.view.buf.row+2,this.view.buf.col+1),ZBasemap); this.getImage(imgr3c3,this.imgName(this.view.buf.row+2,this.view.buf.col+2),ZBasemap); } if (! this.world.background.hide()) { this.getBackgroundImage(imgr3c1,this.backgroundName(this.view.buf.row+2,this.view.buf.col+0)); this.getBackgroundImage(imgr3c2,this.backgroundName(this.view.buf.row+2,this.view.buf.col+1)); this.getBackgroundImage(imgr3c3,this.backgroundName(this.view.buf.row+2,this.view.buf.col+2)); } if (! this.world.foreground.hide()) { this.getForegroundImage(imgr3c1,this.foregroundName(this.view.buf.row+2,this.view.buf.col+0)); this.getForegroundImage(imgr3c2,this.foregroundName(this.view.buf.row+2,this.view.buf.col+1)); this.getForegroundImage(imgr3c3,this.foregroundName(this.view.buf.row+2,this.view.buf.col+2)); } if (! this.world.hotspot.hide()) { this.getHotspotImage(imgr3c1,this.hotspotName(this.view.buf.row+2,this.view.buf.col+0)); this.getHotspotImage(imgr3c2,this.hotspotName(this.view.buf.row+2,this.view.buf.col+1)); this.getHotspotImage(imgr3c3,this.hotspotName(this.view.buf.row+2,this.view.buf.col+2)); this.setImageMap(0,imgr3c1,this.mapName(this.view.buf.row+2,this.view.buf.col+0)); this.setImageMap(1,imgr3c2,this.mapName(this.view.buf.row+2,this.view.buf.col+1)); this.setImageMap(2,imgr3c3,this.mapName(this.view.buf.row+2,this.view.buf.col+2)); this.getImageMap(3); } return ty; } //=================================================== // CLIENT$newLeftColumns //=================================================== function CLIENT$newLeftColumns(x) { var tx,r1,r2,r3; if (this.view.left(x) > 0) return x; if (this.view.buf.col <= 1) return (this.view.width / 2); //----------- DIV ------ r1 = r1c3; r2 = r2c3; r3 = r3c3; r1c3 = r1c2; r2c3 = r2c2; r3c3 = r3c2; r1c2 = r1c1; r2c2 = r2c1; r3c2 = r3c1; r1c1 = r1; r2c1 = r2; r3c1 = r3; //----------- IMG ------ r1 = imgr1c3; r2 = imgr2c3; r3 = imgr3c3; imgr1c3 = imgr1c2; imgr2c3 = imgr2c2; imgr3c3 = imgr3c2; imgr1c2 = imgr1c1; imgr2c2 = imgr2c1; imgr3c2 = imgr3c1; imgr1c1 = r1; imgr2c1 = r2; imgr3c1 = r3; this.view.buf.col = this.view.buf.col - 1; tx = x + this.world.width; if (! this.world.basemap.hide()) { this.getImage(imgr1c1,this.imgName(this.view.buf.row+0,this.view.buf.col),ZBasemap); this.getImage(imgr2c1,this.imgName(this.view.buf.row+1,this.view.buf.col),ZBasemap); this.getImage(imgr3c1,this.imgName(this.view.buf.row+2,this.view.buf.col),ZBasemap); } if (! this.world.background.hide()) { this.getBackgroundImage(imgr1c1,this.backgroundName(this.view.buf.row+0,this.view.buf.col+0)); this.getBackgroundImage(imgr2c1,this.backgroundName(this.view.buf.row+1,this.view.buf.col+0)); this.getBackgroundImage(imgr3c1,this.backgroundName(this.view.buf.row+2,this.view.buf.col+0)); } if (! this.world.foreground.hide()) { this.getForegroundImage(imgr1c1,this.foregroundName(this.view.buf.row+0,this.view.buf.col+0)); this.getForegroundImage(imgr2c1,this.foregroundName(this.view.buf.row+1,this.view.buf.col+0)); this.getForegroundImage(imgr3c1,this.foregroundName(this.view.buf.row+2,this.view.buf.col+0)); } if (! this.world.hotspot.hide()) { this.getHotspotImage(imgr1c1,this.hotspotName(this.view.buf.row+0,this.view.buf.col+0)); this.getHotspotImage(imgr2c1,this.hotspotName(this.view.buf.row+1,this.view.buf.col+0)); this.getHotspotImage(imgr3c1,this.hotspotName(this.view.buf.row+2,this.view.buf.col+0)); this.setImageMap(0,imgr1c1,this.mapName(this.view.buf.row+0,this.view.buf.col+0)); this.setImageMap(1,imgr2c1,this.mapName(this.view.buf.row+1,this.view.buf.col+0)); this.setImageMap(2,imgr3c1,this.mapName(this.view.buf.row+2,this.view.buf.col+0)); this.getImageMap(3); } return tx; } //=================================================== // CLIENT$newRightColumns //=================================================== function CLIENT$newRightColumns(x) { var tx,r1,r2,r3; if (this.view.right(x) < (this.world.width * this.view.buf.cols)) return x; if ((this.view.buf.col+2) >= this.world.cols) return ( (this.world.width * this.view.buf.rows) - (this.view.width / 2) ); //------- DIV ----- r1 = r1c1; // Save Left Columns r2 = r2c1; r3 = r3c1; r1c1 = r1c2; // Move Columns Left r2c1 = r2c2; r3c1 = r3c2; r1c2 = r1c3; r2c2 = r2c3; r3c2 = r3c3; r1c3 = r1; // Set new Right Most Columns r2c3 = r2; r3c3 = r3; //------- DIV ----- r1 = imgr1c1; // Save Left Columns r2 = imgr2c1; r3 = imgr3c1; imgr1c1 = imgr1c2; // Move Columns Left imgr2c1 = imgr2c2; imgr3c1 = imgr3c2; imgr1c2 = imgr1c3; imgr2c2 = imgr2c3; imgr3c2 = imgr3c3; imgr1c3 = r1; // Set new Right Most Columns imgr2c3 = r2; imgr3c3 = r3; //----------------- this.view.buf.col = this.view.buf.col + 1; tx = x - this.world.width; if (! this.world.basemap.hide()) { this.getImage(imgr1c3,this.imgName(this.view.buf.row+0,this.view.buf.col+2),ZBasemap); this.getImage(imgr2c3,this.imgName(this.view.buf.row+1,this.view.buf.col+2),ZBasemap); this.getImage(imgr3c3,this.imgName(this.view.buf.row+2,this.view.buf.col+2),ZBasemap); } if (! this.world.background.hide()) { this.getBackgroundImage(imgr1c3,this.backgroundName(this.view.buf.row+0,this.view.buf.col+2)); this.getBackgroundImage(imgr2c3,this.backgroundName(this.view.buf.row+1,this.view.buf.col+2)); this.getBackgroundImage(imgr3c3,this.backgroundName(this.view.buf.row+2,this.view.buf.col+2)); } if (! this.world.foreground.hide()) { this.getForegroundImage(imgr1c3,this.foregroundName(this.view.buf.row+0,this.view.buf.col+2)); this.getForegroundImage(imgr2c3,this.foregroundName(this.view.buf.row+1,this.view.buf.col+2)); this.getForegroundImage(imgr3c3,this.foregroundName(this.view.buf.row+2,this.view.buf.col+2)); } if (! this.world.hotspot.hide()) { this.getHotspotImage(imgr1c3,this.hotspotName(this.view.buf.row+0,this.view.buf.col+2)); this.getHotspotImage(imgr2c3,this.hotspotName(this.view.buf.row+1,this.view.buf.col+2)); this.getHotspotImage(imgr3c3,this.hotspotName(this.view.buf.row+2,this.view.buf.col+2)); this.setImageMap(0,imgr1c3,this.mapName(this.view.buf.row+0,this.view.buf.col+2)); this.setImageMap(1,imgr2c3,this.mapName(this.view.buf.row+1,this.view.buf.col+2)); this.setImageMap(2,imgr3c3,this.mapName(this.view.buf.row+2,this.view.buf.col+2)); this.getImageMap(3); } return tx; } //===================================================== // CLIENT$draw //===================================================== function CLIENT$draw() { var xmin,ymin; var x1,x2,x3; window.status = 'x: ' + getX() + ' y: ' + getY(); document.body.innerHtml = ""; xmin = -this.view.left(this.view.cx); // Center to Middle Tile ymin = -this.view.top(this.view.cy); x1 = xmin; x2 = x1 + this.world.width; x3 = x2 + this.world.width; br1c1 = this.getBackgroundObject(r1c1); br1c2 = this.getBackgroundObject(r1c2); br1c3 = this.getBackgroundObject(r1c3); br2c1 = this.getBackgroundObject(r2c1); br2c2 = this.getBackgroundObject(r2c2); br2c3 = this.getBackgroundObject(r2c3); br3c1 = this.getBackgroundObject(r3c1); br3c2 = this.getBackgroundObject(r3c2); br3c3 = this.getBackgroundObject(r3c3); fr1c1 = this.getForegroundObject(r1c1); fr1c2 = this.getForegroundObject(r1c2); fr1c3 = this.getForegroundObject(r1c3); fr2c1 = this.getForegroundObject(r2c1); fr2c2 = this.getForegroundObject(r2c2); fr2c3 = this.getForegroundObject(r2c3); fr3c1 = this.getForegroundObject(r3c1); fr3c2 = this.getForegroundObject(r3c2); fr3c3 = this.getForegroundObject(r3c3); hr1c1 = this.getHotspotObject(r1c1); hr1c2 = this.getHotspotObject(r1c2); hr1c3 = this.getHotspotObject(r1c3); hr2c1 = this.getHotspotObject(r2c1); hr2c2 = this.getHotspotObject(r2c2); hr2c3 = this.getHotspotObject(r2c3); hr3c1 = this.getHotspotObject(r3c1); hr3c2 = this.getHotspotObject(r3c2); hr3c3 = this.getHotspotObject(r3c3); posImage(r1c1,x1,ymin,ZBasemap); posImage(r1c2,x2,ymin,ZBasemap); posImage(r1c3,x3,ymin,ZBasemap); posImage(br1c1,x1,ymin,ZBackground); posImage(br1c2,x2,ymin,ZBackground); posImage(br1c3,x3,ymin,ZBackground); posImage(fr1c1,x1,ymin,ZForeground); posImage(fr1c2,x2,ymin,ZForeground); posImage(fr1c3,x3,ymin,ZForeground); posImage(hr1c1,x1,ymin,ZHotspot); posImage(hr1c2,x2,ymin,ZHotspot); posImage(hr1c3,x3,ymin,ZHotspot); ymin = ymin + this.world.height; posImage(r2c1,x1,ymin,ZBasemap); posImage(r2c2,x2,ymin,ZBasemap); posImage(r2c3,x3,ymin,ZBasemap); posImage(br2c1,x1,ymin,ZBackground); posImage(br2c2,x2,ymin,ZBackground); posImage(br2c3,x3,ymin,ZBackground); posImage(fr2c1,x1,ymin,ZForeground); posImage(fr2c2,x2,ymin,ZForeground); posImage(fr2c3,x3,ymin,ZForeground); posImage(hr2c1,x1,ymin,ZHotspot); posImage(hr2c2,x2,ymin,ZHotspot); posImage(hr2c3,x3,ymin,ZHotspot); ymin = ymin + this.world.height; posImage(r3c1,x1,ymin,ZBasemap); posImage(r3c2,x2,ymin,ZBasemap); posImage(r3c3,x3,ymin,ZBasemap); posImage(br3c1,x1,ymin,ZBackground); posImage(br3c2,x2,ymin,ZBackground); posImage(br3c3,x3,ymin,ZBackground); posImage(fr3c1,x1,ymin,ZForeground); posImage(fr3c2,x2,ymin,ZForeground); posImage(fr3c3,x3,ymin,ZForeground); posImage(hr3c1,x1,ymin,ZHotspot); posImage(hr3c2,x2,ymin,ZHotspot); posImage(hr3c3,x3,ymin,ZHotspot); marker.draw(); } //====================================================== // CLIENT$getBackgroundImage //====================================================== function CLIENT$getBackgroundImage(parent_img,name) { var obj; obj = this.getBackgroundObject(parent_img); this.getImage(obj,name,ZBackground); } //====================================================== // CLIENT$getForegroundImage //====================================================== function CLIENT$getForegroundImage(parent_img,name) { var img; img = this.getForegroundObject(parent_img); this.getImage(img,name,ZForeground); img.style.Filter = this.world.foreground.filter; } //====================================================== // CLIENT$getHotspotImage //====================================================== function CLIENT$getHotspotImage(parent_img,name) { var img; img = this.getHotspotObject(parent_img); this.getImage(img,name,ZHotspot); img.style.filter = this.world.hotspot.filter; } //====================================================== // CLIENT$setTransparent //====================================================== function CLIENT$setTransparent() { var i,n,p; n = this.world.transparentOverlays.length; this.world.foregroundFilter = ''; this.world.foregroundPercent = 100; for (i = 0; i < n; i++) { if (this.world.foreground == this.world.transparentOverlays[i]) { p = parseInt(this.world.transparentPercents[i]); this.world.transparentPercent = p; return; } } } //====================================================== // CLIENT$getBackgroundObject //====================================================== function CLIENT$getBackgroundObject(parent_img) { var objName; var obj; objName = 'b' + parent_img.id; obj = getObject(objName); return (obj); } //====================================================== // CLIENT$getForegroundObject //====================================================== function CLIENT$getForegroundObject(parent_img) { var objName; var obj; objName = 'f' + parent_img.id; obj = getObject(objName); return (obj); } //====================================================== // CLIENT$getHotspotObject //====================================================== function CLIENT$getHotspotObject(parent_img) { var objName; var obj; objName = 'h' + parent_img.id; obj = getObject(objName); return (obj); } //====================================================== // CLIENT$clearBackgroundAll //====================================================== function CLIENT$clearBackgroundAll() { this.getImage(getObject('biR1C1'),this.world.root + "blank.gif",ZBackground); this.getImage(getObject('biR1C2'),this.world.root + "blank.gif",ZBackground); this.getImage(getObject('biR1C3'),this.world.root + "blank.gif",ZBackground); this.getImage(getObject('biR2C1'),this.world.root + "blank.gif",ZBackground); this.getImage(getObject('biR2C2'),this.world.root + "blank.gif",ZBackground); this.getImage(getObject('biR2C3'),this.world.root + "blank.gif",ZBackground); this.getImage(getObject('biR3C1'),this.world.root + "blank.gif",ZBackground); this.getImage(getObject('biR3C2'),this.world.root + "blank.gif",ZBackground); this.getImage(getObject('biR3C3'),this.world.root + "blank.gif",ZBackground); } //====================================================== // CLIENT$clearForegroundAll //====================================================== function CLIENT$clearForegroundAll() { this.getImage(getObject('fiR1C1'),this.world.root + "blank.gif",ZForeground); this.getImage(getObject('fiR1C2'),this.world.root + "blank.gif",ZForeground); this.getImage(getObject('fiR1C3'),this.world.root + "blank.gif",ZForeground); this.getImage(getObject('fiR2C1'),this.world.root + "blank.gif",ZForeground); this.getImage(getObject('fiR2C2'),this.world.root + "blank.gif",ZForeground); this.getImage(getObject('fiR2C3'),this.world.root + "blank.gif",ZForeground); this.getImage(getObject('fiR3C1'),this.world.root + "blank.gif",ZForeground); this.getImage(getObject('fiR3C2'),this.world.root + "blank.gif",ZForeground); this.getImage(getObject('fiR3C3'),this.world.root + "blank.gif",ZForeground); } //====================================================== // CLIENT$clearHotspotAll //====================================================== function CLIENT$clearHotspotAll() { this.getImage(getObject('hiR1C1'),this.world.root + "blank.gif",ZHotspot); this.getImage(getObject('hiR1C2'),this.world.root + "blank.gif",ZHotspot); this.getImage(getObject('hiR1C3'),this.world.root + "blank.gif",ZHotspot); this.getImage(getObject('hiR2C1'),this.world.root + "blank.gif",ZHotspot); this.getImage(getObject('hiR2C2'),this.world.root + "blank.gif",ZHotspot); this.getImage(getObject('hiR2C3'),this.world.root + "blank.gif",ZHotspot); this.getImage(getObject('hiR3C1'),this.world.root + "blank.gif",ZHotspot); this.getImage(getObject('hiR3C2'),this.world.root + "blank.gif",ZHotspot); this.getImage(getObject('hiR3C3'),this.world.root + "blank.gif",ZHotspot); } //====================================================== // CLIENT$clearBasemapAll //====================================================== function CLIENT$clearBasemapAll() { this.getImage(imgr1c1,this.world.root + "blank.gif",ZBasemap); this.getImage(imgr1c2,this.world.root + "blank.gif",ZBasemap); this.getImage(imgr1c3,this.world.root + "blank.gif",ZBasemap); this.getImage(imgr2c1,this.world.root + "blank.gif",ZBasemap); this.getImage(imgr2c2,this.world.root + "blank.gif",ZBasemap); this.getImage(imgr2c3,this.world.root + "blank.gif",ZBasemap); this.getImage(imgr3c1,this.world.root + "blank.gif",ZBasemap); this.getImage(imgr3c2,this.world.root + "blank.gif",ZBasemap); this.getImage(imgr3c3,this.world.root + "blank.gif",ZBasemap); } //========================================================= // CLIENT$setGrid //========================================================= function CLIENT$setGrid(checked) { var border; border = 0; if (checked) border = 1; imgr1c1.border = border; imgr1c2.border = border; imgr1c3.border = border; imgr2c1.border = border; imgr2c2.border = border; imgr2c3.border = border; imgr3c1.border = border; imgr3c2.border = border; imgr3c3.border = border; return; } //***************************************************** // CLIENT$getImage (Browser Dependent) //***************************************************** function CLIENT$getImage(img,url,z) { if (document.layers) { img.document.images[0].src = url; img.zIndex = z; } else { img.src = url; } } //========================================================= // CLIENT$mouseDown //========================================================= function CLIENT$mouseDown(x,y) { this.moved = false; return; } //========================================================= // CLIENT$mouseUp //========================================================= function CLIENT$mouseUp(x,y,dx,dy) { var rx,ry,lev; if (! this.moved) return; this.moved = false; } //========================================================= // CLIENT$mouseMove //========================================================= function CLIENT$mouseMove(x,y,dx,dy) { var cx,cy; var dx,dy; var rx,ry; if (dx == 0) return; if (dy == 0) return; this.moved = true; world.moved = true; world.x1 = world.x2; world.y1 = world.y2; cx = this.view.cx - dx; cy = this.view.cy - dy; cx = this.newRightColumns(cx); cx = this.newLeftColumns(cx); cy = this.newBottomRows(cy); cy = this.newTopRows(cy); this.view.cx = cx; this.view.cy = cy; this.draw(); rx = this.getX(); ry = this.getY(); try { parent.moveTo(ID,rx,ry); } catch (e) { return; } } //=================================================== // CLIENT$getX //=================================================== function CLIENT$getX() { var x; x = (this.view.bx() * this.world.upp) + this.world.xmin; return (x); } //=================================================== // CLIENT$getY //=================================================== function CLIENT$getY() { var y; y = this.world.ymax - (this.view.by() * this.world.upp); return (y); }