home *** CD-ROM | disk | FTP | other *** search
Wrap
// Copyright 2000 T-Mapy spol. s r. o. All rights reserved. root_script = 'http://www.shocart.cz/tms/shocart'; w_left = 50; w_top = 50; w_width = 710; w_height = 515; w_features = ',menubar'; strange_opener = 0; map_window = null; isN = false; isIE = false; version = 0; if (navigator.appName == "Netscape") { isN = true; if (navigator.appVersion.search("5.0") == -1) version = 4; else version = 5; } else isIE = true; function Map() { newwindow = window.open(root_script+'/index.php?client_type=shocart&client_lang=&strange_opener=0', 'TMapServer','status,width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+w_features); newwindow.focus(); } function MapScript(script) { newwindow = window.open(script, 'TMapServer','status,width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+w_features); newwindow.focus(); } function MapScriptWindow(script, width, height) { newwindow = window.open(script, 'TMapServer','status,width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+w_features); newwindow.focus(); } function GetUrl(l) { var script = l.pathname; var arr = script.split('/'); arr.length = arr.length-1; script = arr.join('/'); return l.protocol + '//' + l.host + script; } function MapExist() { var exist = false; if (strange_opener !=1) { if (parent.opener != null) { if (!parent.opener.closed) { if (parent.opener.name == 'map_panel') { exist = true; map_window = parent.opener.top; } } } if (!exist) { if (parent.name == 'map_db') { if (parent.map_window != null) { if (!parent.map_window.closed) { map_window = parent.map_window; exist = true; } } } } if (!exist) { if (map_window != null) { if (!map_window.closed) exist = true; } } //alert('map_window'); } return exist; } function SetMap(map_exist, str) { if (top.map_interface != null) { top.map_interface.location.href = GetUrl(top.map_interface.location) + '/db_interface.php?' + str; } else { if (map_exist && (strange_opener != 1)) { map_window.map_interface.location.href = GetUrl(map_window.map_interface.location) + '/db_interface.php?' + str; map_window.focus(); } else { var script = root_script + '/index.php?client_type=shocart&strange_opener=0&interface=tmv&' + str; var win_feature = 'status,width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+w_features; map_window = window.open('','TMapServer',win_feature); if (map_window.map_interface != null && strange_opener != 1) map_window.map_interface.location.href = GetUrl(map_window.map_interface.location) + '/db_interface.php?' + str; else map_window.location.href = script; if (strange_opener !=1) { if (parent.name == 'map_db') parent.map_window = map_window; } map_window.focus(); } } } function ShowMap(theme,field,code,zoom,lang) { var str = 'Theme='+theme+'&Command=SelByFld&Field='+field+'&Values='+code+'&Zoom='+zoom+'&Percent=110&client_lang='+lang+'&strange_opener=0&Project=TMS_SHOCART&cacheID='; str = str + (new Date).getTime(); SetMap(MapExist(), str); } function ShowMapEx(parameters,lang) { var str = parameters + '&Project=TMS_SHOCART&strange_opener=0&client_lang='+lang + '&cacheID=' + (new Date).getTime(); SetMap(MapExist(), str); } function DynamicMap(id) { var code = id.split("_"); ShowMap('spot','ID',code[0],'ToScale','cz'); }