if(typeof dojo=="undefined"){
(function(){
var _1=null;
if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){
var _2="",_3="",_4="",_5={},_6={};
_1=_1||djConfig.scopeMap;
for(var i=0;i<_1.length;i++){
var _8=_1[i];
_2+="var "+_8[0]+" = {}; "+_8[1]+" = "+_8[0]+";"+_8[1]+"._scopeName = '"+_8[1]+"';";
_3+=(i==0?"":",")+_8[0];
_4+=(i==0?"":",")+_8[1];
_5[_8[0]]=_8[1];
_6[_8[1]]=_8[0];
}
eval(_2+"dojo._scopeArgs = ["+_4+"];");
dojo._scopePrefixArgs=_3;
dojo._scopePrefix="(function("+_3+"){";
dojo._scopeSuffix="})("+_4+")";
dojo._scopeMap=_5;
dojo._scopeMapRev=_6;
}
(function(){
if(typeof this["loadFirebugConsole"]=="function"){
this["loadFirebugConsole"]();
}else{
this.console=this.console||{};
var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];
var i=0,tn;
while((tn=cn[i++])){
if(!console[tn]){
(function(){
var _c=tn+"";
console[_c]=("log" in console)?function(){
var a=Array.apply({},arguments);
a.unshift(_c+":");
console["log"](a.join(" "));
}:function(){
};
})();
}
}
}
if(typeof dojo=="undefined"){
this.dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};
}
var d=dojo;
if(typeof dijit=="undefined"){
this.dijit={_scopeName:"dijit"};
}
if(typeof dojox=="undefined"){
this.dojox={_scopeName:"dojox"};
}
if(!d._scopeArgs){
d._scopeArgs=[dojo,dijit,dojox];
}
d.global=this;
d.config={isDebug:false,debugAtAllCosts:false};
if(typeof djConfig!="undefined"){
for(var _f in djConfig){
d.config[_f]=djConfig[_f];
}
}
dojo.locale=d.config.locale;
var rev="$Rev: 17468 $".match(/\d+/);
dojo.version={major:1,minor:3,patch:1,flag:"",revision:rev?+rev[0]:NaN,toString:function(){
with(d.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
if(typeof OpenAjax!="undefined"){
OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());
}
var _11={};
dojo._mixin=function(obj,_13){
for(var x in _13){
if(_11[x]===undefined||_11[x]!=_13[x]){
obj[x]=_13[x];
}
}
if(d.isIE&&_13){
var p=_13.toString;
if(typeof p=="function"&&p!=obj.toString&&p!=_11.toString&&p!="\nfunction toString() {\n    [native code]\n}\n"){
obj.toString=_13.toString;
}
}
return obj;
};
dojo.mixin=function(obj,_17){
if(!obj){
obj={};
}
for(var i=1,l=arguments.length;i<l;i++){
d._mixin(obj,arguments[i]);
}
return obj;
};
dojo._getProp=function(_1a,_1b,_1c){
var obj=_1c||d.global;
for(var i=0,p;obj&&(p=_1a[i]);i++){
if(i==0&&this._scopeMap[p]){
p=this._scopeMap[p];
}
obj=(p in obj?obj[p]:(_1b?obj[p]={}:undefined));
}
return obj;
};
dojo.setObject=function(_20,_21,_22){
var _23=_20.split("."),p=_23.pop(),obj=d._getProp(_23,true,_22);
return obj&&p?(obj[p]=_21):undefined;
};
dojo.getObject=function(_26,_27,_28){
return d._getProp(_26.split("."),_27,_28);
};
dojo.exists=function(_29,obj){
return !!d.getObject(_29,false,obj);
};
dojo["eval"]=function(_2b){
return d.global.eval?d.global.eval(_2b):eval(_2b);
};
d.deprecated=d.experimental=function(){
};
})();
(function(){
var d=dojo;
d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_2d){
var mp=this._modulePrefixes;
return !!(mp[_2d]&&mp[_2d].value);
},_getModulePrefix:function(_2f){
var mp=this._modulePrefixes;
if(this._moduleHasPrefix(_2f)){
return mp[_2f].value;
}
return _2f;
},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});
dojo._loadUriAndCheck=function(uri,_32,cb){
var ok=false;
try{
ok=this._loadUri(uri,cb);
}
catch(e){
console.error("failed loading "+uri+" with error: "+e);
}
return !!(ok&&this._loadedModules[_32]);
};
dojo.loaded=function(){
this._loadNotifying=true;
this._postLoad=true;
var mll=d._loaders;
this._loaders=[];
for(var x=0;x<mll.length;x++){
mll[x]();
}
this._loadNotifying=false;
if(d._postLoad&&d._inFlightCount==0&&mll.length){
d._callLoaded();
}
};
dojo.unloaded=function(){
var mll=d._unloaders;
while(mll.length){
(mll.pop())();
}
};
d._onto=function(arr,obj,fn){
if(!fn){
arr.push(obj);
}else{
if(fn){
var _3b=(typeof fn=="string")?obj[fn]:fn;
arr.push(function(){
_3b.call(obj);
});
}
}
};
dojo.addOnLoad=function(obj,_3d){
d._onto(d._loaders,obj,_3d);
if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){
d._callLoaded();
}
};
var dca=d.config.addOnLoad;
if(dca){
d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);
}
dojo._modulesLoaded=function(){
if(d._postLoad){
return;
}
if(d._inFlightCount>0){
console.warn("files still in flight!");
return;
}
d._callLoaded();
};
dojo._callLoaded=function(){
if(typeof setTimeout=="object"||(dojo.config.useXDomain&&d.isOpera)){
if(dojo.isAIR){
setTimeout(function(){
dojo.loaded();
},0);
}else{
setTimeout(dojo._scopeName+".loaded();",0);
}
}else{
d.loaded();
}
};
dojo._getModuleSymbols=function(_3f){
var _40=_3f.split(".");
for(var i=_40.length;i>0;i--){
var _42=_40.slice(0,i).join(".");
if((i==1)&&!this._moduleHasPrefix(_42)){
_40[0]="../"+_40[0];
}else{
var _43=this._getModulePrefix(_42);
if(_43!=_42){
_40.splice(0,i,_43);
break;
}
}
}
return _40;
};
dojo._global_omit_module_check=false;
dojo.loadInit=function(_44){
_44();
};
dojo._loadModule=dojo.require=function(_45,_46){
_46=this._global_omit_module_check||_46;
var _47=this._loadedModules[_45];
if(_47){
return _47;
}
var _48=this._getModuleSymbols(_45).join("/")+".js";
var _49=(!_46)?_45:null;
var ok=this._loadPath(_48,_49);
if(!ok&&!_46){
throw new Error("Could not load '"+_45+"'; last tried '"+_48+"'");
}
if(!_46&&!this._isXDomain){
_47=this._loadedModules[_45];
if(!_47){
throw new Error("symbol '"+_45+"' is not defined after loading '"+_48+"'");
}
}
return _47;
};
dojo.provide=function(_4b){
_4b=_4b+"";
return (d._loadedModules[_4b]=d.getObject(_4b,true));
};
dojo.platformRequire=function(_4c){
var _4d=_4c.common||[];
var _4e=_4d.concat(_4c[d._name]||_4c["default"]||[]);
for(var x=0;x<_4e.length;x++){
var _50=_4e[x];
if(_50.constructor==Array){
d._loadModule.apply(d,_50);
}else{
d._loadModule(_50);
}
}
};
dojo.requireIf=function(_51,_52){
if(_51===true){
var _53=[];
for(var i=1;i<arguments.length;i++){
_53.push(arguments[i]);
}
d.require.apply(d,_53);
}
};
dojo.requireAfterIf=d.requireIf;
dojo.registerModulePath=function(_55,_56){
d._modulePrefixes[_55]={name:_55,value:_56};
};
if(typeof dojo.config["useXDomain"]=="undefined"){
dojo.config.useXDomain=true;
}
dojo.registerModulePath("dojo","http://serverapi.arcgisonline.com/jsapi/arcgis/1.4/js/dojo/dojo");
dojo.registerModulePath("dijit","http://serverapi.arcgisonline.com/jsapi/arcgis/1.4/js/dojo/dijit");
dojo.registerModulePath("dojox","http://serverapi.arcgisonline.com/jsapi/arcgis/1.4/js/dojo/dojox");
dojo.requireLocalization=function(_57,_58,_59,_5a){
d.require("dojo.i18n");
d.i18n._requireLocalization.apply(d.hostenv,arguments);
};
var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");
var ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");
dojo._Url=function(){
var n=null;
var _a=arguments;
var uri=[_a[0]];
for(var i=1;i<_a.length;i++){
if(!_a[i]){
continue;
}
var _61=new d._Url(_a[i]+"");
var _62=new d._Url(uri[0]+"");
if(_61.path==""&&!_61.scheme&&!_61.authority&&!_61.query){
if(_61.fragment!=n){
_62.fragment=_61.fragment;
}
_61=_62;
}else{
if(!_61.scheme){
_61.scheme=_62.scheme;
if(!_61.authority){
_61.authority=_62.authority;
if(_61.path.charAt(0)!="/"){
var _63=_62.path.substring(0,_62.path.lastIndexOf("/")+1)+_61.path;
var _64=_63.split("/");
for(var j=0;j<_64.length;j++){
if(_64[j]=="."){
if(j==_64.length-1){
_64[j]="";
}else{
_64.splice(j,1);
j--;
}
}else{
if(j>0&&!(j==1&&_64[0]=="")&&_64[j]==".."&&_64[j-1]!=".."){
if(j==(_64.length-1)){
_64.splice(j,1);
_64[j-1]="";
}else{
_64.splice(j-1,2);
j-=2;
}
}
}
}
_61.path=_64.join("/");
}
}
}
}
uri=[];
if(_61.scheme){
uri.push(_61.scheme,":");
}
if(_61.authority){
uri.push("//",_61.authority);
}
uri.push(_61.path);
if(_61.query){
uri.push("?",_61.query);
}
if(_61.fragment){
uri.push("#",_61.fragment);
}
}
this.uri=uri.join("");
var r=this.uri.match(ore);
this.scheme=r[2]||(r[1]?"":n);
this.authority=r[4]||(r[3]?"":n);
this.path=r[5];
this.query=r[7]||(r[6]?"":n);
this.fragment=r[9]||(r[8]?"":n);
if(this.authority!=n){
r=this.authority.match(ire);
this.user=r[3]||n;
this.password=r[4]||n;
this.host=r[6]||r[7];
this.port=r[9]||n;
}
};
dojo._Url.prototype.toString=function(){
return this.uri;
};
dojo.moduleUrl=function(_67,url){
var loc=d._getModuleSymbols(_67).join("/");
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
var _6a=loc.indexOf(":");
if(loc.charAt(0)!="/"&&(_6a==-1||_6a>loc.indexOf("/"))){
loc=d.baseUrl+loc;
}
return new d._Url(loc,url);
};
})();
dojo.provide("dojo._base._loader.loader_xd");
dojo._xdReset=function(){
this._isXDomain=dojo.config.useXDomain||false;
this._xdTimer=0;
this._xdInFlight={};
this._xdOrderedReqs=[];
this._xdDepMap={};
this._xdContents=[];
this._xdDefList=[];
};
dojo._xdReset();
dojo._xdCreateResource=function(_6b,_6c,_6d){
var _6e=_6b.replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,"");
var _6f=[];
var _70=/dojo.(require|requireIf|provide|requireAfterIf|platformRequire|requireLocalization)\s*\(([\w\W]*?)\)/mg;
var _71;
while((_71=_70.exec(_6e))!=null){
if(_71[1]=="requireLocalization"){
eval(_71[0]);
}else{
_6f.push("\""+_71[1]+"\", "+_71[2]);
}
}
var _72=[];
_72.push(dojo._scopeName+"._xdResourceLoaded(function("+dojo._scopePrefixArgs+"){\n");
var _73=dojo._xdExtractLoadInits(_6b);
if(_73){
_6b=_73[0];
for(var i=1;i<_73.length;i++){
_72.push(_73[i]+";\n");
}
}
_72.push("return {");
if(_6f.length>0){
_72.push("depends: [");
for(i=0;i<_6f.length;i++){
if(i>0){
_72.push(",\n");
}
_72.push("["+_6f[i]+"]");
}
_72.push("],");
}
_72.push("\ndefineResource: function("+dojo._scopePrefixArgs+"){");
if(!dojo.config["debugAtAllCosts"]||_6c=="dojo._base._loader.loader_debug"){
_72.push(_6b);
}
_72.push("\n}, resourceName: '"+_6c+"', resourcePath: '"+_6d+"'};});");
return _72.join("");
};
dojo._xdExtractLoadInits=function(_75){
var _76=/dojo.loadInit\s*\(/g;
_76.lastIndex=0;
var _77=/[\(\)]/g;
_77.lastIndex=0;
var _78=[];
var _79;
while((_79=_76.exec(_75))){
_77.lastIndex=_76.lastIndex;
var _7a=1;
var _7b;
while((_7b=_77.exec(_75))){
if(_7b[0]==")"){
_7a-=1;
}else{
_7a+=1;
}
if(_7a==0){
break;
}
}
if(_7a!=0){
throw "unmatched paren around character "+_77.lastIndex+" in: "+_75;
}
var _7c=_76.lastIndex-_79[0].length;
_78.push(_75.substring(_7c,_77.lastIndex));
var _7d=_77.lastIndex-_7c;
_75=_75.substring(0,_7c)+_75.substring(_77.lastIndex,_75.length);
_76.lastIndex=_77.lastIndex-_7d;
_76.lastIndex=_77.lastIndex;
}
if(_78.length>0){
_78.unshift(_75);
}
return (_78.length?_78:null);
};
dojo._xdIsXDomainPath=function(_7e){
var _7f=_7e.indexOf(":");
var _80=_7e.indexOf("/");
if(_7f>0&&_7f<_80){
return true;
}else{
var url=this.baseUrl;
_7f=url.indexOf(":");
_80=url.indexOf("/");
if(_7f>0&&_7f<_80&&(!location.host||url.indexOf("http://"+location.host)!=0)){
return true;
}
}
return false;
};
dojo._loadPath=function(_82,_83,cb){
var _85=this._xdIsXDomainPath(_82);
this._isXDomain|=_85;
var uri=((_82.charAt(0)=="/"||_82.match(/^\w+:/))?"":this.baseUrl)+_82;
try{
return ((!_83||this._isXDomain)?this._loadUri(uri,cb,_85,_83):this._loadUriAndCheck(uri,_83,cb));
}
catch(e){
console.error(e);
return false;
}
};
dojo._loadUri=function(uri,cb,_89,_8a){
if(this._loadedUrls[uri]){
return 1;
}
if(this._isXDomain&&_8a&&_8a!="dojo.i18n"){
this._xdOrderedReqs.push(_8a);
if(_89||uri.indexOf("/nls/")==-1){
this._xdInFlight[_8a]=true;
this._inFlightCount++;
}
if(!this._xdTimer){
if(dojo.isAIR){
this._xdTimer=setInterval(function(){
dojo._xdWatchInFlight();
},100);
}else{
this._xdTimer=setInterval(dojo._scopeName+"._xdWatchInFlight();",100);
}
}
this._xdStartTime=(new Date()).getTime();
}
if(_89){
var _8b=uri.lastIndexOf(".");
if(_8b<=0){
_8b=uri.length-1;
}
var _8c=uri.substring(0,_8b)+".xd";
if(_8b!=uri.length-1){
_8c+=uri.substring(_8b,uri.length);
}
if(dojo.isAIR){
_8c=_8c.replace("app:/","/");
}
var _8d=document.createElement("script");
_8d.type="text/javascript";
_8d.src=_8c;
if(!this.headElement){
this._headElement=document.getElementsByTagName("head")[0];
if(!this._headElement){
this._headElement=document.getElementsByTagName("html")[0];
}
}
this._headElement.appendChild(_8d);
}else{
var _8e=this._getText(uri,null,true);
if(_8e==null){
return 0;
}
if(this._isXDomain&&uri.indexOf("/nls/")==-1&&_8a!="dojo.i18n"){
var res=this._xdCreateResource(_8e,_8a,uri);
dojo.eval(res);
}else{
if(cb){
_8e="("+_8e+")";
}else{
_8e=this._scopePrefix+_8e+this._scopeSuffix;
}
var _90=dojo["eval"](_8e+"\r\n//@ sourceURL="+uri);
if(cb){
cb(_90);
}
}
}
this._loadedUrls[uri]=true;
this._loadedUrls.push(uri);
return true;
};
dojo._xdResourceLoaded=function(res){
res=res.apply(dojo.global,dojo._scopeArgs);
var _92=res.depends;
var _93=null;
var _94=null;
var _95=[];
if(_92&&_92.length>0){
var dep=null;
var _97=0;
var _98=false;
for(var i=0;i<_92.length;i++){
dep=_92[i];
if(dep[0]=="provide"){
_95.push(dep[1]);
}else{
if(!_93){
_93=[];
}
if(!_94){
_94=[];
}
var _9a=this._xdUnpackDependency(dep);
if(_9a.requires){
_93=_93.concat(_9a.requires);
}
if(_9a.requiresAfter){
_94=_94.concat(_9a.requiresAfter);
}
}
var _9b=dep[0];
var _9c=_9b.split(".");
if(_9c.length==2){
dojo[_9c[0]][_9c[1]].apply(dojo[_9c[0]],dep.slice(1));
}else{
dojo[_9b].apply(dojo,dep.slice(1));
}
}
if(_95.length==1&&_95[0]=="dojo._base._loader.loader_debug"){
res.defineResource(dojo);
}else{
var _9d=this._xdContents.push({content:res.defineResource,resourceName:res["resourceName"],resourcePath:res["resourcePath"],isDefined:false})-1;
for(i=0;i<_95.length;i++){
this._xdDepMap[_95[i]]={requires:_93,requiresAfter:_94,contentIndex:_9d};
}
}
for(i=0;i<_95.length;i++){
this._xdInFlight[_95[i]]=false;
}
}
};
dojo._xdLoadFlattenedBundle=function(_9e,_9f,_a0,_a1){
_a0=_a0||"root";
var _a2=dojo.i18n.normalizeLocale(_a0).replace("-","_");
var _a3=[_9e,"nls",_9f].join(".");
var _a4=dojo["provide"](_a3);
_a4[_a2]=_a1;
var _a5=[_9e,_a2,_9f].join(".");
var _a6=dojo._xdBundleMap[_a5];
if(_a6){
for(var _a7 in _a6){
_a4[_a7]=_a1;
}
}
};
dojo._xdInitExtraLocales=function(){
var _a8=dojo.config.extraLocale;
if(_a8){
if(!_a8 instanceof Array){
_a8=[_a8];
}
dojo._xdReqLoc=dojo.xdRequireLocalization;
dojo.xdRequireLocalization=function(m,b,_ab,_ac){
dojo._xdReqLoc(m,b,_ab,_ac);
if(_ab){
return;
}
for(var i=0;i<_a8.length;i++){
dojo._xdReqLoc(m,b,_a8[i],_ac);
}
};
}
};
dojo._xdBundleMap={};
dojo.xdRequireLocalization=function(_ae,_af,_b0,_b1){
if(dojo._xdInitExtraLocales){
dojo._xdInitExtraLocales();
dojo._xdInitExtraLocales=null;
dojo.xdRequireLocalization.apply(dojo,arguments);
return;
}
var _b2=_b1.split(",");
var _b3=dojo.i18n.normalizeLocale(_b0);
var _b4="";
for(var i=0;i<_b2.length;i++){
if(_b3.indexOf(_b2[i])==0){
if(_b2[i].length>_b4.length){
_b4=_b2[i];
}
}
}
var _b6=_b4.replace("-","_");
var _b7=dojo.getObject([_ae,"nls",_af].join("."));
if(_b7&&_b7[_b6]){
_b8[_b3.replace("-","_")]=_b7[_b6];
}else{
var _b9=[_ae,(_b6||"root"),_af].join(".");
var _b8=dojo._xdBundleMap[_b9];
if(!_b8){
_b8=dojo._xdBundleMap[_b9]={};
}
_b8[_b3.replace("-","_")]=true;
dojo.require(_ae+".nls"+(_b4?"."+_b4:"")+"."+_af);
}
};
dojo._xdRealRequireLocalization=dojo.requireLocalization;
dojo.requireLocalization=function(_ba,_bb,_bc,_bd){
var _be=this.moduleUrl(_ba).toString();
if(this._xdIsXDomainPath(_be)){
return dojo.xdRequireLocalization.apply(dojo,arguments);
}else{
return dojo._xdRealRequireLocalization.apply(dojo,arguments);
}
};
dojo._xdUnpackDependency=function(dep){
var _c0=null;
var _c1=null;
switch(dep[0]){
case "requireIf":
case "requireAfterIf":
if(dep[1]===true){
_c0=[{name:dep[2],content:null}];
}
break;
case "platformRequire":
var _c2=dep[1];
var _c3=_c2["common"]||[];
_c0=(_c2[dojo.hostenv.name_])?_c3.concat(_c2[dojo.hostenv.name_]||[]):_c3.concat(_c2["default"]||[]);
if(_c0){
for(var i=0;i<_c0.length;i++){
if(_c0[i] instanceof Array){
_c0[i]={name:_c0[i][0],content:null};
}else{
_c0[i]={name:_c0[i],content:null};
}
}
}
break;
case "require":
_c0=[{name:dep[1],content:null}];
break;
case "i18n._preloadLocalizations":
dojo.i18n._preloadLocalizations.apply(dojo.i18n._preloadLocalizations,dep.slice(1));
break;
}
if(dep[0]=="requireAfterIf"||dep[0]=="requireIf"){
_c1=_c0;
_c0=null;
}
return {requires:_c0,requiresAfter:_c1};
};
dojo._xdWalkReqs=function(){
var _c5=null;
var req;
for(var i=0;i<this._xdOrderedReqs.length;i++){
req=this._xdOrderedReqs[i];
if(this._xdDepMap[req]){
_c5=[req];
_c5[req]=true;
this._xdEvalReqs(_c5);
}
}
};
dojo._xdEvalReqs=function(_c8){
while(_c8.length>0){
var req=_c8[_c8.length-1];
var res=this._xdDepMap[req];
var i,_cc,_cd;
if(res){
_cc=res.requires;
if(_cc&&_cc.length>0){
for(i=0;i<_cc.length;i++){
_cd=_cc[i].name;
if(_cd&&!_c8[_cd]){
_c8.push(_cd);
_c8[_cd]=true;
this._xdEvalReqs(_c8);
}
}
}
var _ce=this._xdContents[res.contentIndex];
if(!_ce.isDefined){
var _cf=_ce.content;
_cf["resourceName"]=_ce["resourceName"];
_cf["resourcePath"]=_ce["resourcePath"];
this._xdDefList.push(_cf);
_ce.isDefined=true;
}
this._xdDepMap[req]=null;
_cc=res.requiresAfter;
if(_cc&&_cc.length>0){
for(i=0;i<_cc.length;i++){
_cd=_cc[i].name;
if(_cd&&!_c8[_cd]){
_c8.push(_cd);
_c8[_cd]=true;
this._xdEvalReqs(_c8);
}
}
}
}
_c8.pop();
}
};
dojo._xdClearInterval=function(){
clearInterval(this._xdTimer);
this._xdTimer=0;
};
dojo._xdWatchInFlight=function(){
var _d0="";
var _d1=(dojo.config.xdWaitSeconds||15)*1000;
var _d2=(this._xdStartTime+_d1)<(new Date()).getTime();
for(var _d3 in this._xdInFlight){
if(this._xdInFlight[_d3]===true){
if(_d2){
_d0+=_d3+" ";
}else{
return;
}
}
}
this._xdClearInterval();
if(_d2){
throw "Could not load cross-domain resources: "+_d0;
}
this._xdWalkReqs();
var _d4=this._xdDefList.length;
for(var i=0;i<_d4;i++){
var _d6=dojo._xdDefList[i];
if(dojo.config["debugAtAllCosts"]&&_d6["resourceName"]){
if(!this["_xdDebugQueue"]){
this._xdDebugQueue=[];
}
this._xdDebugQueue.push({resourceName:_d6.resourceName,resourcePath:_d6.resourcePath});
}else{
_d6.apply(dojo.global,dojo._scopeArgs);
}
}
for(i=0;i<this._xdContents.length;i++){
var _d7=this._xdContents[i];
if(_d7.content&&!_d7.isDefined){
_d7.content.apply(dojo.global,dojo._scopeArgs);
}
}
this._xdReset();
if(this["_xdDebugQueue"]&&this._xdDebugQueue.length>0){
this._xdDebugFileLoaded();
}else{
this._xdNotifyLoaded();
}
};
dojo._xdNotifyLoaded=function(){
this._inFlightCount=0;
if(this._initFired&&!this._loadNotifying){
this._callLoaded();
}
};
if(typeof window!="undefined"){
dojo.isBrowser=true;
dojo._name="browser";
(function(){
var d=dojo;
if(document&&document.getElementsByTagName){
var _d9=document.getElementsByTagName("script");
var _da=/dojo(\.xd)?\.js(\W|$)/i;
for(var i=0;i<_d9.length;i++){
var src=_d9[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_da);
if(m){
if(!d.config.baseUrl){
d.config.baseUrl=src.substring(0,m.index);
}
var cfg=_d9[i].getAttribute("djConfig");
if(cfg){
var _df=eval("({ "+cfg+" })");
for(var x in _df){
dojo.config[x]=_df[x];
}
}
break;
}
}
}
d.baseUrl=d.config.baseUrl;
var n=navigator;
var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);
if(dua.indexOf("Opera")>=0){
d.isOpera=tv;
}
if(dua.indexOf("AdobeAIR")>=0){
d.isAIR=1;
}
d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;
d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;
d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;
var _e5=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);
if(_e5&&!dojo.isChrome){
d.isSafari=parseFloat(dav.split("Version/")[1]);
if(!d.isSafari||parseFloat(dav.substr(_e5+7))<=419.3){
d.isSafari=2;
}
}
if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){
d.isMozilla=d.isMoz=tv;
}
if(d.isMoz){
d.isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1]||dua.split("Shiretoko/")[1])||undefined;
}
if(document.all&&!d.isOpera){
d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;
if(d.isIE>=8&&document.documentMode!=5){
d.isIE=document.documentMode;
}
}
if(dojo.isIE&&window.location.protocol==="file:"){
dojo.config.ieForceActiveXXhr=true;
}
var cm=document.compatMode;
d.isQuirks=cm=="BackCompat"||cm=="QuirksMode"||d.isIE<6;
d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();
d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
d._xhrObj=function(){
var _e7,_e8;
if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){
try{
_e7=new XMLHttpRequest();
}
catch(e){
}
}
if(!_e7){
for(var i=0;i<3;++i){
var _ea=d._XMLHTTP_PROGIDS[i];
try{
_e7=new ActiveXObject(_ea);
}
catch(e){
_e8=e;
}
if(_e7){
d._XMLHTTP_PROGIDS=[_ea];
break;
}
}
}
if(!_e7){
throw new Error("XMLHTTP not available: "+_e8);
}
return _e7;
};
d._isDocumentOk=function(_eb){
var _ec=_eb.status||0;
return (_ec>=200&&_ec<300)||_ec==304||_ec==1223||(!_ec&&(location.protocol=="file:"||location.protocol=="chrome:"));
};
var _ed=window.location+"";
var _ee=document.getElementsByTagName("base");
var _ef=(_ee&&_ee.length>0);
d._getText=function(uri,_f1){
var _f2=this._xhrObj();
if(!_ef&&dojo._Url){
uri=(new dojo._Url(_ed,uri)).toString();
}
if(d.config.cacheBust){
uri+="";
uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");
}
_f2.open("GET",uri,false);
try{
_f2.send(null);
if(!d._isDocumentOk(_f2)){
var err=Error("Unable to load "+uri+" status:"+_f2.status);
err.status=_f2.status;
err.responseText=_f2.responseText;
throw err;
}
}
catch(e){
if(_f1){
return null;
}
throw e;
}
return _f2.responseText;
};
var _w=window;
var _f5=function(_f6,fp){
var _f8=_w[_f6]||function(){
};
_w[_f6]=function(){
fp.apply(_w,arguments);
_f8.apply(_w,arguments);
};
};
d._windowUnloaders=[];
d.windowUnloaded=function(){
var mll=d._windowUnloaders;
while(mll.length){
(mll.pop())();
}
};
var _fa=0;
d.addOnWindowUnload=function(obj,_fc){
d._onto(d._windowUnloaders,obj,_fc);
if(!_fa){
_fa=1;
_f5("onunload",d.windowUnloaded);
}
};
var _fd=0;
d.addOnUnload=function(obj,_ff){
d._onto(d._unloaders,obj,_ff);
if(!_fd){
_fd=1;
_f5("onbeforeunload",dojo.unloaded);
}
};
})();
dojo._initFired=false;
dojo._loadInit=function(e){
dojo._initFired=true;
var type=e&&e.type?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(type!="domcontentloaded"&&type!="load")){
return;
}
arguments.callee.initialized=true;
if("_khtmlTimer" in dojo){
clearInterval(dojo._khtmlTimer);
delete dojo._khtmlTimer;
}
if(dojo._inFlightCount==0){
dojo._modulesLoaded();
}
};
if(!dojo.config.afterOnLoad){
if(document.addEventListener){
if(dojo.isWebKit>525||dojo.isOpera||dojo.isFF>=3||(dojo.isMoz&&dojo.config.enableMozDomContentLoaded===true)){
document.addEventListener("DOMContentLoaded",dojo._loadInit,null);
}
window.addEventListener("load",dojo._loadInit,null);
}
if(dojo.isAIR){
window.addEventListener("load",dojo._loadInit,null);
}else{
if((dojo.isWebKit<525)||dojo.isKhtml){
dojo._khtmlTimer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dojo._loadInit();
}
},10);
}
}
}
if(dojo.isIE){
if(!dojo.config.afterOnLoad){
document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");
}
try{
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML);  display:inline-block");
}
catch(e){
}
}
}
(function(){
var mp=dojo.config["modulePaths"];
if(mp){
for(var _103 in mp){
dojo.registerModulePath(_103,mp[_103]);
}
}
})();
if(dojo.config.isDebug){
dojo.require("dojo._firebug.firebug");
}
if(dojo.config.debugAtAllCosts){
dojo.config.useXDomain=true;
dojo.require("dojo._base._loader.loader_xd");
dojo.require("dojo._base._loader.loader_debug");
}
if(!dojo._hasResource["dojo._base.lang"]){
dojo._hasResource["dojo._base.lang"]=true;
dojo.provide("dojo._base.lang");
dojo.isString=function(it){
return !!arguments.length&&it!=null&&(typeof it=="string"||it instanceof String);
};
dojo.isArray=function(it){
return it&&(it instanceof Array||typeof it=="array");
};
dojo.isFunction=(function(){
var _106=function(it){
var t=typeof it;
return it&&(t=="function"||it instanceof Function);
};
return dojo.isSafari?function(it){
if(typeof it=="function"&&it=="[object NodeList]"){
return false;
}
return _106(it);
}:_106;
})();
dojo.isObject=function(it){
return it!==undefined&&(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it));
};
dojo.isArrayLike=function(it){
var d=dojo;
return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));
};
dojo.isAlien=function(it){
return it&&!dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.extend=function(_10e,_10f){
for(var i=1,l=arguments.length;i<l;i++){
dojo._mixin(_10e.prototype,arguments[i]);
}
return _10e;
};
dojo._hitchArgs=function(_112,_113){
var pre=dojo._toArray(arguments,2);
var _115=dojo.isString(_113);
return function(){
var args=dojo._toArray(arguments);
var f=_115?(_112||dojo.global)[_113]:_113;
return f&&f.apply(_112||this,pre.concat(args));
};
};
dojo.hitch=function(_118,_119){
if(arguments.length>2){
return dojo._hitchArgs.apply(dojo,arguments);
}
if(!_119){
_119=_118;
_118=null;
}
if(dojo.isString(_119)){
_118=_118||dojo.global;
if(!_118[_119]){
throw (["dojo.hitch: scope[\"",_119,"\"] is null (scope=\"",_118,"\")"].join(""));
}
return function(){
return _118[_119].apply(_118,arguments||[]);
};
}
return !_118?_119:function(){
return _119.apply(_118,arguments||[]);
};
};
dojo.delegate=dojo._delegate=(function(){
function TMP(){
};
return function(obj,_11c){
TMP.prototype=obj;
var tmp=new TMP();
if(_11c){
dojo._mixin(tmp,_11c);
}
return tmp;
};
})();
(function(){
var _11e=function(obj,_120,_121){
return (_121||[]).concat(Array.prototype.slice.call(obj,_120||0));
};
var slow=function(obj,_124,_125){
var arr=_125||[];
for(var x=_124||0;x<obj.length;x++){
arr.push(obj[x]);
}
return arr;
};
dojo._toArray=dojo.isIE?function(obj){
return ((obj.item)?slow:_11e).apply(this,arguments);
}:_11e;
})();
dojo.partial=function(_129){
var arr=[null];
return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));
};
dojo.clone=function(o){
if(!o){
return o;
}
if(dojo.isArray(o)){
var r=[];
for(var i=0;i<o.length;++i){
r.push(dojo.clone(o[i]));
}
return r;
}
if(!dojo.isObject(o)){
return o;
}
if(o.nodeType&&o.cloneNode){
return o.cloneNode(true);
}
if(o instanceof Date){
return new Date(o.getTime());
}
r=new o.constructor();
for(i in o){
if(!(i in r)||r[i]!=o[i]){
r[i]=dojo.clone(o[i]);
}
}
return r;
};
dojo.trim=String.prototype.trim?function(str){
return str.trim();
}:function(str){
return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
};
}
if(!dojo._hasResource["dojo._base.declare"]){
dojo._hasResource["dojo._base.declare"]=true;
dojo.provide("dojo._base.declare");
dojo.declare=function(_130,_131,_132){
var dd=arguments.callee,_134;
if(dojo.isArray(_131)){
_134=_131;
_131=_134.shift();
}
if(_134){
dojo.forEach(_134,function(m,i){
if(!m){
throw (_130+": mixin #"+i+" is null");
}
_131=dd._delegate(_131,m);
});
}
var ctor=dd._delegate(_131);
_132=_132||{};
ctor.extend(_132);
dojo.extend(ctor,{declaredClass:_130,_constructor:_132.constructor});
ctor.prototype.constructor=ctor;
return dojo.setObject(_130,ctor);
};
dojo.mixin(dojo.declare,{_delegate:function(base,_139){
var bp=(base||0).prototype,mp=(_139||0).prototype,dd=dojo.declare;
var ctor=dd._makeCtor();
dojo.mixin(ctor,{superclass:bp,mixin:mp,extend:dd._extend});
if(base){
ctor.prototype=dojo._delegate(bp);
}
dojo.extend(ctor,dd._core,mp||0,{_constructor:null,preamble:null});
ctor.prototype.constructor=ctor;
ctor.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;
return ctor;
},_extend:function(_13e){
var i,fn;
for(i in _13e){
if(dojo.isFunction(fn=_13e[i])&&!0[i]){
fn.nom=i;
fn.ctor=this;
}
}
dojo.extend(this,_13e);
},_makeCtor:function(){
return function(){
this._construct(arguments);
};
},_core:{_construct:function(args){
var c=args.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=args,ii,fn;
if(a[0]){
if(((fn=a[0].preamble))){
a=fn.apply(this,a)||a;
}
}
if((fn=c.prototype.preamble)){
a=fn.apply(this,a)||a;
}
if(ct&&ct.apply){
ct.apply(this,a);
}
if(mct&&mct.apply){
mct.apply(this,a);
}
if((ii=c.prototype._constructor)){
ii.apply(this,args);
}
if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){
ct.apply(this,args);
}
},_findMixin:function(_14a){
var c=this.constructor,p,m;
while(c){
p=c.superclass;
m=c.mixin;
if(m==_14a||(m instanceof _14a.constructor)){
return p;
}
if(m&&m._findMixin&&(m=m._findMixin(_14a))){
return m;
}
c=p&&p.constructor;
}
},_findMethod:function(name,_14f,_150,has){
var p=_150,c,m,f;
do{
c=p.constructor;
m=c.mixin;
if(m&&(m=this._findMethod(name,_14f,m,has))){
return m;
}
if((f=p[name])&&(has==(f==_14f))){
return p;
}
p=c.superclass;
}while(p);
return !has&&(p=this._findMixin(_150))&&this._findMethod(name,_14f,p,has);
},inherited:function(name,args,_158){
var a=arguments;
if(!dojo.isString(a[0])){
_158=args;
args=name;
name=args.callee.nom;
}
a=_158||args;
var c=args.callee,p=this.constructor.prototype,fn,mp;
if(this[name]!=c||p[name]==c){
mp=(c.ctor||0).superclass||this._findMethod(name,c,p,true);
if(!mp){
throw (this.declaredClass+": inherited method \""+name+"\" mismatch");
}
p=this._findMethod(name,c,mp,false);
}
fn=p&&p[name];
if(!fn){
throw (mp.declaredClass+": inherited method \""+name+"\" not found");
}
return fn.apply(this,a);
}}});
}
if(!dojo._hasResource["dojo._base.connect"]){
dojo._hasResource["dojo._base.connect"]=true;
dojo.provide("dojo._base.connect");
dojo._listener={getDispatcher:function(){
return function(){
var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;
var r=t&&t.apply(this,arguments);
var lls;
lls=[].concat(ls);
for(var i in lls){
if(!(i in ap)){
lls[i].apply(this,arguments);
}
}
return r;
};
},add:function(_165,_166,_167){
_165=_165||dojo.global;
var f=_165[_166];
if(!f||!f._listeners){
var d=dojo._listener.getDispatcher();
d.target=f;
d._listeners=[];
f=_165[_166]=d;
}
return f._listeners.push(_167);
},remove:function(_16a,_16b,_16c){
var f=(_16a||dojo.global)[_16b];
if(f&&f._listeners&&_16c--){
delete f._listeners[_16c];
}
}};
dojo.connect=function(obj,_16f,_170,_171,_172){
var a=arguments,args=[],i=0;
args.push(dojo.isString(a[0])?null:a[i++],a[i++]);
var a1=a[i+1];
args.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);
for(var l=a.length;i<l;i++){
args.push(a[i]);
}
return dojo._connect.apply(this,args);
};
dojo._connect=function(obj,_178,_179,_17a){
var l=dojo._listener,h=l.add(obj,_178,dojo.hitch(_179,_17a));
return [obj,_178,h,l];
};
dojo.disconnect=function(_17d){
if(_17d&&_17d[0]!==undefined){
dojo._disconnect.apply(this,_17d);
delete _17d[0];
}
};
dojo._disconnect=function(obj,_17f,_180,_181){
_181.remove(obj,_17f,_180);
};
dojo._topics={};
dojo.subscribe=function(_182,_183,_184){
return [_182,dojo._listener.add(dojo._topics,_182,dojo.hitch(_183,_184))];
};
dojo.unsubscribe=function(_185){
if(_185){
dojo._listener.remove(dojo._topics,_185[0],_185[1]);
}
};
dojo.publish=function(_186,args){
var f=dojo._topics[_186];
if(f){
f.apply(this,args||[]);
}
};
dojo.connectPublisher=function(_189,obj,_18b){
var pf=function(){
dojo.publish(_189,arguments);
};
return (_18b)?dojo.connect(obj,_18b,pf):dojo.connect(obj,pf);
};
}
if(!dojo._hasResource["dojo._base.Deferred"]){
dojo._hasResource["dojo._base.Deferred"]=true;
dojo.provide("dojo._base.Deferred");
dojo.Deferred=function(_18d){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_18d;
this.silentlyCancelled=false;
};
dojo.extend(dojo.Deferred,{_nextId:(function(){
var n=1;
return function(){
return n++;
};
})(),cancel:function(){
var err;
if(this.fired==-1){
if(this.canceller){
err=this.canceller(this);
}else{
this.silentlyCancelled=true;
}
if(this.fired==-1){
if(!(err instanceof Error)){
var res=err;
var msg="Deferred Cancelled";
if(err&&err.toString){
msg+=": "+err.toString();
}
err=new Error(msg);
err.dojoType="cancel";
err.cancelResult=res;
}
this.errback(err);
}
}else{
if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){
this.results[0].cancel();
}
}
},_resback:function(res){
this.fired=((res instanceof Error)?1:0);
this.results[this.fired]=res;
this._fire();
},_check:function(){
if(this.fired!=-1){
if(!this.silentlyCancelled){
throw new Error("already called!");
}
this.silentlyCancelled=false;
return;
}
},callback:function(res){
this._check();
this._resback(res);
},errback:function(res){
this._check();
if(!(res instanceof Error)){
res=new Error(res);
}
this._resback(res);
},addBoth:function(cb,cbfn){
var _197=dojo.hitch.apply(dojo,arguments);
return this.addCallbacks(_197,_197);
},addCallback:function(cb,cbfn){
return this.addCallbacks(dojo.hitch.apply(dojo,arguments));
},addErrback:function(cb,cbfn){
return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));
},addCallbacks:function(cb,eb){
this.chain.push([cb,eb]);
if(this.fired>=0){
this._fire();
}
return this;
},_fire:function(){
var _19e=this.chain;
var _19f=this.fired;
var res=this.results[_19f];
var self=this;
var cb=null;
while((_19e.length>0)&&(this.paused==0)){
var f=_19e.shift()[_19f];
if(!f){
continue;
}
var func=function(){
var ret=f(res);
if(typeof ret!="undefined"){
res=ret;
}
_19f=((res instanceof Error)?1:0);
if(res instanceof dojo.Deferred){
cb=function(res){
self._resback(res);
self.paused--;
if((self.paused==0)&&(self.fired>=0)){
self._fire();
}
};
this.paused++;
}
};
if(dojo.config.debugAtAllCosts){
func.call(this);
}else{
try{
func.call(this);
}
catch(err){
_19f=1;
res=err;
}
}
}
this.fired=_19f;
this.results[_19f]=res;
if((cb)&&(this.paused)){
res.addBoth(cb);
}
}});
}
if(!dojo._hasResource["dojo._base.json"]){
dojo._hasResource["dojo._base.json"]=true;
dojo.provide("dojo._base.json");
dojo.fromJson=function(json){
return eval("("+json+")");
};
dojo._escapeString=function(str){
return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
};
dojo.toJsonIndentStr="\t";
dojo.toJson=function(it,_1aa,_1ab){
if(it===undefined){
return "undefined";
}
var _1ac=typeof it;
if(_1ac=="number"||_1ac=="boolean"){
return it+"";
}
if(it===null){
return "null";
}
if(dojo.isString(it)){
return dojo._escapeString(it);
}
var _1ad=arguments.callee;
var _1ae;
_1ab=_1ab||"";
var _1af=_1aa?_1ab+dojo.toJsonIndentStr:"";
var tf=it.__json__||it.json;
if(dojo.isFunction(tf)){
_1ae=tf.call(it);
if(it!==_1ae){
return _1ad(_1ae,_1aa,_1af);
}
}
if(it.nodeType&&it.cloneNode){
throw new Error("Can't serialize DOM nodes");
}
var sep=_1aa?" ":"";
var _1b2=_1aa?"\n":"";
if(dojo.isArray(it)){
var res=dojo.map(it,function(obj){
var val=_1ad(obj,_1aa,_1af);
if(typeof val!="string"){
val="undefined";
}
return _1b2+_1af+val;
});
return "["+res.join(","+sep)+_1b2+_1ab+"]";
}
if(_1ac=="function"){
return null;
}
var _1b6=[],key;
for(key in it){
var _1b8,val;
if(typeof key=="number"){
_1b8="\""+key+"\"";
}else{
if(typeof key=="string"){
_1b8=dojo._escapeString(key);
}else{
continue;
}
}
val=_1ad(it[key],_1aa,_1af);
if(typeof val!="string"){
continue;
}
_1b6.push(_1b2+_1af+_1b8+":"+sep+val);
}
return "{"+_1b6.join(","+sep)+_1b2+_1ab+"}";
};
}
if(!dojo._hasResource["dojo._base.array"]){
dojo._hasResource["dojo._base.array"]=true;
dojo.provide("dojo._base.array");
(function(){
var _1ba=function(arr,obj,cb){
return [dojo.isString(arr)?arr.split(""):arr,obj||dojo.global,dojo.isString(cb)?new Function("item","index","array",cb):cb];
};
dojo.mixin(dojo,{indexOf:function(_1be,_1bf,_1c0,_1c1){
var step=1,end=_1be.length||0,i=0;
if(_1c1){
i=end-1;
step=end=-1;
}
if(_1c0!=undefined){
i=_1c0;
}
if((_1c1&&i>end)||i<end){
for(;i!=end;i+=step){
if(_1be[i]==_1bf){
return i;
}
}
}
return -1;
},lastIndexOf:function(_1c4,_1c5,_1c6){
return dojo.indexOf(_1c4,_1c5,_1c6,true);
},forEach:function(arr,_1c8,_1c9){
if(!arr||!arr.length){
return;
}
var _p=_1ba(arr,_1c9,_1c8);
arr=_p[0];
for(var i=0,l=arr.length;i<l;++i){
_p[2].call(_p[1],arr[i],i,arr);
}
},_everyOrSome:function(_1cd,arr,_1cf,_1d0){
var _p=_1ba(arr,_1d0,_1cf);
arr=_p[0];
for(var i=0,l=arr.length;i<l;++i){
var _1d4=!!_p[2].call(_p[1],arr[i],i,arr);
if(_1cd^_1d4){
return _1d4;
}
}
return _1cd;
},every:function(arr,_1d6,_1d7){
return this._everyOrSome(true,arr,_1d6,_1d7);
},some:function(arr,_1d9,_1da){
return this._everyOrSome(false,arr,_1d9,_1da);
},map:function(arr,_1dc,_1dd){
var _p=_1ba(arr,_1dd,_1dc);
arr=_p[0];
var _1df=(arguments[3]?(new arguments[3]()):[]);
for(var i=0,l=arr.length;i<l;++i){
_1df.push(_p[2].call(_p[1],arr[i],i,arr));
}
return _1df;
},filter:function(arr,_1e3,_1e4){
var _p=_1ba(arr,_1e4,_1e3);
arr=_p[0];
var _1e6=[];
for(var i=0,l=arr.length;i<l;++i){
if(_p[2].call(_p[1],arr[i],i,arr)){
_1e6.push(arr[i]);
}
}
return _1e6;
}});
})();
}
if(!dojo._hasResource["dojo._base.Color"]){
dojo._hasResource["dojo._base.Color"]=true;
dojo.provide("dojo._base.Color");
(function(){
var d=dojo;
dojo.Color=function(_1ea){
if(_1ea){
this.setColor(_1ea);
}
};
dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]};
dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){
var t=this;
t.r=r;
t.g=g;
t.b=b;
t.a=a;
},setColor:function(_1f0){
if(d.isString(_1f0)){
d.colorFromString(_1f0,this);
}else{
if(d.isArray(_1f0)){
d.colorFromArray(_1f0,this);
}else{
this._set(_1f0.r,_1f0.g,_1f0.b,_1f0.a);
if(!(_1f0 instanceof d.Color)){
this.sanitize();
}
}
}
return this;
},sanitize:function(){
return this;
},toRgb:function(){
var t=this;
return [t.r,t.g,t.b];
},toRgba:function(){
var t=this;
return [t.r,t.g,t.b,t.a];
},toHex:function(){
var arr=d.map(["r","g","b"],function(x){
var s=this[x].toString(16);
return s.length<2?"0"+s:s;
},this);
return "#"+arr.join("");
},toCss:function(_1f6){
var t=this,rgb=t.r+", "+t.g+", "+t.b;
return (_1f6?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";
},toString:function(){
return this.toCss(true);
}});
dojo.blendColors=function(_1f9,end,_1fb,obj){
var t=obj||new d.Color();
d.forEach(["r","g","b","a"],function(x){
t[x]=_1f9[x]+(end[x]-_1f9[x])*_1fb;
if(x!="a"){
t[x]=Math.round(t[x]);
}
});
return t.sanitize();
};
dojo.colorFromRgb=function(_1ff,obj){
var m=_1ff.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);
};
dojo.colorFromHex=function(_202,obj){
var t=obj||new d.Color(),bits=(_202.length==4)?4:8,mask=(1<<bits)-1;
_202=Number("0x"+_202.substr(1));
if(isNaN(_202)){
return null;
}
d.forEach(["b","g","r"],function(x){
var c=_202&mask;
_202>>=bits;
t[x]=bits==4?17*c:c;
});
t.a=1;
return t;
};
dojo.colorFromArray=function(a,obj){
var t=obj||new d.Color();
t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));
if(isNaN(t.a)){
t.a=1;
}
return t.sanitize();
};
dojo.colorFromString=function(str,obj){
var a=d.Color.named[str];
return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);
};
})();
}
if(!dojo._hasResource["dojo._base"]){
dojo._hasResource["dojo._base"]=true;
dojo.provide("dojo._base");
}
if(!dojo._hasResource["dojo._base.window"]){
dojo._hasResource["dojo._base.window"]=true;
dojo.provide("dojo._base.window");
dojo.doc=window["document"]||null;
dojo.body=function(){
return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];
};
dojo.setContext=function(_20f,_210){
dojo.global=_20f;
dojo.doc=_210;
};
dojo.withGlobal=function(_211,_212,_213,_214){
var _215=dojo.global;
try{
dojo.global=_211;
return dojo.withDoc.call(null,_211.document,_212,_213,_214);
}
finally{
dojo.global=_215;
}
};
dojo.withDoc=function(_216,_217,_218,_219){
var _21a=dojo.doc,_21b=dojo._bodyLtr;
try{
dojo.doc=_216;
delete dojo._bodyLtr;
if(_218&&dojo.isString(_217)){
_217=_218[_217];
}
return _217.apply(_218,_219||[]);
}
finally{
dojo.doc=_21a;
if(_21b!==undefined){
dojo._bodyLtr=_21b;
}
}
};
}
if(!dojo._hasResource["dojo._base.event"]){
dojo._hasResource["dojo._base.event"]=true;
dojo.provide("dojo._base.event");
(function(){
var del=(dojo._event_listener={add:function(node,name,fp){
if(!node){
return;
}
name=del._normalizeEventName(name);
fp=del._fixCallback(name,fp);
var _220=name;
if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){
var ofp=fp;
name=(name=="mouseenter")?"mouseover":"mouseout";
fp=function(e){
if(dojo.isFF<=2){
try{
e.relatedTarget.tagName;
}
catch(e2){
return;
}
}
if(!dojo.isDescendant(e.relatedTarget,node)){
return ofp.call(this,e);
}
};
}
node.addEventListener(name,fp,false);
return fp;
},remove:function(node,_224,_225){
if(node){
_224=del._normalizeEventName(_224);
if(!dojo.isIE&&(_224=="mouseenter"||_224=="mouseleave")){
_224=(_224=="mouseenter")?"mouseover":"mouseout";
}
node.removeEventListener(_224,_225,false);
}
},_normalizeEventName:function(name){
return name.slice(0,2)=="on"?name.slice(2):name;
},_fixCallback:function(name,fp){
return name!="keypress"?fp:function(e){
return fp.call(this,del._fixEvent(e,this));
};
},_fixEvent:function(evt,_22b){
switch(evt.type){
case "keypress":
del._setKeyChar(evt);
break;
}
return evt;
},_setKeyChar:function(evt){
evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";
evt.charOrCode=evt.keyChar||evt.keyCode;
},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});
dojo.fixEvent=function(evt,_22e){
return del._fixEvent(evt,_22e);
};
dojo.stopEvent=function(evt){
evt.preventDefault();
evt.stopPropagation();
};
var _230=dojo._listener;
dojo._connect=function(obj,_232,_233,_234,_235){
var _236=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);
var lid=_236?(_235?2:1):0,l=[dojo._listener,del,_230][lid];
var h=l.add(obj,_232,dojo.hitch(_233,_234));
return [obj,_232,h,lid];
};
dojo._disconnect=function(obj,_23b,_23c,_23d){
([dojo._listener,del,_230][_23d]).remove(obj,_23b,_23c);
};
dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145};
if(dojo.isIE){
var _23e=function(e,code){
try{
return (e.keyCode=code);
}
catch(e){
return 0;
}
};
var iel=dojo._listener;
var _242=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");
if(!dojo.config._allow_leaks){
_230=iel=dojo._ie_listener={handlers:[],add:function(_243,_244,_245){
_243=_243||dojo.global;
var f=_243[_244];
if(!f||!f[_242]){
var d=dojo._getIeDispatcher();
d.target=f&&(ieh.push(f)-1);
d[_242]=[];
f=_243[_244]=d;
}
return f[_242].push(ieh.push(_245)-1);
},remove:function(_249,_24a,_24b){
var f=(_249||dojo.global)[_24a],l=f&&f[_242];
if(f&&l&&_24b--){
delete ieh[l[_24b]];
delete l[_24b];
}
}};
var ieh=iel.handlers;
}
dojo.mixin(del,{add:function(node,_24f,fp){
if(!node){
return;
}
_24f=del._normalizeEventName(_24f);
if(_24f=="onkeypress"){
var kd=node.onkeydown;
if(!kd||!kd[_242]||!kd._stealthKeydownHandle){
var h=del.add(node,"onkeydown",del._stealthKeyDown);
kd=node.onkeydown;
kd._stealthKeydownHandle=h;
kd._stealthKeydownRefs=1;
}else{
kd._stealthKeydownRefs++;
}
}
return iel.add(node,_24f,del._fixCallback(fp));
},remove:function(node,_254,_255){
_254=del._normalizeEventName(_254);
iel.remove(node,_254,_255);
if(_254=="onkeypress"){
var kd=node.onkeydown;
if(--kd._stealthKeydownRefs<=0){
iel.remove(node,"onkeydown",kd._stealthKeydownHandle);
delete kd._stealthKeydownHandle;
}
}
},_normalizeEventName:function(_257){
return _257.slice(0,2)!="on"?"on"+_257:_257;
},_nop:function(){
},_fixEvent:function(evt,_259){
if(!evt){
var w=_259&&(_259.ownerDocument||_259.document||_259).parentWindow||window;
evt=w.event;
}
if(!evt){
return (evt);
}
evt.target=evt.srcElement;
evt.currentTarget=(_259||evt.srcElement);
evt.layerX=evt.offsetX;
evt.layerY=evt.offsetY;
var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;
var _25d=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
var _25e=dojo._getIeDocumentElementOffset();
evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_25d.scrollLeft||0)-_25e.x;
evt.pageY=evt.clientY+(_25d.scrollTop||0)-_25e.y;
if(evt.type=="mouseover"){
evt.relatedTarget=evt.fromElement;
}
if(evt.type=="mouseout"){
evt.relatedTarget=evt.toElement;
}
evt.stopPropagation=del._stopPropagation;
evt.preventDefault=del._preventDefault;
return del._fixKeys(evt);
},_fixKeys:function(evt){
switch(evt.type){
case "keypress":
var c=("charCode" in evt?evt.charCode:evt.keyCode);
if(c==10){
c=0;
evt.keyCode=13;
}else{
if(c==13||c==27){
c=0;
}else{
if(c==3){
c=99;
}
}
}
evt.charCode=c;
del._setKeyChar(evt);
break;
}
return evt;
},_stealthKeyDown:function(evt){
var kp=evt.currentTarget.onkeypress;
if(!kp||!kp[_242]){
return;
}
var k=evt.keyCode;
var _264=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
if(_264||evt.ctrlKey){
var c=_264?0:k;
if(evt.ctrlKey){
if(k==3||k==13){
return;
}else{
if(c>95&&c<106){
c-=48;
}else{
if((!evt.shiftKey)&&(c>=65&&c<=90)){
c+=32;
}else{
c=del._punctMap[c]||c;
}
}
}
}
var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
kp.call(evt.currentTarget,faux);
evt.cancelBubble=faux.cancelBubble;
evt.returnValue=faux.returnValue;
_23e(evt,faux.keyCode);
}
},_stopPropagation:function(){
this.cancelBubble=true;
},_preventDefault:function(){
this.bubbledKeyCode=this.keyCode;
if(this.ctrlKey){
_23e(this,0);
}
this.returnValue=false;
}});
dojo.stopEvent=function(evt){
evt=evt||window.event;
del._stopPropagation.call(evt);
del._preventDefault.call(evt);
};
}
del._synthesizeEvent=function(evt,_269){
var faux=dojo.mixin({},evt,_269);
del._setKeyChar(faux);
faux.preventDefault=function(){
evt.preventDefault();
};
faux.stopPropagation=function(){
evt.stopPropagation();
};
return faux;
};
if(dojo.isOpera){
dojo.mixin(del,{_fixEvent:function(evt,_26c){
switch(evt.type){
case "keypress":
var c=evt.which;
if(c==3){
c=99;
}
c=c<41&&!evt.shiftKey?0:c;
if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){
c+=32;
}
return del._synthesizeEvent(evt,{charCode:c});
}
return evt;
}});
}
if(dojo.isWebKit){
del._add=del.add;
del._remove=del.remove;
dojo.mixin(del,{add:function(node,_26f,fp){
if(!node){
return;
}
var _271=del._add(node,_26f,fp);
if(del._normalizeEventName(_26f)=="keypress"){
_271._stealthKeyDownHandle=del._add(node,"keydown",function(evt){
var k=evt.keyCode;
var _274=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);
if(_274||evt.ctrlKey){
var c=_274?0:k;
if(evt.ctrlKey){
if(k==3||k==13){
return;
}else{
if(c>95&&c<106){
c-=48;
}else{
if(!evt.shiftKey&&c>=65&&c<=90){
c+=32;
}else{
c=del._punctMap[c]||c;
}
}
}
}
var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});
fp.call(evt.currentTarget,faux);
}
});
}
return _271;
},remove:function(node,_278,_279){
if(node){
if(_279._stealthKeyDownHandle){
del._remove(node,"keydown",_279._stealthKeyDownHandle);
}
del._remove(node,_278,_279);
}
},_fixEvent:function(evt,_27b){
switch(evt.type){
case "keypress":
if(evt.faux){
return evt;
}
var c=evt.charCode;
c=c>=32?c:0;
return del._synthesizeEvent(evt,{charCode:c,faux:true});
}
return evt;
}});
}
})();
if(dojo.isIE){
dojo._ieDispatcher=function(args,_27e){
var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];
var r=t&&t.apply(_27e,args);
var lls=[].concat(ls);
for(var i in lls){
var f=h[lls[i]];
if(!(i in ap)&&f){
f.apply(_27e,args);
}
}
return r;
};
dojo._getIeDispatcher=function(){
return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");
};
dojo._event_listener._fixCallback=function(fp){
var f=dojo._event_listener._fixEvent;
return function(e){
return fp.call(this,f(e,this));
};
};
}
}
if(!dojo._hasResource["dojo._base.html"]){
dojo._hasResource["dojo._base.html"]=true;
dojo.provide("dojo._base.html");
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
if(dojo.isIE||dojo.isOpera){
dojo.byId=function(id,doc){
if(dojo.isString(id)){
var _d=doc||dojo.doc;
var te=_d.getElementById(id);
if(te&&(te.attributes.id.value==id||te.id==id)){
return te;
}else{
var eles=_d.all[id];
if(!eles||eles.nodeName){
eles=[eles];
}
var i=0;
while((te=eles[i++])){
if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){
return te;
}
}
}
}else{
return id;
}
};
}else{
dojo.byId=function(id,doc){
return dojo.isString(id)?(doc||dojo.doc).getElementById(id):id;
};
}
(function(){
var d=dojo;
var _294=null;
d.addOnWindowUnload(function(){
_294=null;
});
dojo._destroyElement=dojo.destroy=function(node){
node=d.byId(node);
try{
if(!_294||_294.ownerDocument!=node.ownerDocument){
_294=node.ownerDocument.createElement("div");
}
_294.appendChild(node.parentNode?node.parentNode.removeChild(node):node);
_294.innerHTML="";
}
catch(e){
}
};
dojo.isDescendant=function(node,_297){
try{
node=d.byId(node);
_297=d.byId(_297);
while(node){
if(node===_297){
return true;
}
node=node.parentNode;
}
}
catch(e){
}
return false;
};
dojo.setSelectable=function(node,_299){
node=d.byId(node);
if(d.isMozilla){
node.style.MozUserSelect=_299?"":"none";
}else{
if(d.isKhtml||d.isWebKit){
node.style.KhtmlUserSelect=_299?"auto":"none";
}else{
if(d.isIE){
var v=(node.unselectable=_299?"":"on");
d.query("*",node).forEach("item.unselectable = '"+v+"'");
}
}
}
};
var _29b=function(node,ref){
var _29e=ref.parentNode;
if(_29e){
_29e.insertBefore(node,ref);
}
};
var _29f=function(node,ref){
var _2a2=ref.parentNode;
if(_2a2){
if(_2a2.lastChild==ref){
_2a2.appendChild(node);
}else{
_2a2.insertBefore(node,ref.nextSibling);
}
}
};
dojo.place=function(node,_2a4,_2a5){
_2a4=d.byId(_2a4);
if(d.isString(node)){
node=node.charAt(0)=="<"?d._toDom(node,_2a4.ownerDocument):d.byId(node);
}
if(typeof _2a5=="number"){
var cn=_2a4.childNodes;
if(!cn.length||cn.length<=_2a5){
_2a4.appendChild(node);
}else{
_29b(node,cn[_2a5<0?0:_2a5]);
}
}else{
switch(_2a5){
case "before":
_29b(node,_2a4);
break;
case "after":
_29f(node,_2a4);
break;
case "replace":
_2a4.parentNode.replaceChild(node,_2a4);
break;
case "only":
d.empty(_2a4);
_2a4.appendChild(node);
break;
case "first":
if(_2a4.firstChild){
_29b(node,_2a4.firstChild);
break;
}
default:
_2a4.appendChild(node);
}
}
return node;
};
dojo.boxModel="content-box";
if(d.isIE){
var _dcm=document.compatMode;
d.boxModel=_dcm=="BackCompat"||_dcm=="QuirksMode"||d.isIE<6?"border-box":"content-box";
}
var gcs;
if(d.isWebKit){
gcs=function(node){
var s;
if(node instanceof HTMLElement){
var dv=node.ownerDocument.defaultView;
s=dv.getComputedStyle(node,null);
if(!s&&node.style){
node.style.display="";
s=dv.getComputedStyle(node,null);
}
}
return s||{};
};
}else{
if(d.isIE){
gcs=function(node){
return node.nodeType==1?node.currentStyle:{};
};
}else{
gcs=function(node){
return node instanceof HTMLElement?node.ownerDocument.defaultView.getComputedStyle(node,null):{};
};
}
}
dojo.getComputedStyle=gcs;
if(!d.isIE){
d._toPixelValue=function(_2ae,_2af){
return parseFloat(_2af)||0;
};
}else{
d._toPixelValue=function(_2b0,_2b1){
if(!_2b1){
return 0;
}
if(_2b1=="medium"){
return 4;
}
if(_2b1.slice&&_2b1.slice(-2)=="px"){
return parseFloat(_2b1);
}
with(_2b0){
var _2b2=style.left;
var _2b3=runtimeStyle.left;
runtimeStyle.left=currentStyle.left;
try{
style.left=_2b1;
_2b1=style.pixelLeft;
}
catch(e){
_2b1=0;
}
style.left=_2b2;
runtimeStyle.left=_2b3;
}
return _2b1;
};
}
var px=d._toPixelValue;
var astr="DXImageTransform.Microsoft.Alpha";
var af=function(n,f){
try{
return n.filters.item(astr);
}
catch(e){
return f?{}:null;
}
};
dojo._getOpacity=d.isIE?function(node){
try{
return af(node).Opacity/100;
}
catch(e){
return 1;
}
}:function(node){
return gcs(node).opacity;
};
dojo._setOpacity=d.isIE?function(node,_2bc){
var ov=_2bc*100;
node.style.zoom=1;
af(node,1).Enabled=!(_2bc==1);
if(!af(node)){
node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";
}else{
af(node,1).Opacity=ov;
}
if(node.nodeName.toLowerCase()=="tr"){
d.query("> td",node).forEach(function(i){
d._setOpacity(i,_2bc);
});
}
return _2bc;
}:function(node,_2c0){
return node.style.opacity=_2c0;
};
var _2c1={left:true,top:true};
var _2c2=/margin|padding|width|height|max|min|offset/;
var _2c3=function(node,type,_2c6){
type=type.toLowerCase();
if(d.isIE){
if(_2c6=="auto"){
if(type=="height"){
return node.offsetHeight;
}
if(type=="width"){
return node.offsetWidth;
}
}
if(type=="fontweight"){
switch(_2c6){
case 700:
return "bold";
case 400:
default:
return "normal";
}
}
}
if(!(type in _2c1)){
_2c1[type]=_2c2.test(type);
}
return _2c1[type]?px(node,_2c6):_2c6;
};
var _2c7=d.isIE?"styleFloat":"cssFloat",_2c8={"cssFloat":_2c7,"styleFloat":_2c7,"float":_2c7};
dojo.style=function(node,_2ca,_2cb){
var n=d.byId(node),args=arguments.length,op=(_2ca=="opacity");
_2ca=_2c8[_2ca]||_2ca;
if(args==3){
return op?d._setOpacity(n,_2cb):n.style[_2ca]=_2cb;
}
if(args==2&&op){
return d._getOpacity(n);
}
var s=gcs(n);
if(args==2&&!d.isString(_2ca)){
for(var x in _2ca){
d.style(node,x,_2ca[x]);
}
return s;
}
return (args==1)?s:_2c3(n,_2ca,s[_2ca]||n.style[_2ca]);
};
dojo._getPadExtents=function(n,_2d2){
var s=_2d2||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);
return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};
};
dojo._getBorderExtents=function(n,_2d7){
var ne="none",s=_2d7||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);
return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};
};
dojo._getPadBorderExtents=function(n,_2dd){
var s=_2dd||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);
return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};
};
dojo._getMarginExtents=function(n,_2e2){
var s=_2e2||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);
if(d.isWebKit&&(s.position!="absolute")){
r=l;
}
return {l:l,t:t,w:l+r,h:t+b};
};
dojo._getMarginBox=function(node,_2e9){
var s=_2e9||gcs(node),me=d._getMarginExtents(node,s);
var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;
if(d.isMoz){
var sl=parseFloat(s.left),st=parseFloat(s.top);
if(!isNaN(sl)&&!isNaN(st)){
l=sl,t=st;
}else{
if(p&&p.style){
var pcs=gcs(p);
if(pcs.overflow!="visible"){
var be=d._getBorderExtents(p,pcs);
l+=be.l,t+=be.t;
}
}
}
}else{
if(d.isOpera||(d.isIE>7&&!d.isQuirks)){
if(p){
be=d._getBorderExtents(p);
l-=be.l;
t-=be.t;
}
}
}
return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};
};
dojo._getContentBox=function(node,_2f4){
var s=_2f4||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;
if(!w){
w=node.offsetWidth,h=node.offsetHeight;
}else{
h=node.clientHeight,be.w=be.h=0;
}
if(d.isOpera){
pe.l+=be.l;
pe.t+=be.t;
}
return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};
};
dojo._getBorderBox=function(node,_2fb){
var s=_2fb||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);
return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};
};
dojo._setBox=function(node,l,t,w,h,u){
u=u||"px";
var s=node.style;
if(!isNaN(l)){
s.left=l+u;
}
if(!isNaN(t)){
s.top=t+u;
}
if(w>=0){
s.width=w+u;
}
if(h>=0){
s.height=h+u;
}
};
dojo._isButtonTag=function(node){
return node.tagName=="BUTTON"||node.tagName=="INPUT"&&node.getAttribute("type").toUpperCase()=="BUTTON";
};
dojo._usesBorderBox=function(node){
var n=node.tagName;
return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node);
};
dojo._setContentSize=function(node,_30a,_30b,_30c){
if(d._usesBorderBox(node)){
var pb=d._getPadBorderExtents(node,_30c);
if(_30a>=0){
_30a+=pb.w;
}
if(_30b>=0){
_30b+=pb.h;
}
}
d._setBox(node,NaN,NaN,_30a,_30b);
};
dojo._setMarginBox=function(node,_30f,_310,_311,_312,_313){
var s=_313||gcs(node),bb=d._usesBorderBox(node),pb=bb?_317:d._getPadBorderExtents(node,s);
if(d.isWebKit){
if(d._isButtonTag(node)){
var ns=node.style;
if(_311>=0&&!ns.width){
ns.width="4px";
}
if(_312>=0&&!ns.height){
ns.height="4px";
}
}
}
var mb=d._getMarginExtents(node,s);
if(_311>=0){
_311=Math.max(_311-pb.w-mb.w,0);
}
if(_312>=0){
_312=Math.max(_312-pb.h-mb.h,0);
}
d._setBox(node,_30f,_310,_311,_312);
};
var _317={l:0,t:0,w:0,h:0};
dojo.marginBox=function(node,box){
var n=d.byId(node),s=gcs(n),b=box;
return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);
};
dojo.contentBox=function(node,box){
var n=d.byId(node),s=gcs(n),b=box;
return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);
};
var _324=function(node,prop){
if(!(node=(node||0).parentNode)){
return 0;
}
var val,_328=0,_b=d.body();
while(node&&node.style){
if(gcs(node).position=="fixed"){
return 0;
}
val=node[prop];
if(val){
_328+=val-0;
if(node==_b){
break;
}
}
node=node.parentNode;
}
return _328;
};
dojo._docScroll=function(){
var _b=d.body(),_w=d.global,de=d.doc.documentElement;
return {y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||d._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)};
};
dojo._isBodyLtr=function(){
return ("_bodyLtr" in d)?d._bodyLtr:d._bodyLtr=gcs(d.body()).direction=="ltr";
};
dojo._getIeDocumentElementOffset=function(){
var de=d.doc.documentElement;
if(d.isIE<7){
return {x:d._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};
}else{
if(d.isIE<8){
return {x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top};
}else{
return {x:0,y:0};
}
}
};
dojo._fixIeBiDiScrollLeft=function(_32e){
var dd=d.doc;
if(d.isIE<8&&!d._isBodyLtr()){
var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;
return _32e+de.clientWidth-de.scrollWidth;
}
return _32e;
};
dojo._abs=function(node,_332){
var db=d.body(),dh=d.body().parentNode,ret;
if(node["getBoundingClientRect"]){
var _336=node.getBoundingClientRect();
ret={x:_336.left,y:_336.top};
if(d.isFF>=3){
var cs=gcs(dh);
ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);
ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);
}
if(d.isIE){
var _338=d._getIeDocumentElementOffset();
ret.x-=_338.x+(d.isQuirks?db.clientLeft:0);
ret.y-=_338.y+(d.isQuirks?db.clientTop:0);
}
}else{
ret={x:0,y:0};
if(node["offsetParent"]){
ret.x-=_324(node,"scrollLeft");
ret.y-=_324(node,"scrollTop");
var _339=node;
do{
var n=_339.offsetLeft,t=_339.offsetTop;
ret.x+=isNaN(n)?0:n;
ret.y+=isNaN(t)?0:t;
cs=gcs(_339);
if(_339!=node){
if(d.isFF){
ret.x+=2*px(_339,cs.borderLeftWidth);
ret.y+=2*px(_339,cs.borderTopWidth);
}else{
ret.x+=px(_339,cs.borderLeftWidth);
ret.y+=px(_339,cs.borderTopWidth);
}
}
if(d.isFF&&cs.position=="static"){
var _33c=_339.parentNode;
while(_33c!=_339.offsetParent){
var pcs=gcs(_33c);
if(pcs.position=="static"){
ret.x+=px(_339,pcs.borderLeftWidth);
ret.y+=px(_339,pcs.borderTopWidth);
}
_33c=_33c.parentNode;
}
}
_339=_339.offsetParent;
}while((_339!=dh)&&_339);
}else{
if(node.x&&node.y){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
if(_332){
var _33e=d._docScroll();
ret.x+=_33e.x;
ret.y+=_33e.y;
}
return ret;
};
dojo.coords=function(node,_340){
var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);
var abs=d._abs(n,_340);
mb.x=abs.x;
mb.y=abs.y;
return mb;
};
var _345=d.isIE<8;
var _346=function(name){
switch(name.toLowerCase()){
case "tabindex":
return _345?"tabIndex":"tabindex";
case "readonly":
return "readOnly";
case "class":
return "className";
case "for":
case "htmlfor":
return _345?"htmlFor":"for";
default:
return name;
}
};
var _348={colspan:"colSpan",enctype:"enctype",frameborder:"frameborder",method:"method",rowspan:"rowSpan",scrolling:"scrolling",shape:"shape",span:"span",type:"type",valuetype:"valueType",classname:"className",innerhtml:"innerHTML"};
dojo.hasAttr=function(node,name){
node=d.byId(node);
var _34b=_346(name);
_34b=_34b=="htmlFor"?"for":_34b;
var attr=node.getAttributeNode&&node.getAttributeNode(_34b);
return attr?attr.specified:false;
};
var _34d={},_ctr=0,_34f=dojo._scopeName+"attrid",_350={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};
dojo.attr=function(node,name,_353){
node=d.byId(node);
var args=arguments.length;
if(args==2&&!d.isString(name)){
for(var x in name){
d.attr(node,x,name[x]);
}
return;
}
name=_346(name);
if(args==3){
if(d.isFunction(_353)){
var _356=d.attr(node,_34f);
if(!_356){
_356=_ctr++;
d.attr(node,_34f,_356);
}
if(!_34d[_356]){
_34d[_356]={};
}
var h=_34d[_356][name];
if(h){
d.disconnect(h);
}else{
try{
delete node[name];
}
catch(e){
}
}
_34d[_356][name]=d.connect(node,name,_353);
}else{
if(typeof _353=="boolean"){
node[name]=_353;
}else{
if(name==="style"&&!d.isString(_353)){
d.style(node,_353);
}else{
if(name=="className"){
node.className=_353;
}else{
if(name==="innerHTML"){
if(d.isIE&&node.tagName.toLowerCase() in _350){
d.empty(node);
node.appendChild(d._toDom(_353,node.ownerDocument));
}else{
node[name]=_353;
}
}else{
node.setAttribute(name,_353);
}
}
}
}
}
}else{
var prop=_348[name.toLowerCase()];
if(prop){
return node[prop];
}
var _359=node[name];
return (typeof _359=="boolean"||typeof _359=="function")?_359:(d.hasAttr(node,name)?node.getAttribute(name):null);
}
};
dojo.removeAttr=function(node,name){
d.byId(node).removeAttribute(_346(name));
};
dojo.create=function(tag,_35d,_35e,pos){
var doc=d.doc;
if(_35e){
_35e=d.byId(_35e);
doc=_35e.ownerDocument;
}
if(d.isString(tag)){
tag=doc.createElement(tag);
}
if(_35d){
d.attr(tag,_35d);
}
if(_35e){
d.place(tag,_35e,pos);
}
return tag;
};
d.empty=d.isIE?function(node){
node=d.byId(node);
for(var c;c=node.lastChild;){
d.destroy(c);
}
}:function(node){
d.byId(node).innerHTML="";
};
var _364={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_365=/<\s*([\w\:]+)/,_366={},_367=0,_368="__"+d._scopeName+"ToDomId";
for(var _369 in _364){
var tw=_364[_369];
tw.pre=_369=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";
tw.post="</"+tw.reverse().join("></")+">";
}
d._toDom=function(frag,doc){
doc=doc||d.doc;
var _36d=doc[_368];
if(!_36d){
doc[_368]=_36d=++_367+"";
_366[_36d]=doc.createElement("div");
}
frag+="";
var _36e=frag.match(_365),tag=_36e?_36e[1].toLowerCase():"",_370=_366[_36d],wrap,i,fc,df;
if(_36e&&_364[tag]){
wrap=_364[tag];
_370.innerHTML=wrap.pre+frag+wrap.post;
for(i=wrap.length;i;--i){
_370=_370.firstChild;
}
}else{
_370.innerHTML=frag;
}
if(_370.childNodes.length==1){
return _370.removeChild(_370.firstChild);
}
df=doc.createDocumentFragment();
while(fc=_370.firstChild){
df.appendChild(fc);
}
return df;
};
var _374="className";
dojo.hasClass=function(node,_376){
return ((" "+d.byId(node)[_374]+" ").indexOf(" "+_376+" ")>=0);
};
dojo.addClass=function(node,_378){
node=d.byId(node);
var cls=node[_374];
if((" "+cls+" ").indexOf(" "+_378+" ")<0){
node[_374]=cls+(cls?" ":"")+_378;
}
};
dojo.removeClass=function(node,_37b){
node=d.byId(node);
var t=d.trim((" "+node[_374]+" ").replace(" "+_37b+" "," "));
if(node[_374]!=t){
node[_374]=t;
}
};
dojo.toggleClass=function(node,_37e,_37f){
if(_37f===undefined){
_37f=!d.hasClass(node,_37e);
}
d[_37f?"addClass":"removeClass"](node,_37e);
};
})();
}
if(!dojo._hasResource["dojo._base.NodeList"]){
dojo._hasResource["dojo._base.NodeList"]=true;
dojo.provide("dojo._base.NodeList");
(function(){
var d=dojo;
var ap=Array.prototype,aps=ap.slice,apc=ap.concat;
var tnl=function(a){
a.constructor=d.NodeList;
dojo._mixin(a,d.NodeList.prototype);
return a;
};
var _386=function(f,a,o){
a=[0].concat(aps.call(a,0));
o=o||d.global;
return function(node){
a[0]=node;
return f.apply(o,a);
};
};
var _38b=function(f,o){
return function(){
this.forEach(_386(f,arguments,o));
return this;
};
};
var _38e=function(f,o){
return function(){
return this.map(_386(f,arguments,o));
};
};
var _391=function(f,o){
return function(){
return this.filter(_386(f,arguments,o));
};
};
var _394=function(f,g,o){
return function(){
var a=arguments,body=_386(f,a,o);
if(g.call(o||d.global,a)){
return this.map(body);
}
this.forEach(body);
return this;
};
};
var _39a=function(a){
return a.length==1&&d.isString(a[0]);
};
var _39c=function(node){
var p=node.parentNode;
if(p){
p.removeChild(node);
}
};
dojo.NodeList=function(){
return tnl(Array.apply(null,arguments));
};
var nl=d.NodeList,nlp=nl.prototype;
nl._wrap=tnl;
nl._adaptAsMap=_38e;
nl._adaptAsForEach=_38b;
nl._adaptAsFilter=_391;
nl._adaptWithCondition=_394;
d.forEach(["slice","splice"],function(name){
var f=ap[name];
nlp[name]=function(){
return tnl(f.apply(this,arguments));
};
});
d.forEach(["indexOf","lastIndexOf","every","some"],function(name){
var f=d[name];
nlp[name]=function(){
return f.apply(d,[this].concat(aps.call(arguments,0)));
};
});
d.forEach(["attr","style"],function(name){
nlp[name]=_394(d[name],_39a);
});
d.forEach(["connect","addClass","removeClass","toggleClass","empty"],function(name){
nlp[name]=_38b(d[name]);
});
dojo.extend(dojo.NodeList,{concat:function(item){
var t=d.isArray(this)?this:aps.call(this,0),m=d.map(arguments,function(a){
return a&&!d.isArray(a)&&(a.constructor===NodeList||a.constructor==nl)?aps.call(a,0):a;
});
return tnl(apc.apply(t,m));
},map:function(func,obj){
return tnl(d.map(this,func,obj));
},forEach:function(_3ad,_3ae){
d.forEach(this,_3ad,_3ae);
return this;
},coords:_38e(d.coords),place:function(_3af,_3b0){
var item=d.query(_3af)[0];
return this.forEach(function(node){
d.place(node,item,_3b0);
});
},orphan:function(_3b3){
return (_3b3?d._filterQueryResult(this,_3b3):this).forEach(_39c);
},adopt:function(_3b4,_3b5){
return d.query(_3b4).place(item[0],_3b5);
},query:function(_3b6){
if(!_3b6){
return this;
}
var ret=this.map(function(node){
return d.query(_3b6,node).filter(function(_3b9){
return _3b9!==undefined;
});
});
return tnl(apc.apply([],ret));
},filter:function(_3ba){
var a=arguments,_3bc=this,_3bd=0;
if(d.isString(_3ba)){
_3bc=d._filterQueryResult(this,a[0]);
if(a.length==1){
return _3bc;
}
_3bd=1;
}
return tnl(d.filter(_3bc,a[_3bd],a[_3bd+1]));
},addContent:function(_3be,_3bf){
var c=d.isString(_3be)?d._toDom(_3be,this[0]&&this[0].ownerDocument):_3be,i,l=this.length-1;
for(i=0;i<l;++i){
d.place(c.cloneNode(true),this[i],_3bf);
}
if(l>=0){
d.place(c,this[l],_3bf);
}
return this;
},instantiate:function(_3c2,_3c3){
var c=d.isFunction(_3c2)?_3c2:d.getObject(_3c2);
_3c3=_3c3||{};
return this.forEach(function(node){
new c(_3c3,node);
});
},at:function(){
var t=new dojo.NodeList();
d.forEach(arguments,function(i){
if(this[i]){
t.push(this[i]);
}
},this);
return t;
}});
d.forEach(["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"],function(evt){
var _oe="on"+evt;
nlp[_oe]=function(a,b){
return this.connect(_oe,a,b);
};
});
})();
}
if(!dojo._hasResource["dojo._base.query"]){
dojo._hasResource["dojo._base.query"]=true;
if(typeof dojo!="undefined"){
dojo.provide("dojo._base.query");
}
(function(d){
var trim=d.trim;
var each=d.forEach;
var qlc=d._queryListCtor=d.NodeList;
var _3d0=d.isString;
var _3d1=function(){
return d.doc;
};
var _3d2=(d.isWebKit&&((_3d1().compatMode)=="BackCompat"));
var _3d3=!!_3d1().firstChild["children"]?"children":"childNodes";
var _3d4=">~+";
var _3d5=false;
var _3d6=function(){
return true;
};
var _3d7=function(_3d8){
if(_3d4.indexOf(_3d8.slice(-1))>=0){
_3d8+=" * ";
}else{
_3d8+=" ";
}
var ts=function(s,e){
return trim(_3d8.slice(s,e));
};
var _3dc=[];
var _3dd=-1,_3de=-1,_3df=-1,_3e0=-1,_3e1=-1,inId=-1,_3e3=-1,lc="",cc="",_3e6;
var x=0,ql=_3d8.length,_3e9=null,_cp=null;
var _3eb=function(){
if(_3e3>=0){
var tv=(_3e3==x)?null:ts(_3e3,x);
_3e9[(_3d4.indexOf(tv)<0)?"tag":"oper"]=tv;
_3e3=-1;
}
};
var _3ed=function(){
if(inId>=0){
_3e9.id=ts(inId,x).replace(/\\/g,"");
inId=-1;
}
};
var _3ee=function(){
if(_3e1>=0){
_3e9.classes.push(ts(_3e1+1,x).replace(/\\/g,""));
_3e1=-1;
}
};
var _3ef=function(){
_3ed();
_3eb();
_3ee();
};
var _3f0=function(){
_3ef();
if(_3e0>=0){
_3e9.pseudos.push({name:ts(_3e0+1,x)});
}
_3e9.loops=(_3e9.pseudos.length||_3e9.attrs.length||_3e9.classes.length);
_3e9.oquery=_3e9.query=ts(_3e6,x);
_3e9.otag=_3e9.tag=(_3e9["oper"])?null:(_3e9.tag||"*");
if(_3e9.tag){
_3e9.tag=_3e9.tag.toUpperCase();
}
if(_3dc.length&&(_3dc[_3dc.length-1].oper)){
_3e9.infixOper=_3dc.pop();
_3e9.query=_3e9.infixOper.query+" "+_3e9.query;
}
_3dc.push(_3e9);
_3e9=null;
};
for(;lc=cc,cc=_3d8.charAt(x),x<ql;x++){
if(lc=="\\"){
continue;
}
if(!_3e9){
_3e6=x;
_3e9={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){
return (_3d5)?this.otag:this.tag;
}};
_3e3=x;
}
if(_3dd>=0){
if(cc=="]"){
if(!_cp.attr){
_cp.attr=ts(_3dd+1,x);
}else{
_cp.matchFor=ts((_3df||_3dd+1),x);
}
var cmf=_cp.matchFor;
if(cmf){
if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){
_cp.matchFor=cmf.slice(1,-1);
}
}
_3e9.attrs.push(_cp);
_cp=null;
_3dd=_3df=-1;
}else{
if(cc=="="){
var _3f2=("|~^$*".indexOf(lc)>=0)?lc:"";
_cp.type=_3f2+cc;
_cp.attr=ts(_3dd+1,x-_3f2.length);
_3df=x+1;
}
}
}else{
if(_3de>=0){
if(cc==")"){
if(_3e0>=0){
_cp.value=ts(_3de+1,x);
}
_3e0=_3de=-1;
}
}else{
if(cc=="#"){
_3ef();
inId=x+1;
}else{
if(cc=="."){
_3ef();
_3e1=x;
}else{
if(cc==":"){
_3ef();
_3e0=x;
}else{
if(cc=="["){
_3ef();
_3dd=x;
_cp={};
}else{
if(cc=="("){
if(_3e0>=0){
_cp={name:ts(_3e0+1,x),value:null};
_3e9.pseudos.push(_cp);
}
_3de=x;
}else{
if((cc==" ")&&(lc!=cc)){
_3f0();
}
}
}
}
}
}
}
}
}
return _3dc;
};
var _3f3=function(_3f4,_3f5){
if(!_3f4){
return _3f5;
}
if(!_3f5){
return _3f4;
}
return function(){
return _3f4.apply(window,arguments)&&_3f5.apply(window,arguments);
};
};
var _3f6=function(i,arr){
var r=arr||[];
if(i){
r.push(i);
}
return r;
};
var _3fa=function(n){
return (1==n.nodeType);
};
var _3fc="";
var _3fd=function(elem,attr){
if(!elem){
return _3fc;
}
if(attr=="class"){
return elem.className||_3fc;
}
if(attr=="for"){
return elem.htmlFor||_3fc;
}
if(attr=="style"){
return elem.style.cssText||_3fc;
}
return (_3d5?elem.getAttribute(attr):elem.getAttribute(attr,2))||_3fc;
};
var _400={"*=":function(attr,_402){
return function(elem){
return (_3fd(elem,attr).indexOf(_402)>=0);
};
},"^=":function(attr,_405){
return function(elem){
return (_3fd(elem,attr).indexOf(_405)==0);
};
},"$=":function(attr,_408){
var tval=" "+_408;
return function(elem){
var ea=" "+_3fd(elem,attr);
return (ea.lastIndexOf(_408)==(ea.length-_408.length));
};
},"~=":function(attr,_40d){
var tval=" "+_40d+" ";
return function(elem){
var ea=" "+_3fd(elem,attr)+" ";
return (ea.indexOf(tval)>=0);
};
},"|=":function(attr,_412){
var _413=" "+_412+"-";
return function(elem){
var ea=" "+_3fd(elem,attr);
return ((ea==_412)||(ea.indexOf(_413)==0));
};
},"=":function(attr,_417){
return function(elem){
return (_3fd(elem,attr)==_417);
};
}};
var _419=(typeof _3d1().firstChild.nextElementSibling=="undefined");
var _ns=!_419?"nextElementSibling":"nextSibling";
var _ps=!_419?"previousElementSibling":"previousSibling";
var _41c=(_419?_3fa:_3d6);
var _41d=function(node){
while(node=node[_ps]){
if(_41c(node)){
return false;
}
}
return true;
};
var _41f=function(node){
while(node=node[_ns]){
if(_41c(node)){
return false;
}
}
return true;
};
var _421=function(node){
var root=node.parentNode;
var i=0,tret=root[_3d3],ci=(node["_i"]||-1),cl=(root["_l"]||-1);
if(!tret){
return -1;
}
var l=tret.length;
if(cl==l&&ci>=0&&cl>=0){
return ci;
}
root["_l"]=l;
ci=-1;
for(var te=root["firstElementChild"]||root["firstChild"];te;te=te[_ns]){
if(_41c(te)){
te["_i"]=++i;
if(node===te){
ci=i;
}
}
}
return ci;
};
var _42a=function(elem){
return !((_421(elem))%2);
};
var _42c=function(elem){
return ((_421(elem))%2);
};
var _42e={"checked":function(name,_430){
return function(elem){
return !!d.attr(elem,"checked");
};
},"first-child":function(){
return _41d;
},"last-child":function(){
return _41f;
},"only-child":function(name,_433){
return function(node){
if(!_41d(node)){
return false;
}
if(!_41f(node)){
return false;
}
return true;
};
},"empty":function(name,_436){
return function(elem){
var cn=elem.childNodes;
var cnl=elem.childNodes.length;
for(var x=cnl-1;x>=0;x--){
var nt=cn[x].nodeType;
if((nt===1)||(nt==3)){
return false;
}
}
return true;
};
},"contains":function(name,_43d){
var cz=_43d.charAt(0);
if(cz=="\""||cz=="'"){
_43d=_43d.slice(1,-1);
}
return function(elem){
return (elem.innerHTML.indexOf(_43d)>=0);
};
},"not":function(name,_441){
var p=_3d7(_441)[0];
var _443={el:1};
if(p.tag!="*"){
_443.tag=1;
}
if(!p.classes.length){
_443.classes=1;
}
var ntf=_445(p,_443);
return function(elem){
return (!ntf(elem));
};
},"nth-child":function(name,_448){
var pi=parseInt;
if(_448=="odd"){
return _42c;
}else{
if(_448=="even"){
return _42a;
}
}
if(_448.indexOf("n")!=-1){
var _44a=_448.split("n",2);
var pred=_44a[0]?((_44a[0]=="-")?-1:pi(_44a[0])):1;
var idx=_44a[1]?pi(_44a[1]):0;
var lb=0,ub=-1;
if(pred>0){
if(idx<0){
idx=(idx%pred)&&(pred+(idx%pred));
}else{
if(idx>0){
if(idx>=pred){
lb=idx-idx%pred;
}
idx=idx%pred;
}
}
}else{
if(pred<0){
pred*=-1;
if(idx>0){
ub=idx;
idx=idx%pred;
}
}
}
if(pred>0){
return function(elem){
var i=_421(elem);
return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);
};
}else{
_448=idx;
}
}
var _451=pi(_448);
return function(elem){
return (_421(elem)==_451);
};
}};
var _453=(d.isIE)?function(cond){
var clc=cond.toLowerCase();
if(clc=="class"){
cond="className";
}
return function(elem){
return (_3d5?elem.getAttribute(cond):elem[cond]||elem[clc]);
};
}:function(cond){
return function(elem){
return (elem&&elem.getAttribute&&elem.hasAttribute(cond));
};
};
var _445=function(_459,_45a){
if(!_459){
return _3d6;
}
_45a=_45a||{};
var ff=null;
if(!("el" in _45a)){
ff=_3f3(ff,_3fa);
}
if(!("tag" in _45a)){
if(_459.tag!="*"){
ff=_3f3(ff,function(elem){
return (elem&&(elem.tagName==_459.getTag()));
});
}
}
if(!("classes" in _45a)){
each(_459.classes,function(_45d,idx,arr){
var re=new RegExp("(?:^|\\s)"+_45d+"(?:\\s|$)");
ff=_3f3(ff,function(elem){
return re.test(elem.className);
});
ff.count=idx;
});
}
if(!("pseudos" in _45a)){
each(_459.pseudos,function(_462){
var pn=_462.name;
if(_42e[pn]){
ff=_3f3(ff,_42e[pn](pn,_462.value));
}
});
}
if(!("attrs" in _45a)){
each(_459.attrs,function(attr){
var _465;
var a=attr.attr;
if(attr.type&&_400[attr.type]){
_465=_400[attr.type](a,attr.matchFor);
}else{
if(a.length){
_465=_453(a);
}
}
if(_465){
ff=_3f3(ff,_465);
}
});
}
if(!("id" in _45a)){
if(_459.id){
ff=_3f3(ff,function(elem){
return (!!elem&&(elem.id==_459.id));
});
}
}
if(!ff){
if(!("default" in _45a)){
ff=_3d6;
}
}
return ff;
};
var _468=function(_469){
return function(node,ret,bag){
while(node=node[_ns]){
if(_419&&(!_3fa(node))){
continue;
}
if((!bag||_46d(node,bag))&&_469(node)){
ret.push(node);
}
break;
}
return ret;
};
};
var _46e=function(_46f){
return function(root,ret,bag){
var te=root[_ns];
while(te){
if(_41c(te)){
if(bag&&!_46d(te,bag)){
break;
}
if(_46f(te)){
ret.push(te);
}
}
te=te[_ns];
}
return ret;
};
};
var _474=function(_475){
_475=_475||_3d6;
return function(root,ret,bag){
var te,x=0,tret=root[_3d3];
while(te=tret[x++]){
if(_41c(te)&&(!bag||_46d(te,bag))&&(_475(te,x))){
ret.push(te);
}
}
return ret;
};
};
var _47c=function(node,root){
var pn=node.parentNode;
while(pn){
if(pn==root){
break;
}
pn=pn.parentNode;
}
return !!pn;
};
var _480={};
var _481=function(_482){
var _483=_480[_482.query];
if(_483){
return _483;
}
var io=_482.infixOper;
var oper=(io?io.oper:"");
var _486=_445(_482,{el:1});
var qt=_482.tag;
var _488=("*"==qt);
var ecs=_3d1()["getElementsByClassName"];
if(!oper){
if(_482.id){
_486=(!_482.loops&&_488)?_3d6:_445(_482,{el:1,id:1});
_483=function(root,arr){
var te=d.byId(_482.id,(root.ownerDocument||root));
if(!te||!_486(te)){
return;
}
if(9==root.nodeType){
return _3f6(te,arr);
}else{
if(_47c(te,root)){
return _3f6(te,arr);
}
}
};
}else{
if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_482.classes.length&&!_3d2){
_486=_445(_482,{el:1,classes:1,id:1});
var _48d=_482.classes.join(" ");
_483=function(root,arr,bag){
var ret=_3f6(0,arr),te,x=0;
var tret=root.getElementsByClassName(_48d);
while((te=tret[x++])){
if(_486(te,root)&&_46d(te,bag)){
ret.push(te);
}
}
return ret;
};
}else{
if(!_488&&!_482.loops){
_483=function(root,arr,bag){
var ret=_3f6(0,arr),te,x=0;
var tret=root.getElementsByTagName(_482.getTag());
while((te=tret[x++])){
if(_46d(te,bag)){
ret.push(te);
}
}
return ret;
};
}else{
_486=_445(_482,{el:1,tag:1,id:1});
_483=function(root,arr,bag){
var ret=_3f6(0,arr),te,x=0;
var tret=root.getElementsByTagName(_482.getTag());
while((te=tret[x++])){
if(_486(te,root)&&_46d(te,bag)){
ret.push(te);
}
}
return ret;
};
}
}
}
}else{
var _4a3={el:1};
if(_488){
_4a3.tag=1;
}
_486=_445(_482,_4a3);
if("+"==oper){
_483=_468(_486);
}else{
if("~"==oper){
_483=_46e(_486);
}else{
if(">"==oper){
_483=_474(_486);
}
}
}
}
return _480[_482.query]=_483;
};
var _4a4=function(root,_4a6){
var _4a7=_3f6(root),qp,x,te,qpl=_4a6.length,bag,ret;
for(var i=0;i<qpl;i++){
ret=[];
qp=_4a6[i];
x=_4a7.length-1;
if(x>0){
bag={};
ret.nozip=true;
}
var gef=_481(qp);
while(te=_4a7[x--]){
gef(te,ret,bag);
}
if(!ret.length){
break;
}
_4a7=ret;
}
return ret;
};
var _4b0={},_4b1={};
var _4b2=function(_4b3){
var _4b4=_3d7(trim(_4b3));
if(_4b4.length==1){
var tef=_481(_4b4[0]);
return function(root){
var r=tef(root,new qlc());
if(r){
r.nozip=true;
}
return r;
};
}
return function(root){
return _4a4(root,_4b4);
};
};
var nua=navigator.userAgent;
var wk="WebKit/";
var _4bb=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));
var _4bc=d.isIE?"commentStrip":"nozip";
var qsa="querySelectorAll";
var _4be=(!!_3d1()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_4bb));
var _4bf=function(_4c0,_4c1){
if(_4be){
var _4c2=_4b1[_4c0];
if(_4c2&&!_4c1){
return _4c2;
}
}
var _4c3=_4b0[_4c0];
if(_4c3){
return _4c3;
}
var qcz=_4c0.charAt(0);
var _4c5=(-1==_4c0.indexOf(" "));
if((_4c0.indexOf("#")>=0)&&(_4c5)){
_4c1=true;
}
var _4c6=(_4be&&(!_4c1)&&(_3d4.indexOf(qcz)==-1)&&(!d.isIE||(_4c0.indexOf(":")==-1))&&(!(_3d2&&(_4c0.indexOf(".")>=0)))&&(_4c0.indexOf(":contains")==-1)&&(_4c0.indexOf("|=")==-1));
if(_4c6){
var tq=(_3d4.indexOf(_4c0.charAt(_4c0.length-1))>=0)?(_4c0+" *"):_4c0;
return _4b1[_4c0]=function(root){
try{
if(!((9==root.nodeType)||_4c5)){
throw "";
}
var r=root[qsa](tq);
r[_4bc]=true;
return r;
}
catch(e){
return _4bf(_4c0,true)(root);
}
};
}else{
var _4ca=_4c0.split(/\s*,\s*/);
return _4b0[_4c0]=((_4ca.length<2)?_4b2(_4c0):function(root){
var _4cc=0,ret=[],tp;
while((tp=_4ca[_4cc++])){
ret=ret.concat(_4b2(tp)(root));
}
return ret;
});
}
};
var _4cf=0;
var _4d0=d.isIE?function(node){
if(_3d5){
return (node.getAttribute("_uid")||node.setAttribute("_uid",++_4cf)||_4cf);
}else{
return node.uniqueID;
}
}:function(node){
return (node._uid||(node._uid=++_4cf));
};
var _46d=function(node,bag){
if(!bag){
return 1;
}
var id=_4d0(node);
if(!bag[id]){
return bag[id]=1;
}
return 0;
};
var _4d6="_zipIdx";
var _zip=function(arr){
if(arr&&arr.nozip){
return (qlc._wrap)?qlc._wrap(arr):arr;
}
var ret=new qlc();
if(!arr||!arr.length){
return ret;
}
if(arr[0]){
ret.push(arr[0]);
}
if(arr.length<2){
return ret;
}
_4cf++;
if(d.isIE&&_3d5){
var _4da=_4cf+"";
arr[0].setAttribute(_4d6,_4da);
for(var x=1,te;te=arr[x];x++){
if(arr[x].getAttribute(_4d6)!=_4da){
ret.push(te);
}
te.setAttribute(_4d6,_4da);
}
}else{
if(d.isIE&&arr.commentStrip){
try{
for(var x=1,te;te=arr[x];x++){
if(_3fa(te)){
ret.push(te);
}
}
}
catch(e){
}
}else{
if(arr[0]){
arr[0][_4d6]=_4cf;
}
for(var x=1,te;te=arr[x];x++){
if(arr[x][_4d6]!=_4cf){
ret.push(te);
}
te[_4d6]=_4cf;
}
}
}
return ret;
};
d.query=function(_4dd,root){
qlc=d._queryListCtor;
if(!_4dd){
return new qlc();
}
if(_4dd.constructor==qlc){
return _4dd;
}
if(!_3d0(_4dd)){
return new qlc(_4dd);
}
if(_3d0(root)){
root=d.byId(root);
if(!root){
return new qlc();
}
}
root=root||_3d1();
var od=root.ownerDocument||root.documentElement;
_3d5=(root.contentType&&root.contentType=="application/xml")||(d.isOpera&&(root.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));
var r=_4bf(_4dd)(root);
if(r&&r.nozip&&!qlc._wrap){
return r;
}
return _zip(r);
};
d.query.pseudos=_42e;
d._filterQueryResult=function(_4e1,_4e2){
var _4e3=new d._queryListCtor();
var _4e4=_445(_3d7(_4e2)[0]);
for(var x=0,te;te=_4e1[x];x++){
if(_4e4(te)){
_4e3.push(te);
}
}
return _4e3;
};
})(this["queryPortability"]||this["acme"]||dojo);
}
if(!dojo._hasResource["dojo._base.xhr"]){
dojo._hasResource["dojo._base.xhr"]=true;
dojo.provide("dojo._base.xhr");
(function(){
var _d=dojo;
function _4e8(obj,name,_4eb){
var val=obj[name];
if(_d.isString(val)){
obj[name]=[val,_4eb];
}else{
if(_d.isArray(val)){
val.push(_4eb);
}else{
obj[name]=_4eb;
}
}
};
dojo.formToObject=function(_4ed){
var ret={};
var _4ef="file|submit|image|reset|button|";
_d.forEach(dojo.byId(_4ed).elements,function(item){
var _in=item.name;
var type=(item.type||"").toLowerCase();
if(_in&&type&&_4ef.indexOf(type)==-1&&!item.disabled){
if(type=="radio"||type=="checkbox"){
if(item.checked){
_4e8(ret,_in,item.value);
}
}else{
if(item.multiple){
ret[_in]=[];
_d.query("option",item).forEach(function(opt){
if(opt.selected){
_4e8(ret,_in,opt.value);
}
});
}else{
_4e8(ret,_in,item.value);
if(type=="image"){
ret[_in+".x"]=ret[_in+".y"]=ret[_in].x=ret[_in].y=0;
}
}
}
}
});
return ret;
};
dojo.objectToQuery=function(map){
var enc=encodeURIComponent;
var _4f6=[];
var _4f7={};
for(var name in map){
var _4f9=map[name];
if(_4f9!=_4f7[name]){
var _4fa=enc(name)+"=";
if(_d.isArray(_4f9)){
for(var i=0;i<_4f9.length;i++){
_4f6.push(_4fa+enc(_4f9[i]));
}
}else{
_4f6.push(_4fa+enc(_4f9));
}
}
}
return _4f6.join("&");
};
dojo.formToQuery=function(_4fc){
return _d.objectToQuery(_d.formToObject(_4fc));
};
dojo.formToJson=function(_4fd,_4fe){
return _d.toJson(_d.formToObject(_4fd),_4fe);
};
dojo.queryToObject=function(str){
var ret={};
var qp=str.split("&");
var dec=decodeURIComponent;
_d.forEach(qp,function(item){
if(item.length){
var _504=item.split("=");
var name=dec(_504.shift());
var val=dec(_504.join("="));
if(_d.isString(ret[name])){
ret[name]=[ret[name]];
}
if(_d.isArray(ret[name])){
ret[name].push(val);
}else{
ret[name]=val;
}
}
});
return ret;
};
dojo._blockAsync=false;
dojo._contentHandlers={text:function(xhr){
return xhr.responseText;
},json:function(xhr){
return _d.fromJson(xhr.responseText||null);
},"json-comment-filtered":function(xhr){
if(!dojo.config.useCommentedJson){
console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");
}
var _50a=xhr.responseText;
var _50b=_50a.indexOf("/*");
var _50c=_50a.lastIndexOf("*/");
if(_50b==-1||_50c==-1){
throw new Error("JSON was not comment filtered");
}
return _d.fromJson(_50a.substring(_50b+2,_50c));
},javascript:function(xhr){
return _d.eval(xhr.responseText);
},xml:function(xhr){
var _50f=xhr.responseXML;
if(_d.isIE&&(!_50f||!_50f.documentElement)){
var ms=function(n){
return "MSXML"+n+".DOMDocument";
};
var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];
_d.some(dp,function(p){
try{
var dom=new ActiveXObject(p);
dom.async=false;
dom.loadXML(xhr.responseText);
_50f=dom;
}
catch(e){
return false;
}
return true;
});
}
return _50f;
}};
dojo._contentHandlers["json-comment-optional"]=function(xhr){
var _516=_d._contentHandlers;
if(xhr.responseText&&xhr.responseText.indexOf("/*")!=-1){
return _516["json-comment-filtered"](xhr);
}else{
return _516["json"](xhr);
}
};
dojo._ioSetArgs=function(args,_518,_519,_51a){
var _51b={args:args,url:args.url};
var _51c=null;
if(args.form){
var form=_d.byId(args.form);
var _51e=form.getAttributeNode("action");
_51b.url=_51b.url||(_51e?_51e.value:null);
_51c=_d.formToObject(form);
}
var _51f=[{}];
if(_51c){
_51f.push(_51c);
}
if(args.content){
_51f.push(args.content);
}
if(args.preventCache){
_51f.push({"dojo.preventCache":new Date().valueOf()});
}
_51b.query=_d.objectToQuery(_d.mixin.apply(null,_51f));
_51b.handleAs=args.handleAs||"text";
var d=new _d.Deferred(_518);
d.addCallbacks(_519,function(_521){
return _51a(_521,d);
});
var ld=args.load;
if(ld&&_d.isFunction(ld)){
d.addCallback(function(_523){
return ld.call(args,_523,_51b);
});
}
var err=args.error;
if(err&&_d.isFunction(err)){
d.addErrback(function(_525){
return err.call(args,_525,_51b);
});
}
var _526=args.handle;
if(_526&&_d.isFunction(_526)){
d.addBoth(function(_527){
return _526.call(args,_527,_51b);
});
}
d.ioArgs=_51b;
return d;
};
var _528=function(dfd){
dfd.canceled=true;
var xhr=dfd.ioArgs.xhr;
var _at=typeof xhr.abort;
if(_at=="function"||_at=="object"||_at=="unknown"){
xhr.abort();
}
var err=dfd.ioArgs.error;
if(!err){
err=new Error("xhr cancelled");
err.dojoType="cancel";
}
return err;
};
var _52d=function(dfd){
var ret=_d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
return ret===undefined?null:ret;
};
var _530=function(_531,dfd){
console.error(_531);
return _531;
};
var _533=null;
var _534=[];
var _535=function(){
var now=(new Date()).getTime();
if(!_d._blockAsync){
for(var i=0,tif;i<_534.length&&(tif=_534[i]);i++){
var dfd=tif.dfd;
var func=function(){
if(!dfd||dfd.canceled||!tif.validCheck(dfd)){
_534.splice(i--,1);
}else{
if(tif.ioCheck(dfd)){
_534.splice(i--,1);
tif.resHandle(dfd);
}else{
if(dfd.startTime){
if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){
_534.splice(i--,1);
var err=new Error("timeout exceeded");
err.dojoType="timeout";
dfd.errback(err);
dfd.cancel();
}
}
}
}
};
if(dojo.config.debugAtAllCosts){
func.call(this);
}else{
try{
func.call(this);
}
catch(e){
dfd.errback(e);
}
}
}
}
if(!_534.length){
clearInterval(_533);
_533=null;
return;
}
};
dojo._ioCancelAll=function(){
try{
_d.forEach(_534,function(i){
try{
i.dfd.cancel();
}
catch(e){
}
});
}
catch(e){
}
};
if(_d.isIE){
_d.addOnWindowUnload(_d._ioCancelAll);
}
_d._ioWatch=function(dfd,_53e,_53f,_540){
var args=dfd.ioArgs.args;
if(args.timeout){
dfd.startTime=(new Date()).getTime();
}
_534.push({dfd:dfd,validCheck:_53e,ioCheck:_53f,resHandle:_540});
if(!_533){
_533=setInterval(_535,50);
}
if(args.sync){
_535();
}
};
var _542="application/x-www-form-urlencoded";
var _543=function(dfd){
return dfd.ioArgs.xhr.readyState;
};
var _545=function(dfd){
return 4==dfd.ioArgs.xhr.readyState;
};
var _547=function(dfd){
var xhr=dfd.ioArgs.xhr;
if(_d._isDocumentOk(xhr)){
dfd.callback(dfd);
}else{
var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);
err.status=xhr.status;
err.responseText=xhr.responseText;
dfd.errback(err);
}
};
dojo._ioAddQueryToUrl=function(_54b){
if(_54b.query.length){
_54b.url+=(_54b.url.indexOf("?")==-1?"?":"&")+_54b.query;
_54b.query=null;
}
};
dojo.xhr=function(_54c,args,_54e){
var dfd=_d._ioSetArgs(args,_528,_52d,_530);
dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);
if(_54e){
if("postData" in args){
dfd.ioArgs.query=args.postData;
}else{
if("putData" in args){
dfd.ioArgs.query=args.putData;
}
}
}else{
_d._ioAddQueryToUrl(dfd.ioArgs);
}
var _550=dfd.ioArgs;
var xhr=_550.xhr;
xhr.open(_54c,_550.url,args.sync!==true,args.user||undefined,args.password||undefined);
if(args.headers){
for(var hdr in args.headers){
if(hdr.toLowerCase()==="content-type"&&!args.contentType){
args.contentType=args.headers[hdr];
}else{
xhr.setRequestHeader(hdr,args.headers[hdr]);
}
}
}
xhr.setRequestHeader("Content-Type",args.contentType||_542);
if(!args.headers||!args.headers["X-Requested-With"]){
xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");
}
if(dojo.config.debugAtAllCosts){
xhr.send(_550.query);
}else{
try{
xhr.send(_550.query);
}
catch(e){
dfd.ioArgs.error=e;
dfd.cancel();
}
}
_d._ioWatch(dfd,_543,_545,_547);
xhr=null;
return dfd;
};
dojo.xhrGet=function(args){
return _d.xhr("GET",args);
};
dojo.rawXhrPost=dojo.xhrPost=function(args){
return _d.xhr("POST",args,true);
};
dojo.rawXhrPut=dojo.xhrPut=function(args){
return _d.xhr("PUT",args,true);
};
dojo.xhrDelete=function(args){
return _d.xhr("DELETE",args);
};
})();
}
if(!dojo._hasResource["dojo._base.fx"]){
dojo._hasResource["dojo._base.fx"]=true;
dojo.provide("dojo._base.fx");
(function(){
var d=dojo;
var _558=d.mixin;
dojo._Line=function(_559,end){
this.start=_559;
this.end=end;
};
dojo._Line.prototype.getValue=function(n){
return ((this.end-this.start)*n)+this.start;
};
d.declare("dojo._Animation",null,{constructor:function(args){
_558(this,args);
if(d.isArray(this.curve)){
this.curve=new d._Line(this.curve[0],this.curve[1]);
}
},duration:350,repeat:0,rate:10,_percent:0,_startRepeatCount:0,_fire:function(evt,args){
if(this[evt]){
if(dojo.config.debugAtAllCosts){
this[evt].apply(this,args||[]);
}else{
try{
this[evt].apply(this,args||[]);
}
catch(e){
console.error("exception in animation handler for:",evt);
console.error(e);
}
}
}
return this;
},play:function(_55f,_560){
var _t=this;
if(_t._delayTimer){
_t._clearTimer();
}
if(_560){
_t._stopTimer();
_t._active=_t._paused=false;
_t._percent=0;
}else{
if(_t._active&&!_t._paused){
return _t;
}
}
_t._fire("beforeBegin");
var de=_55f||_t.delay,_p=dojo.hitch(_t,"_play",_560);
if(de>0){
_t._delayTimer=setTimeout(_p,de);
return _t;
}
_p();
return _t;
},_play:function(_564){
var _t=this;
if(_t._delayTimer){
_t._clearTimer();
}
_t._startTime=new Date().valueOf();
if(_t._paused){
_t._startTime-=_t.duration*_t._percent;
}
_t._endTime=_t._startTime+_t.duration;
_t._active=true;
_t._paused=false;
var _566=_t.curve.getValue(_t._percent);
if(!_t._percent){
if(!_t._startRepeatCount){
_t._startRepeatCount=_t.repeat;
}
_t._fire("onBegin",[_566]);
}
_t._fire("onPlay",[_566]);
_t._cycle();
return _t;
},pause:function(){
var _t=this;
if(_t._delayTimer){
_t._clearTimer();
}
_t._stopTimer();
if(!_t._active){
return _t;
}
_t._paused=true;
_t._fire("onPause",[_t.curve.getValue(_t._percent)]);
return _t;
},gotoPercent:function(_568,_569){
var _t=this;
_t._stopTimer();
_t._active=_t._paused=true;
_t._percent=_568;
if(_569){
_t.play();
}
return _t;
},stop:function(_56b){
var _t=this;
if(_t._delayTimer){
_t._clearTimer();
}
if(!_t._timer){
return _t;
}
_t._stopTimer();
if(_56b){
_t._percent=1;
}
_t._fire("onStop",[_t.curve.getValue(_t._percent)]);
_t._active=_t._paused=false;
return _t;
},status:function(){
if(this._active){
return this._paused?"paused":"playing";
}
return "stopped";
},_cycle:function(){
var _t=this;
if(_t._active){
var curr=new Date().valueOf();
var step=(curr-_t._startTime)/(_t._endTime-_t._startTime);
if(step>=1){
step=1;
}
_t._percent=step;
if(_t.easing){
step=_t.easing(step);
}
_t._fire("onAnimate",[_t.curve.getValue(step)]);
if(_t._percent<1){
_t._startTimer();
}else{
_t._active=false;
if(_t.repeat>0){
_t.repeat--;
_t.play(null,true);
}else{
if(_t.repeat==-1){
_t.play(null,true);
}else{
if(_t._startRepeatCount){
_t.repeat=_t._startRepeatCount;
_t._startRepeatCount=0;
}
}
}
_t._percent=0;
_t._fire("onEnd");
_t._stopTimer();
}
}
return _t;
},_clearTimer:function(){
clearTimeout(this._delayTimer);
delete this._delayTimer;
}});
var ctr=0,_571=[],_572=null,_573={run:function(){
}};
dojo._Animation.prototype._startTimer=function(){
if(!this._timer){
this._timer=d.connect(_573,"run",this,"_cycle");
ctr++;
}
if(!_572){
_572=setInterval(d.hitch(_573,"run"),this.rate);
}
};
dojo._Animation.prototype._stopTimer=function(){
if(this._timer){
d.disconnect(this._timer);
this._timer=null;
ctr--;
}
if(ctr<=0){
clearInterval(_572);
_572=null;
ctr=0;
}
};
var _574=d.isIE?function(node){
var ns=node.style;
if(!ns.width.length&&d.style(node,"width")=="auto"){
ns.width="auto";
}
}:function(){
};
dojo._fade=function(args){
args.node=d.byId(args.node);
var _578=_558({properties:{}},args),_579=(_578.properties.opacity={});
_579.start=!("start" in _578)?function(){
return +d.style(_578.node,"opacity")||0;
}:_578.start;
_579.end=_578.end;
var anim=d.animateProperty(_578);
d.connect(anim,"beforeBegin",d.partial(_574,_578.node));
return anim;
};
dojo.fadeIn=function(args){
return d._fade(_558({end:1},args));
};
dojo.fadeOut=function(args){
return d._fade(_558({end:0},args));
};
dojo._defaultEasing=function(n){
return 0.5+((Math.sin((n+1.5)*Math.PI))/2);
};
var _57e=function(_57f){
this._properties=_57f;
for(var p in _57f){
var prop=_57f[p];
if(prop.start instanceof d.Color){
prop.tempColor=new d.Color();
}
}
};
_57e.prototype.getValue=function(r){
var ret={};
for(var p in this._properties){
var prop=this._properties[p],_586=prop.start;
if(_586 instanceof d.Color){
ret[p]=d.blendColors(_586,prop.end,r,prop.tempColor).toCss();
}else{
if(!d.isArray(_586)){
ret[p]=((prop.end-_586)*r)+_586+(p!="opacity"?prop.units||"px":0);
}
}
}
return ret;
};
dojo.animateProperty=function(args){
args.node=d.byId(args.node);
if(!args.easing){
args.easing=d._defaultEasing;
}
var anim=new d._Animation(args);
d.connect(anim,"beforeBegin",anim,function(){
var pm={};
for(var p in this.properties){
if(p=="width"||p=="height"){
this.node.display="block";
}
var prop=this.properties[p];
prop=pm[p]=_558({},(d.isObject(prop)?prop:{end:prop}));
if(d.isFunction(prop.start)){
prop.start=prop.start();
}
if(d.isFunction(prop.end)){
prop.end=prop.end();
}
var _58c=(p.toLowerCase().indexOf("color")>=0);
function _58d(node,p){
var v={height:node.offsetHeight,width:node.offsetWidth}[p];
if(v!==undefined){
return v;
}
v=d.style(node,p);
return (p=="opacity")?+v:(_58c?v:parseFloat(v));
};
if(!("end" in prop)){
prop.end=_58d(this.node,p);
}else{
if(!("start" in prop)){
prop.start=_58d(this.node,p);
}
}
if(_58c){
prop.start=new d.Color(prop.start);
prop.end=new d.Color(prop.end);
}else{
prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start);
}
}
this.curve=new _57e(pm);
});
d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));
return anim;
};
dojo.anim=function(node,_592,_593,_594,_595,_596){
return d.animateProperty({node:node,duration:_593||d._Animation.prototype.duration,properties:_592,easing:_594,onEnd:_595}).play(_596||0);
};
})();
}
if(!dojo._hasResource["dojo.i18n"]){
dojo._hasResource["dojo.i18n"]=true;
dojo.provide("dojo.i18n");
dojo.i18n.getLocalization=function(_597,_598,_599){
_599=dojo.i18n.normalizeLocale(_599);
var _59a=_599.split("-");
var _59b=[_597,"nls",_598].join(".");
var _59c=dojo._loadedModules[_59b];
if(_59c){
var _59d;
for(var i=_59a.length;i>0;i--){
var loc=_59a.slice(0,i).join("_");
if(_59c[loc]){
_59d=_59c[loc];
break;
}
}
if(!_59d){
_59d=_59c.ROOT;
}
if(_59d){
var _5a0=function(){
};
_5a0.prototype=_59d;
return new _5a0();
}
}
throw new Error("Bundle not found: "+_598+" in "+_597+" , locale="+_599);
};
dojo.i18n.normalizeLocale=function(_5a1){
var _5a2=_5a1?_5a1.toLowerCase():dojo.locale;
if(_5a2=="root"){
_5a2="ROOT";
}
return _5a2;
};
dojo.i18n._requireLocalization=function(_5a3,_5a4,_5a5,_5a6){
var _5a7=dojo.i18n.normalizeLocale(_5a5);
var _5a8=[_5a3,"nls",_5a4].join(".");
var _5a9="";
if(_5a6){
var _5aa=_5a6.split(",");
for(var i=0;i<_5aa.length;i++){
if(_5a7["indexOf"](_5aa[i])==0){
if(_5aa[i].length>_5a9.length){
_5a9=_5aa[i];
}
}
}
if(!_5a9){
_5a9="ROOT";
}
}
var _5ac=_5a6?_5a9:_5a7;
var _5ad=dojo._loadedModules[_5a8];
var _5ae=null;
if(_5ad){
if(dojo.config.localizationComplete&&_5ad._built){
return;
}
var _5af=_5ac.replace(/-/g,"_");
var _5b0=_5a8+"."+_5af;
_5ae=dojo._loadedModules[_5b0];
}
if(!_5ae){
_5ad=dojo["provide"](_5a8);
var syms=dojo._getModuleSymbols(_5a3);
var _5b2=syms.concat("nls").join("/");
var _5b3;
dojo.i18n._searchLocalePath(_5ac,_5a6,function(loc){
var _5b5=loc.replace(/-/g,"_");
var _5b6=_5a8+"."+_5b5;
var _5b7=false;
if(!dojo._loadedModules[_5b6]){
dojo["provide"](_5b6);
var _5b8=[_5b2];
if(loc!="ROOT"){
_5b8.push(loc);
}
_5b8.push(_5a4);
var _5b9=_5b8.join("/")+".js";
_5b7=dojo._loadPath(_5b9,null,function(hash){
var _5bb=function(){
};
_5bb.prototype=_5b3;
_5ad[_5b5]=new _5bb();
for(var j in hash){
_5ad[_5b5][j]=hash[j];
}
});
}else{
_5b7=true;
}
if(_5b7&&_5ad[_5b5]){
_5b3=_5ad[_5b5];
}else{
_5ad[_5b5]=_5b3;
}
if(_5a6){
return true;
}
});
}
if(_5a6&&_5a7!=_5a9){
_5ad[_5a7.replace(/-/g,"_")]=_5ad[_5a9.replace(/-/g,"_")];
}
};
(function(){
var _5bd=dojo.config.extraLocale;
if(_5bd){
if(!_5bd instanceof Array){
_5bd=[_5bd];
}
var req=dojo.i18n._requireLocalization;
dojo.i18n._requireLocalization=function(m,b,_5c1,_5c2){
req(m,b,_5c1,_5c2);
if(_5c1){
return;
}
for(var i=0;i<_5bd.length;i++){
req(m,b,_5bd[i],_5c2);
}
};
}
})();
dojo.i18n._searchLocalePath=function(_5c4,down,_5c6){
_5c4=dojo.i18n.normalizeLocale(_5c4);
var _5c7=_5c4.split("-");
var _5c8=[];
for(var i=_5c7.length;i>0;i--){
_5c8.push(_5c7.slice(0,i).join("-"));
}
_5c8.push(false);
if(down){
_5c8.reverse();
}
for(var j=_5c8.length-1;j>=0;j--){
var loc=_5c8[j]||"ROOT";
var stop=_5c6(loc);
if(stop){
break;
}
}
};
dojo.i18n._preloadLocalizations=function(_5cd,_5ce){
function _5cf(_5d0){
_5d0=dojo.i18n.normalizeLocale(_5d0);
dojo.i18n._searchLocalePath(_5d0,true,function(loc){
for(var i=0;i<_5ce.length;i++){
if(_5ce[i]==loc){
dojo["require"](_5cd+"_"+loc);
return true;
}
}
return false;
});
};
_5cf();
var _5d3=dojo.config.extraLocale||[];
for(var i=0;i<_5d3.length;i++){
_5cf(_5d3[i]);
}
};
}
if(!dojo._hasResource["dojo._base.browser"]){
dojo._hasResource["dojo._base.browser"]=true;
dojo.provide("dojo._base.browser");
dojo.forEach(dojo.config.require,function(i){
dojo["require"](i);
});
}
if(dojo.config.afterOnLoad&&dojo.isBrowser){
window.setTimeout(dojo._loadInit,1000);
}
})();
}
var SIX={};
SIX.loadedModule=new Object();
SIX.provide=function(_5d6){
SIX.loadedModule[_5d6]=true;
};
SIX.require=function(_5d7){
if(SIX.loadedModule[_5d7]){
return;
}
dojo.xhrGet({url:_5d7,sync:true,handleAs:"javascript",error:function(err){
alert("Error: could not load "+_5d7);
}});
SIX.provide(_5d7);
};
var IMAGE_WEB_SERVER_VERSION="9,3,0,94";
var IMAGE_WEB_SERVER_VERSION_DOT="9.3.0.94";
var ECW_NETSCAPE_MIME_TYPE="application/x-ImageWebServer2-ecw";
var ECW_NETSCAPE_TOOLBAR_MIME_TYPE="application/x-ImageWebServer-toolbar";
var ECW_NETSCAPE_PROGBAR_MIME_TYPE="application/x-ImageWebServer-progressbar";
var ECW_NETSCAPE_REG_NAME="plugins/IWS/ImageViewer";
var ECW_NETSCAPE_PLUGINS_PAGE="/ecwplugins/DownloadPlugin.htm";
var ECW_ACTIVEX_NAME="NCSViewManager.NCSLayeredView.1";
var ECW_ACTIVEX_CODEBASE="/ecwplugins/DownloadPlugin.htm";
var ECW_ACTIVEX_NCSVIEW_CLASSID="clsid:D147430C-86CD-4E6F-A807-93FBC496D201";
var ECW_ACTIVEX_NCSTOOLBAR_CLASSID="clsid:79E46020-ED4B-447A-B191-AD2A63AF51A1";
var ECW_ACTIVEX_NCSPROGBAR_CLASSID="clsid:584719E2-015C-438F-A012-0085270F8E63";
var ECW_JAVA_VIEWJARFILE="JNCSViewS.jar,JNCSGDT.jar";
var ECW_JAVA_GUIJARFILE="JNCSGui.jar";
var ECW_JAVA_JARCODEBASE="/ecwplugins";
var ECW_JAVA_APPLETCLASS="com.ermapper.view.JNCSViewApplet.class";
var ECW_JAVA_TOOLBARCLASS="com.ermapper.gui.JNCSToolbarApplet.class";
var ECW_JAVA_PROGBARCLASS="com.ermapper.gui.JNCSProgressbarApplet.class";
var ECW_JAVA_VM_CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";
var ECW_JAVA_VM_APPLET_TYPE="application/x-java-applet;version=1.4";
var ECW_JAVA_VM_IE_CODEBASE="http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,0";
var ECW_JAVA_VM_NS_CODEBASE="http://java.sun.com/products/plugin/index.html#download";
var PM_ROAM=0;
var PM_ZOOM=1;
var PM_POINTER=2;
var PM_ZOOMBOX=3;
var GM_NONE=0;
var GM_WINDOW=1;
var GM_SCREEN=2;
var MVK_CONTROL=8;
var MVK_LBUTTON=1;
var MVK_MBUTTON=16;
var MVK_RBUTTON=2;
var MVK_SHIFT=4;
var PARAM_VIEW_NONE=0;
var PARAM_VIEW_STYLE=1;
var PARAM_VIEW_ONMOUSEDOWN=2;
var PARAM_VIEW_ONMOUSEMOVE=3;
var PARAM_VIEW_ONMOUSEUP=4;
var PARAM_VIEW_ONEXTENTCHANGE=5;
var PARAM_VIEW_ONPERCENTCOMPLETE=6;
var PARAM_VIEW_ONPOINTERMODECHANGE=7;
var PARAM_VIEW_ONLAYERRESPONSE=8;
var PARAM_VIEW_ONLOAD=9;
var PARAM_VIEW_BGCOLOR=10;
var PARAM_VIEW_ONDRAWBEGIN=11;
var PARAM_VIEW_ONDRAWEND=12;
var PARAM_VIEW_WINDOWLESS=13;
var PARAM_VIEW_ONERROR=14;
var PARAM_VIEW_ONGEOLINKMODECHANGE=15;
var NCSViewParamNames=new Array("","","onMouseDown","onMouseMove","onMouseUp","onExtentChange","onPercentComplete","onPointerModeChange","onLayerResponse","onLoad","bgcolor","onDrawBegin","onDrawEnd","windowless","onError","onGeolinkModeChange");
var ERROR_CONNECTION_LOST=75;
var PARAM_TOOLBAR_NONE=0;
var PARAM_TOOLBAR_STYLE=1;
var PARAM_TOOLBAR_ONPOINTERMODECHANGE=2;
var PARAM_TOOLBAR_ONSETEXTENTSALL=3;
var PARAM_TOOLBAR_ONHELP=4;
var PARAM_TOOLBAR_CELLSPACING=5;
var PARAM_TOOLBAR_BGCOLOR=6;
var PARAM_TOOLBAR_LAYERED=7;
var NCSToolbarParamNames=new Array("","","onPointerModeChange","onSetExtentsAll","onHelp","cellSpacing","bgcolor","layeredToolbar");
var PARAM_PROGBAR_NONE=0;
var PARAM_PROGBAR_STYLE=1;
var PARAM_PROGBAR_BGCOLOR=2;
var PARAM_PROGBAR_FGCOLOR=3;
var PARAM_PROGBAR_SOLID=4;
var NCSProgbarParamNames=new Array("","","bgcolor","fgcolor","solid");
function WriteCopyright(){
document.writeln("¸1999-2007 <A href='http://www.ermapper.com' target=_blank>ER Mapper</A>");
};
function setCookie(name,_5da){
setCookieIntern(name,_5da,null,null,null,null);
};
function setCookieIntern(name,_5dc,_5dd,path,_5df,_5e0){
var _5e1=name+"="+escape(_5dc)+((_5dd)?"; expires="+_5dd.toGMTString():"")+((path)?"; path="+path:"")+((_5df)?"; domain="+_5df:"")+((_5e0)?"; secure":"");
document.cookie=_5e1;
};
function getCookie(name){
var dc=document.cookie;
var _5e4=name+"=";
var _5e5=dc.indexOf("; "+_5e4);
if(_5e5==-1){
_5e5=dc.indexOf(_5e4);
if(_5e5!=0){
return null;
}
}else{
_5e5+=2;
}
var end=document.cookie.indexOf(";",_5e5);
if(end==-1){
end=dc.length;
}
return unescape(dc.substring(_5e5+_5e4.length,end));
};
function deleteCookie(name,path,_5e9){
if(getCookie(name)){
document.cookie=name+"="+((path)?"; path="+path:"")+((_5e9)?"; domain="+_5e9:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
};
function cookiesEnabled(){
var _5ea=document.cookie;
var _5eb=true;
document.cookie="test=cookiesEnabled";
var pos=document.cookie.indexOf("test=");
if(pos==-1){
_5eb=false;
}
document.cookie=_5ea;
return _5eb;
};
function NCSColorList(){
};
function getPluginInstallMethod(name){
var name="NCSPluginInstallMethod";
var _5ee=name+"=";
var _5ef=document.cookie.indexOf(_5ee);
if(_5ef==-1){
return null;
}
var _5f0=document.cookie.indexOf(";",_5ef+_5ee.length);
if(_5f0==-1){
_5f0=document.cookie.length;
}
return unescape(document.cookie.substring(_5ef+_5ee.length,_5f0));
};
function ECWCheck(){
var _5f1=navigator.appName;
var _5f2=navigator.userAgent.toLowerCase();
var _5f3=parseFloat(navigator.appVersion);
var _5f4=0;
if(_5f2.indexOf("opera")!=-1){
_5f4=0;
}else{
if(_5f1=="Netscape"&&_5f3>=4.5&&_5f3<5){
_5f4=2;
}else{
if(_5f1=="Netscape"&&_5f3>=5){
_5f4=3;
}else{
if(_5f1=="Microsoft Internet Explorer"&&_5f3>=4){
_5f4=1;
}
}
}
}
if(_5f2.indexOf("win")!=-1){
sPlatform="Windows";
}else{
if(_5f2.indexOf("mac")!=-1){
sPlatform="Macintosh";
}else{
if(_5f2.indexOf("sunos")!=-1){
sPlatform="Solaris";
}else{
if(_5f2.indexOf("linux")!=-1){
sPlatform="Linux";
}else{
sPlatform="Unknown";
_5f4=0;
}
}
}
}
if(_5f4>0){
if(sPlatform=="Windows"){
if(getPluginInstallMethod("NCSPluginInstallMethod")=="JAVA"){
_5f4=5;
}else{
if((_5f4==2)||(_5f4==3)){
if(ECWCheckNetscape(ECW_NETSCAPE_MIME_TYPE,IMAGE_WEB_SERVER_VERSION_DOT)==0){
_5f4=-1;
}
}else{
if(_5f4==1){
if(ECWCheckActiveX(ECW_ACTIVEX_NAME,IMAGE_WEB_SERVER_VERSION)==0){
_5f4=-1;
}
}
}
}
}else{
if(sPlatform=="Macintosh"){
if(_5f2.indexOf("applewebkit")!=-1){
var str=navigator.appVersion.split("Safari/");
if(parseFloat(str[1])>=125.11){
_5f4=5;
}else{
_5f4=0;
}
}else{
if(_5f2.indexOf("gecko")!=-1&&_5f2.indexOf("firefox")){
_5f4=6;
}else{
alert("Your browser is unsuported on the Macintosh platform. To use Java on the Macintosh, please try Safari 1.2.4 or later (OS X 10.3)");
_5f4=0;
}
}
}else{
if(((sPlatform=="Solaris")||(sPlatform=="Linux"))&&((_5f4==2)||(_5f4==3))){
_5f4=5;
}else{
_5f4=0;
}
}
}
}
if(_5f4==0||(getPluginInstallMethod("NCSPluginInstallMethod")=="HTML")){
_5f4=6;
}
return (_5f4);
};
function ECWCheckPlugin(){
nResult=ECWCheck();
if(nResult==0){
if((typeof ECWNoPluginUrl!="undefined")&&(typeof ECWNoPluginLocation!="undefined")){
if(document.images){
ECWNoPluginLocation=ECWNoPluginUrl;
}else{
ECWNoPluginLocation.href=ECWNoPluginUrl;
}
}else{
if(document.images){
location="/ecwplugins/Sorry.htm";
}else{
location.href="/ecwplugins/Sorry.htm";
}
}
return false;
}else{
if(nResult==-1){
if((navigator.appName.indexOf("Netscape")!=-1&&parseFloat(navigator.appVersion)>=5)||(navigator.appName.indexOf("Microsoft")!=-1)){
location.href="/ecwplugins/DownloadPlugin.htm?url="+encodeURIComponent(location.href);
}else{
location.href="/ecwplugins/Sorry.htm";
}
return false;
}
}
return true;
};
function ECWCheckNetscape(_5f6,_5f7){
var _5f8=navigator.plugins.length;
if(_5f8>0){
if(navigator.mimeTypes&&navigator.mimeTypes[_5f6]&&navigator.mimeTypes[_5f6].enabledPlugin){
var _5f9=navigator.mimeTypes[_5f6].enabledPlugin.name;
var _5fa=_5f9.split(" ");
var _5fb=_5fa[_5fa.length-1];
var _5fc=_5f7.split(".");
var _5fd=_5fb.split(",");
try{
if(parseInt(_5fd[0],10)==parseInt(_5fc[0],10)){
if(parseInt(_5fd[1],10)==parseInt(_5fc[1],10)){
if(parseInt(_5fd[2],10)==parseInt(_5fc[2],10)){
if(parseInt(_5fd[3],10)>=parseInt(_5fc[3],10)){
return (1);
}
}else{
if(parseInt(_5fd[2],10)>parseInt(_5fc[2],10)){
return (1);
}
}
}else{
if(parseInt(_5fd[1],10)>parseInt(_5fc[1],10)){
return (1);
}
}
}else{
if(parseInt(_5fd[0],10)>parseInt(_5fc[0],10)){
return (1);
}
}
}
catch(e){
}
return (0);
}else{
return (0);
}
}
return (1);
};
function NeedFunction(_5fe,_5ff){
for(var i=3;i<_5fe.length;i++){
if((typeof (_5fe[i])=="number")&&(_5fe[i]==_5ff)){
return (true);
}
}
return (false);
};
function GetFunctionParameter(_601,_602){
for(var i=3;i<_601.length;i++){
if((typeof (_601[i])=="number")&&(_601[i]==_602)&&(i<_601.length-1)&&(typeof (_601[i+1])=="string")){
return (_601[i+1]);
}
}
return ("");
};
function WriteFunctionParameter(_604,_605,_606,_607,_608,_609){
var _60a="";
if(NeedFunction(_607,_606)){
sParam=GetFunctionParameter(_607,_606);
if(_609==false){
if(_608){
_60a+="\t\t<param ";
}else{
_60a+="\t";
}
if(_608){
if(sParam!=""){
_60a+="name=\""+_605[_606]+"\" value=\""+sParam+"\"";
}
}else{
if(sParam!=""){
_60a+=_605[_606]+"=\""+sParam+"\"";
}
}
if(_608){
_60a+=">";
}else{
_60a+="";
}
}else{
_60a+=_604+".SetCallbackName(\""+_605[_606]+"\", \""+sParam+"\");";
}
}
return _60a;
};
function NCSCreateView(){
var _60b=NCSCreateViewReturnString(NCSCreateView.arguments);
document.write(_60b);
};
function NCSCreateViewReturnString(_60c){
var _60d="";
var _60e=navigator.userAgent.toLowerCase();
var _60f=(ECWCheck()>=5)?false:true;
var _610=(ECWCheck()==6)?true:false;
var _611=(navigator.userAgent.indexOf("Mac")!=-1)?true:false;
var _612=false;
if(_60c.length>=1){
sName=_60c[0];
if(_60c.length>=2){
sWidth=_60c[1];
if(_60c.length>=3){
sHeight=_60c[2];
}
}
}
if(_60f){
if(_60e.indexOf("msie")!=-1){
_60d+="\t  <OBJECT id=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\"";
_60d+="\t  classid=\""+ECW_ACTIVEX_NCSVIEW_CLASSID+"\" codebase=\""+ECW_ACTIVEX_CODEBASE+"\"";
_612=true;
}else{
if(_611){
_60d+="\t  <OBJECT type=\""+ECW_NETSCAPE_MIME_TYPE+"\"id=\""+sName+"\" name=\""+sName+"\"";
_60d+="\t  width=\""+sWidth+"\" height=\""+sHeight+"\" "+"\" codebase=\""+ECW_NETSCAPE_PLUGINS_PAGE+"\"";
_612=false;
}else{
_60d+="\t  <OBJECT><EMBED name=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\"";
_60d+="\t  type=\""+ECW_NETSCAPE_MIME_TYPE+"\" pluginspage=\""+ECW_NETSCAPE_PLUGINS_PAGE+"\"";
_612=false;
}
}
}else{
if(_610==false){
if(_60e.indexOf("applewebkit")!=-1){
_60d+="\t<APPLET name=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\" hspace=\"0\" vspace=\"0\"";
_60d+="\tcode=\""+ECW_JAVA_APPLETCLASS+"\" ARCHIVE=\""+ECW_JAVA_VIEWJARFILE+"\" CODEBASE=\""+ECW_JAVA_JARCODEBASE+"\" MAYSCRIPT=\"true\" > ";
_612=true;
}else{
if(_60e.indexOf("msie")!=-1){
_60d+="<OBJECT classid=\""+ECW_JAVA_VM_CLASSID+"\" ";
_60d+="type=\""+ECW_JAVA_VM_APPLET_TYPE+"\" ";
_60d+="name=\""+sName+"\" id=\""+sName+"\" ";
_60d+="width=\""+sWidth+"\" height=\""+sHeight+"\" hspace=\"0\" vspace=\"0\" ";
_60d+="codebase=\""+ECW_JAVA_VM_IE_CODEBASE+"\" > ";
_60d+="<PARAM NAME=\"CODE\" VALUE=\""+ECW_JAVA_APPLETCLASS+"\"> ";
_60d+="<PARAM NAME=\"ARCHIVE\" VALUE=\""+ECW_JAVA_VIEWJARFILE+"\"> ";
_60d+="<PARAM NAME=\"CODEBASE\" VALUE=\""+ECW_JAVA_JARCODEBASE+"\"> ";
_60d+="<PARAM NAME=\"scriptable\" VALUE=\"true\"> ";
_60d+="<PARAM NAME=\"type\" VALUE=\""+ECW_JAVA_VM_APPLET_TYPE+"\"> ";
_612=true;
}else{
if(_60e.indexOf("mozilla")!=-1&&_60e.indexOf("gecko")!=-1){
_60d+="\t<OBJECT><EMBED  ID=\""+sName+"\" NAME=\""+sName+"\" WIDTH=\""+sWidth+"\" HEIGHT=\""+sHeight+"\" ";
_60d+="\ttype=\""+ECW_JAVA_VM_APPLET_TYPE+"\" ";
_60d+="\tJAVA_CODE=\""+ECW_JAVA_APPLETCLASS+"\" archive=\""+ECW_JAVA_VIEWJARFILE+"\"  codebase=\""+ECW_JAVA_JARCODEBASE+"\"  ";
_60d+="\tpluginspage=\""+ECW_JAVA_VM_NS_CODEBASE+"\" mayscript=\"true\" scriptable=\"true\" ";
_612=false;
}else{
_60d+="\t<APPLET name=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\" hspace=\"0\" vspace=\"0\" ";
_60d+="\tcode=\""+ECW_JAVA_APPLETCLASS+"\" ARCHIVE=\""+ECW_JAVA_VIEWJARFILE+"\" CODEBASE=\""+ECW_JAVA_JARCODEBASE+"\" MAYSCRIPT=\"true\" > ";
_612=true;
}
}
}
}else{
_60d+="\t<SCRIPT language=\"javascript\">";
_60d+="var "+sName+"=new NCSJSView(\""+sWidth+"\",\""+sHeight+"\");";
_60d+="document."+sName+"="+sName+";";
}
}
if(_610==false&&NeedFunction(_60c,PARAM_VIEW_STYLE)){
var _613=GetFunctionParameter(_60c,PARAM_VIEW_STYLE);
_60d+="\n\t  style=\""+_613+"\"";
}
if(_612&&_60f){
_60d+=">";
}
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONMOUSEDOWN,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONMOUSEMOVE,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONMOUSEUP,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONEXTENTCHANGE,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONPERCENTCOMPLETE,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONLAYERRESPONSE,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONLOAD,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_BGCOLOR,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONDRAWBEGIN,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONDRAWEND,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_WINDOWLESS,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONERROR,_60c,_612,_610);
_60d+=WriteFunctionParameter(sName,NCSViewParamNames,PARAM_VIEW_ONGEOLINKMODECHANGE,_60c,_612,_610);
if(_60f){
if(!_612){
_60d+=">";
}
_60d+="</OBJECT>";
}else{
if(_610==false){
if(!_612){
_60d+=">";
}
if(_60e.indexOf("applewebkit")!=-1){
_60d+="</APPLET>";
}else{
if(_60e.indexOf("msie")!=-1){
_60d+="</OBJECT>";
}else{
if(_60e.indexOf("mozilla")!=-1&&_60e.indexOf("gecko")!=-1){
_60d+="</EMBED></OBJECT>";
}else{
_60d+="</APPLET>";
}
}
}
}else{
_60d+="</SCRIPT>";
}
}
return _60d;
};
function NCSCreateToolbar(){
var _614=false;
var _615=(ECWCheck()==5)?false:true;
var _616=(navigator.userAgent.indexOf("Mac")!=-1)?true:false;
sName="ECWToolbar1";
sWidth="178px";
sHeight="30px";
if(NCSCreateToolbar.arguments.length>=1){
sName=NCSCreateToolbar.arguments[0];
}
if(NCSCreateToolbar.arguments.length>=2){
sWidth=NCSCreateToolbar.arguments[1];
}
if(NCSCreateToolbar.arguments.length>=3){
sHeight=NCSCreateToolbar.arguments[2];
}
if(_615){
if(navigator.userAgent.indexOf("MSIE")!=-1){
document.writeln("\t  <OBJECT id=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\"");
document.writeln("\t  classid=\""+ECW_ACTIVEX_NCSTOOLBAR_CLASSID+"\" codebase=\""+ECW_ACTIVEX_CODEBASE+"\"");
_614=true;
}else{
if(_616){
document.writeln("\t  <OBJECT type=\""+ECW_NETSCAPE_TOOLBAR_MIME_TYPE+"\"id=\""+sName+"\" name=\""+sName+"\"");
document.writeln("\t  width=\""+sWidth+"\" height=\""+sHeight+"\" "+"\" codebase=\""+ECW_NETSCAPE_PLUGINS_PAGE+"\"");
}else{
document.writeln("\t  <OBJECT><EMBED name=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\"");
document.writeln("\t  type=\""+ECW_NETSCAPE_TOOLBAR_MIME_TYPE+"\" pluginspage=\""+ECW_NETSCAPE_PLUGINS_PAGE+"\"");
}
}
}else{
document.writeln("\t<APPLET name=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\" hspace=\"0\" vspace=\"0\" cellspacing=2 bgcolor='#ffffff'");
document.writeln("\tcode=\""+ECW_JAVA_TOOLBARCLASS+"\" ARCHIVE=\""+ECW_JAVA_GUIJARFILE+"\" CODEBASE=\""+ECW_JAVA_JARCODEBASE+"\" MAYSCRIPT=\"true\">");
}
if(NeedFunction(NCSCreateToolbar.arguments,PARAM_TOOLBAR_STYLE)){
var _617=GetFunctionParameter(NCSCreateToolbar.arguments,PARAM_TOOLBAR_STYLE);
document.write("\n\t  style=\""+_617+"\"");
}
if(_614||_616){
document.writeln(">");
}else{
document.writeln("");
}
WriteFunctionParameter(sName,NCSToolbarParamNames,PARAM_TOOLBAR_ONHELP,NCSCreateToolbar.arguments,_614||!_615||_616,false);
WriteFunctionParameter(sName,NCSToolbarParamNames,PARAM_TOOLBAR_ONPOINTERMODECHANGE,NCSCreateToolbar.arguments,_614||!_615||_616,false);
WriteFunctionParameter(sName,NCSToolbarParamNames,PARAM_TOOLBAR_ONSETEXTENTSALL,NCSCreateToolbar.arguments,_614||!_615||_616,false);
WriteFunctionParameter(sName,NCSToolbarParamNames,PARAM_TOOLBAR_CELLSPACING,NCSCreateToolbar.arguments,_614||!_615||_616,false);
WriteFunctionParameter(sName,NCSToolbarParamNames,PARAM_TOOLBAR_BGCOLOR,NCSCreateToolbar.arguments,_614||!_615||_616,false);
WriteFunctionParameter(sName,NCSToolbarParamNames,PARAM_TOOLBAR_LAYERED,NCSCreateToolbar.arguments,_614||!_615||_616,false);
if(_614||_616){
document.writeln("\t  </OBJECT>");
}else{
if(_615){
document.writeln("></OBJECT>");
}else{
document.writeln("</APPLET>");
}
}
};
function NCSCreateProgressbar(){
var _618=false;
var _619=(ECWCheck()==5)?false:true;
var _61a=(navigator.userAgent.indexOf("Mac")!=-1)?true:false;
sName="ECWProgressbar1";
sWidth="178px";
sHeight="30px";
if(NCSCreateProgressbar.arguments.length>=1){
sName=NCSCreateProgressbar.arguments[0];
}
if(NCSCreateProgressbar.arguments.length>=2){
sWidth=NCSCreateProgressbar.arguments[1];
}
if(NCSCreateProgressbar.arguments.length>=3){
sHeight=NCSCreateProgressbar.arguments[2];
}
if(_619){
if(navigator.userAgent.indexOf("MSIE")!=-1){
document.writeln("\t  <OBJECT id=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\"");
document.writeln("\t  classid=\""+ECW_ACTIVEX_NCSPROGBAR_CLASSID+"\" codebase=\""+ECW_ACTIVEX_CODEBASE+"\"");
_618=true;
}else{
if(_61a){
document.writeln("\t  <OBJECT type=\""+ECW_NETSCAPE_PROGBAR_MIME_TYPE+"\"id=\""+sName+"\" name=\""+sName+"\"");
document.writeln("\t  width=\""+sWidth+"\" height=\""+sHeight+"\" "+"\" codebase=\""+ECW_NETSCAPE_PLUGINS_PAGE+"\"");
}else{
document.writeln("\t  <OBJECT><EMBED name=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\"");
document.writeln("\t  type=\""+ECW_NETSCAPE_PROGBAR_MIME_TYPE+"\" pluginspage=\""+ECW_NETSCAPE_PLUGINS_PAGE+"\"");
}
}
}else{
document.writeln("\t<APPLET name=\""+sName+"\" width=\""+sWidth+"\" height=\""+sHeight+"\" hspace=\"0\" vspace=\"0\" cellspacing=2 bgcolor='#ffffff'");
document.writeln("\tcode=\""+ECW_JAVA_PROGBARCLASS+"\" ARCHIVE=\""+ECW_JAVA_GUIJARFILE+"\" CODEBASE=\""+ECW_JAVA_JARCODEBASE+"\" MAYSCRIPT=\"true\">");
}
if(NeedFunction(NCSCreateProgressbar.arguments,PARAM_PROGBAR_STYLE)){
var _61b=GetFunctionParameter(NCSCreateProgressbar.arguments,PARAM_PROGBAR_STYLE);
document.write("\n\t  style=\""+_61b+"\"");
}
if(_618||_61a){
document.writeln(">");
}else{
document.writeln("");
}
WriteFunctionParameter(sName,NCSProgbarParamNames,PARAM_PROGBAR_FGCOLOR,NCSCreateProgressbar.arguments,_618||!_619||_61a,false);
WriteFunctionParameter(sName,NCSProgbarParamNames,PARAM_PROGBAR_BGCOLOR,NCSCreateProgressbar.arguments,_618||!_619||_61a,false);
WriteFunctionParameter(sName,NCSProgbarParamNames,PARAM_PROGBAR_SOLID,NCSCreateProgressbar.arguments,_618||!_619||_61a,false);
if(_618||_61a){
document.writeln("\t  </OBJECT>");
}else{
if(_619){
document.writeln("></OBJECT>");
}else{
document.writeln("</APPLET>");
}
}
};
var nNCSControls=0;
var aNCSControls=new Array();
function NCSControl(uid,_61d){
if(arguments.length>0){
this.init(uid,_61d);
}
};
NCSControl.prototype.init=function(uid,_61f){
this.uid=uid;
if(_61f!=null){
this.element=document.getElementById(_61f);
}else{
this.element=null;
}
this.addObject(this);
};
NCSControl.prototype.addObject=function(obj){
nNCSControls++;
aNCSControls[nNCSControls]=obj;
obj.myself="aNCSControls["+nNCSControls+"]";
};
NCSControl.prototype.build=function(){
return "NCSControl subclass has not implemented the build method";
};
SIX.provide("json2.js");
if(!this.JSON){
JSON={};
}
(function(){
function f(n){
return n<10?"0"+n:n;
};
if(typeof Date.prototype.toJSON!=="function"){
Date.prototype.toJSON=function(key){
return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z";
};
String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){
return this.valueOf();
};
}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_626=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,_628,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},rep;
function _62b(_62c){
_626.lastIndex=0;
return _626.test(_62c)?"\""+_62c.replace(_626,function(a){
var c=meta[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
})+"\"":"\""+_62c+"\"";
};
function str(key,_631){
var i,k,v,_635,mind=gap,_637,_638=_631[key];
if(_638&&typeof _638==="object"&&typeof _638.toJSON==="function"){
_638=_638.toJSON(key);
}
if(typeof rep==="function"){
_638=rep.call(_631,key,_638);
}
switch(typeof _638){
case "string":
return _62b(_638);
case "number":
return isFinite(_638)?String(_638):"null";
case "boolean":
case "null":
return String(_638);
case "object":
if(!_638){
return "null";
}
gap+=_628;
_637=[];
if(Object.prototype.toString.apply(_638)==="[object Array]"){
_635=_638.length;
for(i=0;i<_635;i+=1){
_637[i]=str(i,_638)||"null";
}
v=_637.length===0?"[]":gap?"[\n"+gap+_637.join(",\n"+gap)+"\n"+mind+"]":"["+_637.join(",")+"]";
gap=mind;
return v;
}
if(rep&&typeof rep==="object"){
_635=rep.length;
for(i=0;i<_635;i+=1){
k=rep[i];
if(typeof k==="string"){
v=str(k,_638);
if(v){
_637.push(_62b(k)+(gap?": ":":")+v);
}
}
}
}else{
for(k in _638){
if(Object.hasOwnProperty.call(_638,k)){
v=str(k,_638);
if(v){
_637.push(_62b(k)+(gap?": ":":")+v);
}
}
}
}
v=_637.length===0?"{}":gap?"{\n"+gap+_637.join(",\n"+gap)+"\n"+mind+"}":"{"+_637.join(",")+"}";
gap=mind;
return v;
}
};
if(typeof JSON.stringify!=="function"){
JSON.stringify=function(_639,_63a,_63b){
var i;
gap="";
_628="";
if(typeof _63b==="number"){
for(i=0;i<_63b;i+=1){
_628+=" ";
}
}else{
if(typeof _63b==="string"){
_628=_63b;
}
}
rep=_63a;
if(_63a&&typeof _63a!=="function"&&(typeof _63a!=="object"||typeof _63a.length!=="number")){
throw new Error("JSON.stringify");
}
return str("",{"":_639});
};
}
if(typeof JSON.parse!=="function"){
JSON.parse=function(text,_63e){
var j;
function walk(_641,key){
var k,v,_645=_641[key];
if(_645&&typeof _645==="object"){
for(k in _645){
if(Object.hasOwnProperty.call(_645,k)){
v=walk(_645,k);
if(v!==undefined){
_645[k]=v;
}else{
delete _645[k];
}
}
}
}
return _63e.call(_641,key,_645);
};
cx.lastIndex=0;
if(cx.test(text)){
text=text.replace(cx,function(a){
return "\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
});
}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
j=eval("("+text+")");
return typeof _63e==="function"?walk({"":j},""):j;
}
throw new SyntaxError("JSON.parse");
};
}
}());
SIX.provide("GDT_EPSG_Mappings.js");
var GDTEPSGMappings=new Object();
GDTEPSGMappings.objGDTToEPSG=new Object();
GDTEPSGMappings.objEPSGToGDT=new Object();
GDTEPSGMappings.aGDTEPSG=[[3149,"INDIAN60","NUTM49",null],[4283,"GDA94","GEODETIC",null],[4326,"WGS84","GEODETIC",null],[19926,"PULKOVO","ROS4270",null],[20137,"ADINDAN","NUTM37",null],[20138,"ADINDAN","NUTM38",null],[20248,"AGD66","TMAMG48",null],[20249,"AGD66","TMAMG49",null],[20250,"AGD66","TMAMG50",null],[20251,"AGD66","TMAMG51",null],[20252,"AGD66","TMAMG52",null],[20253,"AGD66","TMAMG53",null],[20254,"AGD66","TMAMG54",null],[20255,"AGD66","TMAMG55",null],[20256,"AGD66","TMAMG56",null],[20257,"AGD66","TMAMG57",null],[20258,"AGD66","TMAMG58",null],[20348,"AGD84","TMAMG48",null],[20349,"AGD84","TMAMG49",null],[20350,"AGD84","TMAMG50",null],[20351,"AGD84","TMAMG51",null],[20352,"AGD84","TMAMG52",null],[20353,"AGD84","TMAMG53",null],[20354,"AGD84","TMAMG54",null],[20355,"AGD84","TMAMG55",null],[20356,"AGD84","TMAMG56",null],[20357,"AGD84","TMAMG57",null],[20358,"AGD84","TMAMG58",null],[20437,"AINABD70","NUTM37",null],[20438,"AINABD70","NUTM38",null],[20439,"AINABD70","NUTM39",null],[20822,"ARATU","SUTM22",null],[20823,"ARATU","SUTM23",null],[20824,"ARATU","SUTM24",null],[20934,"ARC1950","SUTM34",null],[20935,"ARC1950","SUTM35",null],[20936,"ARC1950","SUTM36",null],[20973,"ARC1950","STMLO13",null],[20975,"ARC1950","STMLO15",null],[20977,"ARC1950","STMLO17",null],[20979,"ARC1950","STMLO19",null],[20981,"ARC1950","STMLO21",null],[20983,"ARC1950","STMLO23",null],[20985,"ARC1950","STMLO25",null],[20987,"ARC1950","STMLO27",null],[20989,"ARC1950","STMLO29",null],[20991,"ARC1950","STMLO31",null],[20993,"ARC1950","STMLO33",null],[20995,"ARC1950","STMLO35",null],[21035,"ARC1960","SUTM35",null],[21036,"ARC1960","SUTM36",null],[21037,"ARC1960","SUTM37",null],[21095,"ARC1960","NUTM35",null],[21096,"ARC1960","NUTM36",null],[21097,"ARC1960","NUTM37",null],[21148,"BATAVIA","SUTM48",null],[21149,"BATAVIA","SUTM49",null],[21150,"BATAVIA","SUTM50",null],[21817,"BOGOTA","NUTM17",null],[21818,"BOGOTA","NUTM18",null],[22032,"CAMACUPA","SUTM32",null],[22033,"CAMACUPA","SUTM33",null],[22191,"CMPOINCH","TMARG1",null],[22192,"CMPOINCH","TMARG2",null],[22193,"CMPOINCH","TMARG3",null],[22194,"CMPOINCH","TMARG4",null],[22195,"CMPOINCH","TMARG5",null],[22196,"CMPOINCH","TMARG6",null],[22197,"CMPOINCH","TMARG7",null],[22234,"CAPE","SUTM34",null],[22235,"CAPE","SUTM35",null],[22236,"CAPE","SUTM36",null],[22332,"CARTHAGE","NUTM32",null],[22992,"EGYPT07","TMEGYPTR",null],[22993,"EGYPT07","TMEGYPTP",null],[22994,"EGYPT07","TMEGYPTS",null],[23028,"ED50","NUTM28",null],[23029,"ED50","NUTM29",null],[23030,"ED50","NUTM30",null],[23031,"ED50","NUTM31",null],[23032,"ED50","NUTM32",null],[23033,"ED50","NUTM33",null],[23034,"ED50","NUTM34",null],[23035,"ED50","NUTM35",null],[23036,"ED50","NUTM36",null],[23037,"ED50","NUTM37",null],[23038,"ED50","NUTM38",null],[23239,"FAHUD","NUTM39",null],[23240,"FAHUD","NUTM40",null],[23846,"IND74","NUTM46",null],[23847,"IND74","NUTM47",null],[23848,"IND74","NUTM48",null],[23849,"IND74","NUTM49",null],[23850,"IND74","NUTM50",null],[23851,"IND74","NUTM51",null],[23852,"IND74","NUTM52",null],[23853,"IND74","NUTM53",null],[23886,"IND74","SUTM46",null],[23887,"IND74","SUTM47",null],[23888,"IND74","SUTM48",null],[23889,"IND74","SUTM49",null],[23890,"IND74","SUTM50",null],[23891,"IND74","SUTM51",null],[23892,"IND74","SUTM52",null],[23893,"IND74","SUTM53",null],[23894,"IND74","SUTM54",null],[23946,"INDIAN54","NUTM46",null],[23947,"INDIAN54","NUTM47",null],[23948,"INDIAN54","NUTM48",null],[24047,"INDIAN75","NUTM47",null],[24048,"INDIAN75","NUTM48",null],[24305,"KALIANPR","NUTM45",null],[24306,"KALIANPR","NUTM46",null],[24311,"KALIANPR","NUTM41",null],[24312,"KALIANPR","NUTM42",null],[24313,"KALIANPR","NUTM43",null],[24342,"KALIANPR","NUTM42",null],[24343,"KALIANPR","NUTM43",null],[24344,"KALIANPR","NUTM44",null],[24345,"KALIANPR","NUTM45",null],[24346,"KALIANPR","NUTM46",null],[24347,"KALIANPR","NUTM47",null],[24547,"KERTAU","NUTM47",null],[24548,"KERTAU","NUTM48",null],[24718,"LACANOA","NUTM18",null],[24719,"LACANOA","NUTM19",null],[24720,"LACANOA","NUTM20",null],[24721,"LACANOA","NUTM21",null],[24818,"PSAD56","NUTM18",null],[24819,"PSAD56","NUTM19",null],[24820,"PSAD56","NUTM20",null],[24821,"PSAD56","NUTM21",null],[24877,"PSAD56","SUTM17",null],[24878,"PSAD56","SUTM18",null],[24879,"PSAD56","SUTM19",null],[24880,"PSAD56","SUTM20",null],[24882,"PSAD56","SUTM22",null],[24891,"PSAD56","TMPERUW",null],[24892,"PSAD56","TMPERUC",null],[24893,"PSAD56","TMPERUE",null],[25391,"LUZON11","TMPHIL1",null],[25392,"LUZON11","TMPHIL2",null],[25393,"LUZON11","TMPHIL3",null],[25394,"LUZON11","TMPHIL4",null],[25395,"LUZON11","TMPHIL5",null],[26331,"MINAA","NUTM31",null],[26332,"MINAA","NUTM32",null],[26703,"NAD27","NUTM03",null],[26704,"NAD27","NUTM04",null],[26705,"NAD27","NUTM05",null],[26706,"NAD27","NUTM06",null],[26707,"NAD27","NUTM07",null],[26708,"NAD27","NUTM08",null],[26709,"NAD27","NUTM09",null],[26710,"NAD27","NUTM10",null],[26711,"NAD27","NUTM11",null],[26712,"NAD27","NUTM12",null],[26713,"NAD27","NUTM13",null],[26714,"NAD27","NUTM14",null],[26715,"NAD27","NUTM15",null],[26716,"NAD27","NUTM16",null],[26717,"NAD27","NUTM17",null],[26718,"NAD27","NUTM18",null],[26719,"NAD27","NUTM19",null],[26720,"NAD27","NUTM20",null],[26721,"NAD27","NUTM21",null],[26722,"NAD27","NUTM22",null],[26729,"NAD27","TMALABEF",null],[26729,"TMALABEF","NAD27",null],[26730,"NAD27","TMALABWF",null],[26730,"TMALABWF","NAD27",null],[26731,"NAD27","OMALSK1F",null],[26732,"NAD27","TMALSK2F",null],[26733,"NAD27","TMALSK3F",null],[26734,"NAD27","TMALSK4F",null],[26735,"NAD27","TMALSK5F",null],[26736,"NAD27","TMALSK6F",null],[26737,"NAD27","TMALSK7F",null],[26738,"NAD27","TMALSK8F",null],[26739,"NAD27","TMALSK9F",null],[26740,"NAD27","L2ALS10F",null],[26741,"NAD27","LM2CAL1F",null],[26742,"NAD27","LM2CAL2F",null],[26743,"NAD27","LM2CAL3F",null],[26744,"NAD27","LM2CAL4F",null],[26745,"NAD27","LM2CAL5F",null],[26746,"NAD27","LM2CAL6F",null],[26747,"NAD27","LM2CAL7F",null],[26748,"NAD27","TMARIZEF",null],[26749,"NAD27","TMARIZCF",null],[26750,"NAD27","TMALABWF",null],[26751,"NAD27","LM2ARKNF",null],[26752,"NAD27","LM2ARKSF",null],[26753,"NAD27","LM2COLNF",null],[26754,"NAD27","LM2COLCF",null],[26755,"NAD27","LM2COLSF",null],[26756,"NAD27","LM2CONNF",null],[26757,"NAD27","TMDELWRF",null],[26758,"NAD27","TMFLRAEF",null],[26759,"NAD27","TMFLRAWF",null],[26760,"NAD27","LM2FLANF",null],[26761,"NAD27","TMHAWI1F",null],[26762,"NAD27","TMHAWI2F",null],[26763,"NAD27","TMHAWI3F",null],[26764,"NAD27","TMHAWI4F",null],[26765,"NAD27","TMHAWI5F",null],[26766,"NAD27","TMGEOREF",null],[26767,"NAD27","TMGEORWF",null],[26768,"NAD27","TMIDAEFT",null],[26769,"NAD27","TMIDACFT",null],[26770,"NAD27","TMIDAWFT",null],[26771,"NAD27","TMILLEFT",null],[26772,"NAD27","TMILLWFT",null],[26773,"NAD27","TMINDEFT",null],[26774,"NAD27","TMINDWFT",null],[26775,"NAD27","LM2IOWNF",null],[26776,"NAD27","LM2IOWSF",null],[26777,"NAD27","LM2KANNF",null],[26778,"NAD27","L2KANSF",null],[26779,"NAD27","LM2KYNFT",null],[26780,"NAD27","LM2KYSFT",null],[26781,"NAD27","LM2LANFT",null],[26782,"NAD27","LM2LASFT",null],[26783,"NAD27","TMMAINEF",null],[26784,"NAD27","TMMAINWF",null],[26785,"NAD27","LM2MARYF",null],[26786,"NAD27","LM2MASMF",null],[26787,"NAD27","L2MASIF27",null],[26788,"NAD27","LM2MICNF",null],[26789,"NAD27","LM2MICCF",null],[26790,"NAD27","LM2MICSF",null],[26791,"NAD27","LM2MINNF",null],[26792,"NAD27","LM2MINCF",null],[26793,"NAD27","LM2MINSF",null],[26794,"NAD27","TMMISSEF",null],[26795,"NAD27","TMMISSWF",null],[26796,"NAD27","TMMISOEF",null],[26797,"NAD27","TMISOCF",null],[26798,"NAD27","TMMISOWF",null],[26801,"NAD27","TMMICHEF",null],[26802,"NAD27","TMMICHCF",null],[26803,"NAD27","TMMICHWF",null],[26903,"NAD83","NUTM03",null],[26904,"NAD83","NUTM04",null],[26905,"NAD83","NUTM05",null],[26906,"NAD83","NUTM06",null],[26907,"NAD83","NUTM07",null],[26908,"NAD83","NUTM08",null],[26909,"NAD83","NUTM09",null],[26910,"NAD83","NUTM10",null],[26911,"NAD83","NUTM11",null],[26912,"NAD83","NUTM12",null],[26913,"NAD83","NUTM13",null],[26914,"NAD83","NUTM14",null],[26915,"NAD83","NUTM15",null],[26916,"NAD83","NUTM16",null],[26917,"NAD83","NUTM17",null],[26918,"NAD83","NUTM18",null],[26919,"NAD83","NUTM19",null],[26920,"NAD83","NUTM20",null],[26921,"NAD83","NUTM21",null],[26922,"NAD83","NUTM22",null],[26923,"NAD83","NUTM23",null],[26929,"NAD83","TMALABEM",null],[26930,"NAD83","TMALABWM",null],[26931,"NAD83","OMALSK1M",null],[26932,"NAD83","TMALSK2M",null],[26933,"NAD83","TMALSK3M",null],[26934,"NAD83","TMALSK4M",null],[26935,"NAD83","TMALSK5M",null],[26936,"NAD83","TMALSK6M",null],[26937,"NAD83","TMALSK7M",null],[26938,"NAD83","TMALSK8M",null],[26939,"NAD83","TMALSK9M",null],[26940,"NAD83","L2ALS10M",null],[26941,"NAD83","L2CAL1M",null],[26942,"NAD83","L2CAL2M",null],[26943,"NAD83","L2CAL3M",null],[26944,"NAD83","L2CAL4M",null],[26945,"NAD83","LM2CAL5M",null],[26946,"NAD83","L2CAL6M",null],[26948,"NAD83","TMARIZEF83",null],[26949,"NAD83","TMARIZCF83",null],[26950,"NAD83","TMARIZWF83",null],[26951,"NAD83","LM2ARKNM",null],[26952,"NAD83","LM2ARKSM",null],[26953,"NAD83","L2COLNM",null],[26954,"NAD83","L2COLCM",null],[26955,"NAD83","L2COLSM",null],[26956,"NAD83","LM2CONNM",null],[26957,"NAD83","TMDELWRM",null],[26958,"NAD83","TMFLRAEM",null],[26959,"NAD83","TMFLRAWM",null],[26960,"NAD83","TMFLRANM",null],[26961,"NAD83","TMHAWI1M",null],[26962,"NAD83","TMHAWI2M",null],[26963,"NAD83","TMHAWI3M",null],[26964,"NAD83","TMHAWI4M",null],[26965,"NAD83","TMHAWI5M",null],[26966,"NAD83","TMGEOREM",null],[26967,"NAD83","TMGEORWM",null],[26968,"NAD83","TMIDAEM",null],[26969,"NAD83","TMIDACM",null],[26970,"NAD83","TMIDAWM",null],[26971,"NAD83","TMILLEM",null],[26972,"NAD83","TMILLWM",null],[26973,"NAD83","TMINDEM",null],[26974,"NAD83","TMINDWM",null],[26975,"NAD83","L2IOWNM",null],[26976,"NAD83","L2IOWSM",null],[26977,"NAD83","LM2KANNM",null],[26978,"NAD83","L2KANSM",null],[26979,"NAD83","LM2KYNM",null],[26980,"NAD83","L2KYSM",null],[26981,"NAD83","LM2LANM",null],[26982,"NAD83","LM2LASM",null],[26983,"NAD83","TMMAINEM",null],[26984,"NAD83","TMMAINWM",null],[26985,"NAD83","L2MARYM",null],[26986,"NAD83","L2MASMM",null],[26987,"NAD83","LM2MASIM",null],[26988,"NAD83","L2MICNM",null],[26989,"NAD83","L2MICCM",null],[26990,"NAD83","L2MICSM",null],[26991,"NAD83","L2MINNM",null],[26992,"NAD83","L2MINCM",null],[26993,"NAD83","L2MINSM",null],[26994,"NAD83","TMMISSEM",null],[26995,"NAD83","TMMISSWM",null],[26996,"NAD83","TMMISOEM",null],[26997,"NAD83","TMMISOCM",null],[26998,"NAD83","TMMISOWM",null],[27038,"NAHRWAN ","NUTM38",null],[27039,"NAHRWAN ","NUTM39",null],[27040,"NAHRWAN ","NUTM40",null],[27200,"NZGD49","NZMG",null],[27258,"NZGD49","SUTM58",null],[27259,"NZGD49","SUTM59",null],[27260,"NZGD49","SUTM60",null],[27581,"NTFPARIS","LM1FRE1D",null],[27582,"NTFPARIS","LM1FRE2D",null],[27583,"NTFPARIS","LM1FRE3D",null],[27591,"NTFPARIS","LM1FRA1D",null],[27592,"NTFPARIS","LM1FRA2D",null],[27593,"NTFPARIS","LM1FRA3D",null],[27700,"OSGB36","TMOSGB",null],[28348,"GDA94","MGA48",null],[28349,"GDA94","MGA49",null],[28350,"GDA94","MGA50",null],[28351,"GDA94","MGA51",null],[28352,"GDA94","MGA52",null],[28353,"GDA94","MGA53",null],[28354,"GDA94","MGA54",null],[28355,"GDA94","MGA55",null],[28356,"GDA94","MGA56",null],[28357,"GDA94","MGA57",null],[28358,"GDA94","MGA58",null],[28992,"RD","NUTM31",null],[29118,"SAD69","NUTM18",null],[29119,"SAD69","NUTM19",null],[29120,"SAD69","NUTM20",null],[29121,"SAD69","NUTM21",null],[29122,"SAD69","NUTM22",null],[29177,"SAD69","SUTM17",null],[29178,"SAD69","SUTM18",null],[29179,"SAD69","SUTM19",null],[29180,"SAD69","SUTM20",null],[29181,"SAD69","SUTM21",null],[29182,"SAD69","SUTM22",null],[29183,"SAD69","SUTM23",null],[29184,"SAD69","SUTM24",null],[29185,"SAD69","SUTM25",null],[29635,"SUDAN","NUTM35",null],[29636,"SUDAN","NUTM36",null],[29738,"TANANAR","SUTM38",null],[29739,"TANANAR","SUTM39",null],[29849,"TIMBALAI","NUTM49",null],[29850,"TIMBALAI","NUTM50",null],[29900,"TM65","TMOSIRL",null],[30339,"TRUCIAL","NUTM39",null],[30340,"TRUCIAL","NUTM40",null],[31028,"YOFF2000","NUTM28",null],[31700,"PULKOVO","ROS4270",null],[32001,"NAD27","LM2MTNFT",null],[32002,"NAD27","LM2MTCFT",null],[32003,"NAD27","LM2MTSFT",null],[32005,"NAD27","LM2NEBNF",null],[32006,"NAD27","LM2NEBSF",null],[32007,"NAD27","TMNEVAEF",null],[32008,"NAD27","TMNEVACF",null],[32009,"NAD27","TMNEVAWF",null],[32010,"NAD27","TMNEWHFT",null],[32011,"NAD27","TMNEWJFT",null],[32012,"NAD27","TMNEWMEF",null],[32013,"NAD27","TMNEWMCF",null],[32014,"NAD27","TMNEWMWF",null],[32015,"NAD27","TMNEWYEF",null],[32016,"NAD27","TMNEWYCF",null],[32017,"NAD27","TMNEWYWF",null],[32018,"NAD27","L2NEWYLIF",null],[32019,"NAD27","LM2NCAFT",null],[32020,"NAD27","LM2NDNFT",null],[32021,"NAD27","LM2NDSFT",null],[32022,"NAD27","LM2OHINF",null],[32023,"NAD27","LM2OHISF",null],[32024,"NAD27","LM2OKLNF",null],[32025,"NAD27","LM2OKLSF",null],[32026,"NAD27","LM2ORENF",null],[32027,"NAD27","LM2ORESF",null],[32028,"NAD27","LM2PANFT",null],[32029,"NAD27","LM2PASFT",null],[32030,"NAD27","TMRHODIF",null],[32031,"NAD27","LM2SCNFT",null],[32033,"NAD27","LM2SCSFT",null],[32034,"NAD27","LM2SDNFT",null],[32035,"NAD27","LM2SDSFT",null],[32036,"NAD27","L2TENNF27",null],[32037,"NAD27","L2TXNF27",null],[32038,"NAD27","LM2TXNCF",null],[32039,"NAD27","LM2TXCF",null],[32040,"NAD27","LM2TXSCF",null],[32041,"NAD27","LM2TXSF",null],[32042,"NAD27","LM2UTHNF",null],[32043,"NAD27","LM2UTHCF",null],[32044,"NAD27","LM2UTHSF",null],[32045,"NAD27","TMVERMTF",null],[32046,"NAD27","LM2VIRNF",null],[32047,"NAD27","LM2VIRSF",null],[32048,"NAD27","LM2WSHNF",null],[32049,"NAD27","LM2WSHSF",null],[32050,"NAD27","LM2WVANF",null],[32051,"NAD27","LM2WVASF",null],[32052,"NAD27","LM2WISNF",null],[32053,"NAD27","LM2WISCF",null],[32054,"NAD27","LM2WISSF",null],[32055,"NAD27","TMWY01FT",null],[32056,"NAD27","TMWY02FT",null],[32057,"NAD27","TMWY03FT",null],[32058,"NAD27","TMWY04FT",null],[32059,"NAD27","LM2PRV1F",null],[32060,"NAD27","LM2PRV2F",null],[32100,"NAD83","LM2MTM",null],[32104,"NAD83","LM2NEBM",null],[32107,"NAD83","TMNEVAEM",null],[32108,"NAD83","TMNEVACM",null],[32109,"NAD83","TMNEVAWM",null],[32110,"NAD83","TMNEWHM",null],[32111,"NAD83","TMNEWJM",null],[32112,"NAD83","TMNEWMEM",null],[32113,"NAD83","TMNEWMCM",null],[32114,"NAD83","TMNEWMWM",null],[32115,"NAD83","TMNEWYEM",null],[32116,"NAD83","TMNEWYCM",null],[32117,"NAD83","TMNEWYWM",null],[32118,"NAD83","L2NEWYM",null],[32119,"NAD83","L2NCAM",null],[32120,"NAD83","LM2NDNM",null],[32121,"NAD83","L2NDSM",null],[32122,"NAD83","L2OHINM",null],[32123,"NAD83","L2OHISM",null],[32124,"NAD83","LM2OKLNM",null],[32125,"NAD83","LM2OKLSM",null],[32126,"NAD83","L2ORENM",null],[32127,"NAD83","L2ORESM",null],[32128,"NAD83","L2PANM",null],[32129,"NAD83","L2PASM",null],[32130,"NAD83","TMRHODIM",null],[32133,"NAD83","L2SCM",null],[32134,"NAD83","L2SDNM",null],[32135,"NAD83","L2SDSM",null],[32136,"NAD83","L2TENNM",null],[32137,"NAD83","L2TXNM",null],[32138,"NAD83","LM2TXNCM",null],[32139,"NAD83","LM2TXCM",null],[32140,"NAD83","LM2TXSCM",null],[32141,"NAD83","LM2TXSM",null],[32142,"NAD83","L2UTHNM",null],[32143,"NAD83","L2UTHCM",null],[32144,"NAD83","L2UTHSM",null],[32145,"NAD83","TMVERMTM",null],[32146,"NAD83","L2VIRNM",null],[32147,"NAD83","L2VIRSM",null],[32148,"NAD83","L2WSHNM",null],[32149,"NAD83","L2WSHSM",null],[32150,"NAD83","L2WVANM",null],[32151,"NAD83","L2WVASM",null],[32152,"NAD83","L2WISNM",null],[32153,"NAD83","L2WISCM",null],[32154,"NAD83","L2WISSM",null],[32155,"NAD83","TMWYOEM",null],[32156,"NAD83","TMWYOECM",null],[32157,"NAD83","TMWYOWCM",null],[32158,"NAD83","TMWYOWM",null],[32161,"NAD83","L2PRVIM",null],[32201,"WGS72DOD","NUTM1",null],[32202,"WGS72DOD","NUTM2",null],[32203,"WGS72DOD","NUTM03",null],[32204,"WGS72DOD","NUTM04",null],[32205,"WGS72DOD","NUTM05",null],[32206,"WGS72DOD","NUTM06",null],[32207,"WGS72DOD","NUTM07",null],[32208,"WGS72DOD","NUTM08",null],[32209,"WGS72DOD","NUTM09",null],[32210,"WGS72DOD","NUTM10",null],[32211,"WGS72DOD","NUTM11",null],[32212,"WGS72DOD","NUTM12",null],[32213,"WGS72DOD","NUTM13",null],[32214,"WGS72DOD","NUTM14",null],[32215,"WGS72DOD","NUTM15",null],[32216,"WGS72DOD","NUTM16",null],[32217,"WGS72DOD","NUTM17",null],[32218,"WGS72DOD","NUTM18",null],[32219,"WGS72DOD","NUTM19",null],[32220,"WGS72DOD","NUTM20",null],[32221,"WGS72DOD","NUTM21",null],[32222,"WGS72DOD","NUTM22",null],[32223,"WGS72DOD","NUTM23",null],[32224,"WGS72DOD","NUTM24",null],[32225,"WGS72DOD","NUTM25",null],[32226,"WGS72DOD","NUTM26",null],[32227,"WGS72DOD","NUTM27",null],[32228,"WGS72DOD","NUTM28",null],[32229,"WGS72DOD","NUTM29",null],[32230,"WGS72DOD","NUTM30",null],[32231,"WGS72DOD","NUTM31",null],[32232,"WGS72DOD","NUTM32",null],[32233,"WGS72DOD","NUTM33",null],[32234,"WGS72DOD","NUTM34",null],[32235,"WGS72DOD","NUTM35",null],[32236,"WGS72DOD","NUTM36",null],[32237,"WGS72DOD","NUTM37",null],[32238,"WGS72DOD","NUTM38",null],[32239,"WGS72DOD","NUTM39",null],[32240,"WGS72DOD","NUTM40",null],[32241,"WGS72DOD","NUTM41",null],[32242,"WGS72DOD","NUTM42",null],[32243,"WGS72DOD","NUTM43",null],[32244,"WGS72DOD","NUTM44",null],[32245,"WGS72DOD","NUTM45",null],[32246,"WGS72DOD","NUTM46",null],[32247,"WGS72DOD","NUTM47",null],[32248,"WGS72DOD","NUTM48",null],[32249,"WGS72DOD","NUTM49",null],[32250,"WGS72DOD","NUTM50",null],[32251,"WGS72DOD","NUTM51",null],[32252,"WGS72DOD","NUTM52",null],[32253,"WGS72DOD","NUTM53",null],[32254,"WGS72DOD","NUTM54",null],[32255,"WGS72DOD","NUTM55",null],[32256,"WGS72DOD","NUTM56",null],[32257,"WGS72DOD","NUTM57",null],[32258,"WGS72DOD","NUTM58",null],[32259,"WGS72DOD","NUTM59",null],[32260,"WGS72DOD","NUTM60",null],[32301,"WGS72DOD","SUTM01",null],[32302,"WGS72DOD","SUTM02",null],[32303,"WGS72DOD","SUTM03",null],[32304,"WGS72DOD","SUTM04",null],[32305,"WGS72DOD","SUTM05",null],[32306,"WGS72DOD","SUTM06",null],[32307,"WGS72DOD","SUTM07",null],[32308,"WGS72DOD","SUTM08",null],[32309,"WGS72DOD","SUTM09",null],[32310,"WGS72DOD","SUTM10",null],[32311,"WGS72DOD","SUTM11",null],[32312,"WGS72DOD","SUTM12",null],[32313,"WGS72DOD","SUTM13",null],[32314,"WGS72DOD","SUTM14",null],[32315,"WGS72DOD","SUTM15",null],[32316,"WGS72DOD","SUTM16",null],[32317,"WGS72DOD","SUTM17",null],[32318,"WGS72DOD","SUTM18",null],[32319,"WGS72DOD","SUTM19",null],[32320,"WGS72DOD","SUTM20",null],[32321,"WGS72DOD","SUTM21",null],[32322,"WGS72DOD","SUTM22",null],[32323,"WGS72DOD","SUTM23",null],[32324,"WGS72DOD","SUTM24",null],[32325,"WGS72DOD","SUTM25",null],[32326,"WGS72DOD","SUTM26",null],[32327,"WGS72DOD","SUTM27",null],[32328,"WGS72DOD","SUTM28",null],[32329,"WGS72DOD","SUTM29",null],[32330,"WGS72DOD","SUTM30",null],[32331,"WGS72DOD","SUTM31",null],[32332,"WGS72DOD","SUTM32",null],[32333,"WGS72DOD","SUTM33",null],[32334,"WGS72DOD","SUTM34",null],[32335,"WGS72DOD","SUTM35",null],[32336,"WGS72DOD","SUTM36",null],[32337,"WGS72DOD","SUTM37",null],[32338,"WGS72DOD","SUTM38",null],[32339,"WGS72DOD","SUTM39",null],[32340,"WGS72DOD","SUTM40",null],[32341,"WGS72DOD","SUTM41",null],[32342,"WGS72DOD","SUTM42",null],[32343,"WGS72DOD","SUTM43",null],[32344,"WGS72DOD","SUTM44",null],[32345,"WGS72DOD","SUTM45",null],[32346,"WGS72DOD","SUTM46",null],[32347,"WGS72DOD","SUTM47",null],[32348,"WGS72DOD","SUTM48",null],[32349,"WGS72DOD","SUTM49",null],[32350,"WGS72DOD","SUTM50",null],[32351,"WGS72DOD","SUTM51",null],[32352,"WGS72DOD","SUTM52",null],[32353,"WGS72DOD","SUTM53",null],[32354,"WGS72DOD","SUTM54",null],[32355,"WGS72DOD","SUTM55",null],[32356,"WGS72DOD","SUTM56",null],[32357,"WGS72DOD","SUTM57",null],[32358,"WGS72DOD","SUTM58",null],[32359,"WGS72DOD","SUTM59",null],[32360,"WGS72DOD","SUTM60",null],[32401,"WGS72BE","NUTM1",null],[32402,"WGS72BE","NUTM2",null],[32403,"WGS72BE","NUTM03",null],[32404,"WGS72BE","NUTM04",null],[32405,"WGS72BE","NUTM05",null],[32406,"WGS72BE","NUTM06",null],[32407,"WGS72BE","NUTM07",null],[32408,"WGS72BE","NUTM08",null],[32409,"WGS72BE","NUTM09",null],[32410,"WGS72BE","NUTM10",null],[32411,"WGS72BE","NUTM11",null],[32412,"WGS72BE","NUTM12",null],[32413,"WGS72BE","NUTM13",null],[32414,"WGS72BE","NUTM14",null],[32415,"WGS72BE","NUTM15",null],[32416,"WGS72BE","NUTM16",null],[32417,"WGS72BE","NUTM17",null],[32418,"WGS72BE","NUTM18",null],[32419,"WGS72BE","NUTM19",null],[32420,"WGS72BE","NUTM20",null],[32421,"WGS72BE","NUTM21",null],[32422,"WGS72BE","NUTM22",null],[32423,"WGS72BE","NUTM23",null],[32424,"WGS72BE","NUTM24",null],[32425,"WGS72BE","NUTM25",null],[32426,"WGS72BE","NUTM26",null],[32427,"WGS72BE","NUTM27",null],[32428,"WGS72BE","NUTM28",null],[32429,"WGS72BE","NUTM29",null],[32430,"WGS72BE","NUTM30",null],[32431,"WGS72BE","NUTM31",null],[32432,"WGS72BE","NUTM32",null],[32433,"WGS72BE","NUTM33",null],[32434,"WGS72BE","NUTM34",null],[32435,"WGS72BE","NUTM35",null],[32436,"WGS72BE","NUTM36",null],[32437,"WGS72BE","NUTM37",null],[32438,"WGS72BE","NUTM38",null],[32439,"WGS72BE","NUTM39",null],[32440,"WGS72BE","NUTM40",null],[32441,"WGS72BE","NUTM41",null],[32442,"WGS72BE","NUTM42",null],[32443,"WGS72BE","NUTM43",null],[32444,"WGS72BE","NUTM44",null],[32445,"WGS72BE","NUTM45",null],[32446,"WGS72BE","NUTM46",null],[32447,"WGS72BE","NUTM47",null],[32448,"WGS72BE","NUTM48",null],[32449,"WGS72BE","NUTM49",null],[32450,"WGS72BE","NUTM50",null],[32451,"WGS72BE","NUTM51",null],[32452,"WGS72BE","NUTM52",null],[32453,"WGS72BE","NUTM53",null],[32454,"WGS72BE","NUTM54",null],[32455,"WGS72BE","NUTM55",null],[32456,"WGS72BE","NUTM56",null],[32457,"WGS72BE","NUTM57",null],[32458,"WGS72BE","NUTM58",null],[32459,"WGS72BE","NUTM59",null],[32460,"WGS72BE","NUTM60",null],[32501,"WGS72BE","SUTM01",null],[32502,"WGS72BE","SUTM02",null],[32503,"WGS72BE","SUTM03",null],[32504,"WGS72BE","SUTM04",null],[32505,"WGS72BE","SUTM05",null],[32506,"WGS72BE","SUTM06",null],[32507,"WGS72BE","SUTM07",null],[32508,"WGS72BE","SUTM08",null],[32509,"WGS72BE","SUTM09",null],[32510,"WGS72BE","SUTM10",null],[32511,"WGS72BE","SUTM11",null],[32512,"WGS72BE","SUTM12",null],[32513,"WGS72BE","SUTM13",null],[32514,"WGS72BE","SUTM14",null],[32515,"WGS72BE","SUTM15",null],[32516,"WGS72BE","SUTM16",null],[32517,"WGS72BE","SUTM17",null],[32518,"WGS72BE","SUTM18",null],[32519,"WGS72BE","SUTM19",null],[32520,"WGS72BE","SUTM20",null],[32521,"WGS72BE","SUTM21",null],[32522,"WGS72BE","SUTM22",null],[32523,"WGS72BE","SUTM23",null],[32524,"WGS72BE","SUTM24",null],[32525,"WGS72BE","SUTM25",null],[32526,"WGS72BE","SUTM26",null],[32527,"WGS72BE","SUTM27",null],[32528,"WGS72BE","SUTM28",null],[32529,"WGS72BE","SUTM29",null],[32530,"WGS72BE","SUTM30",null],[32531,"WGS72BE","SUTM31",null],[32532,"WGS72BE","SUTM32",null],[32533,"WGS72BE","SUTM33",null],[32534,"WGS72BE","SUTM34",null],[32535,"WGS72BE","SUTM35",null],[32536,"WGS72BE","SUTM36",null],[32537,"WGS72BE","SUTM37",null],[32538,"WGS72BE","SUTM38",null],[32539,"WGS72BE","SUTM39",null],[32540,"WGS72BE","SUTM40",null],[32541,"WGS72BE","SUTM41",null],[32542,"WGS72BE","SUTM42",null],[32543,"WGS72BE","SUTM43",null],[32544,"WGS72BE","SUTM44",null],[32545,"WGS72BE","SUTM45",null],[32546,"WGS72BE","SUTM46",null],[32547,"WGS72BE","SUTM47",null],[32548,"WGS72BE","SUTM48",null],[32549,"WGS72BE","SUTM49",null],[32550,"WGS72BE","SUTM50",null],[32551,"WGS72BE","SUTM51",null],[32552,"WGS72BE","SUTM52",null],[32553,"WGS72BE","SUTM53",null],[32554,"WGS72BE","SUTM54",null],[32555,"WGS72BE","SUTM55",null],[32556,"WGS72BE","SUTM56",null],[32557,"WGS72BE","SUTM57",null],[32558,"WGS72BE","SUTM58",null],[32559,"WGS72BE","SUTM59",null],[32560,"WGS72BE","SUTM60",null],[32601,"WGS84","NUTM01",null],[32602,"WGS84","NUTM02",null],[32603,"WGS84","NUTM03",null],[32604,"WGS84","NUTM04",null],[32605,"WGS84","NUTM05",null],[32606,"WGS84","NUTM06",null],[32607,"WGS84","NUTM07",null],[32608,"WGS84","NUTM08",null],[32609,"WGS84","NUTM09",null],[32610,"WGS84","NUTM10",null],[32611,"WGS84","NUTM11",null],[32612,"WGS84","NUTM12",null],[32613,"WGS84","NUTM13",null],[32614,"WGS84","NUTM14",null],[32615,"WGS84","NUTM15",null],[32616,"WGS84","NUTM16",null],[32617,"WGS84","NUTM17",null],[32618,"WGS84","NUTM18",null],[32619,"WGS84","NUTM19",null],[32620,"WGS84","NUTM20",null],[32621,"WGS84","NUTM21",null],[32622,"WGS84","NUTM22",null],[32623,"WGS84","NUTM23",null],[32624,"WGS84","NUTM24",null],[32625,"WGS84","NUTM25",null],[32626,"WGS84","NUTM26",null],[32627,"WGS84","NUTM27",null],[32628,"WGS84","NUTM28",null],[32629,"WGS84","NUTM29",null],[32630,"WGS84","NUTM30",null],[32631,"WGS84","NUTM31",null],[32632,"WGS84","NUTM32",null],[32633,"WGS84","NUTM33",null],[32634,"WGS84","NUTM34",null],[32635,"WGS84","NUTM35",null],[32636,"WGS84","NUTM36",null],[32637,"WGS84","NUTM37",null],[32638,"WGS84","NUTM38",null],[32639,"WGS84","NUTM39",null],[32640,"WGS84","NUTM40",null],[32641,"WGS84","NUTM41",null],[32642,"WGS84","NUTM42",null],[32643,"WGS84","NUTM43",null],[32644,"WGS84","NUTM44",null],[32645,"WGS84","NUTM45",null],[32646,"WGS84","NUTM46",null],[32647,"WGS84","NUTM47",null],[32648,"WGS84","NUTM48",null],[32649,"WGS84","NUTM49",null],[32650,"WGS84","NUTM50",null],[32651,"WGS84","NUTM51",null],[32652,"WGS84","NUTM52",null],[32653,"WGS84","NUTM53",null],[32654,"WGS84","NUTM54",null],[32655,"WGS84","NUTM55",null],[32656,"WGS84","NUTM56",null],[32657,"WGS84","NUTM57",null],[32658,"WGS84","NUTM58",null],[32659,"WGS84","NUTM59",null],[32660,"WGS84","NUTM60",null],[32701,"WGS84","SUTM01",null],[32702,"WGS84","SUTM02",null],[32703,"WGS84","SUTM03",null],[32704,"WGS84","SUTM04",null],[32705,"WGS84","SUTM05",null],[32706,"WGS84","SUTM06",null],[32707,"WGS84","SUTM07",null],[32708,"WGS84","SUTM08",null],[32709,"WGS84","SUTM09",null],[32710,"WGS84","SUTM10",null],[32711,"WGS84","SUTM11",null],[32712,"WGS84","SUTM12",null],[32713,"WGS84","SUTM13",null],[32714,"WGS84","SUTM14",null],[32715,"WGS84","SUTM15",null],[32716,"WGS84","SUTM16",null],[32717,"WGS84","SUTM17",null],[32718,"WGS84","SUTM18",null],[32719,"WGS84","SUTM19",null],[32720,"WGS84","SUTM20",null],[32721,"WGS84","SUTM21",null],[32722,"WGS84","SUTM22",null],[32723,"WGS84","SUTM23",null],[32724,"WGS84","SUTM24",null],[32725,"WGS84","SUTM25",null],[32726,"WGS84","SUTM26",null],[32727,"WGS84","SUTM27",null],[32728,"WGS84","SUTM28",null],[32729,"WGS84","SUTM29",null],[32730,"WGS84","SUTM30",null],[32731,"WGS84","SUTM31",null],[32732,"WGS84","SUTM32",null],[32733,"WGS84","SUTM33",null],[32734,"WGS84","SUTM34",null],[32735,"WGS84","SUTM35",null],[32736,"WGS84","SUTM36",null],[32737,"WGS84","SUTM37",null],[32738,"WGS84","SUTM38",null],[32739,"WGS84","SUTM39",null],[32740,"WGS84","SUTM40",null],[32741,"WGS84","SUTM41",null],[32742,"WGS84","SUTM42",null],[32743,"WGS84","SUTM43",null],[32744,"WGS84","SUTM44",null],[32745,"WGS84","SUTM45",null],[32746,"WGS84","SUTM46",null],[32747,"WGS84","SUTM47",null],[32748,"WGS84","SUTM48",null],[32749,"WGS84","SUTM49",null],[32750,"WGS84","SUTM50",null],[32751,"WGS84","SUTM51",null],[32752,"WGS84","SUTM52",null],[32753,"WGS84","SUTM53",null],[32754,"WGS84","SUTM54",null],[32755,"WGS84","SUTM55",null],[32756,"WGS84","SUTM56",null],[32757,"WGS84","SUTM57",null],[32758,"WGS84","SUTM58",null],[32759,"WGS84","SUTM59",null],[32760,"WGS84","SUTM60",null],[102141,"HK80","NUTM49",null],[102142,"HK80","NUTM50",null],[102151,"TOKYO","NUTM51",null],[102152,"TOKYO","NUTM52",null],[102153,"TOKYO","NUTM53",null],[102154,"TOKYO","NUTM54",null],[102155,"TOKYO","NUTM55",null],[102156,"TOKYO","NUTM56",null],[3308,"GDA94","NSWLAM94","PROJCS[\"GDA 1994 NSW_Lamberts_CC\","+"GEOGCS[\"GCS_GDA_1994\",DATUM[\"D_GDA_1994\","+"SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],"+"PRIMEM[\"Greenwich\",0.0],"+"UNIT[\"Degree\",0.0174532925199433]],"+"PROJECTION[\"Lambert_Conformal_Conic\"],"+"PARAMETER[\"False_Easting\",9300000.0],"+"PARAMETER[\"False_Northing\",4500000.0],"+"PARAMETER[\"Central_Meridian\",147.0],"+"PARAMETER[\"Standard_Parallel_1\",-30.75],"+"PARAMETER[\"Standard_Parallel_2\",-35.75],"+"PARAMETER[\"Latitude_Of_Origin\",-33.25],"+"UNIT[\"Meter\",1.0]]"]];
for(var i=0;i<GDTEPSGMappings.aGDTEPSG.length;i++){
var aGDTEPSGMapping=GDTEPSGMappings.aGDTEPSG[i];
var nEPSG=GDTEPSGMappings.aGDTEPSG[i][0];
var sDatum=GDTEPSGMappings.aGDTEPSG[i][1];
var sProjection=GDTEPSGMappings.aGDTEPSG[i][2];
var sWKT=GDTEPSGMappings.aGDTEPSG[i][3];
if(nEPSG||sWKT){
var objGDTToEPSG=new Object();
if(sWKT){
objGDTToEPSG.sWKT=sWKT;
}
if(nEPSG){
objGDTToEPSG.nEPSG=nEPSG;
var objEPSGToGDT=new Object();
objEPSGToGDT.sDatum=(sDatum?sDatum.toUpperCase():"");
objEPSGToGDT.sProjection=(sProjection?sProjection.toUpperCase():"");
if(sWKT){
objEPSGToGDT.sWKT=sWKT;
}
GDTEPSGMappings.objEPSGToGDT["#"+nEPSG]=objEPSGToGDT;
}
GDTEPSGMappings.objGDTToEPSG[sDatum.toUpperCase()+" "+sProjection.toUpperCase()]=objGDTToEPSG;
}
}
function GDTEPSGMappings_GetDatumProjection(_647){
var _648=null;
var _649=this.objEPSGToGDT["#"+_647];
if(_649){
_648=new Object();
_648.sDatum=_649.sDatum;
_648.sProjection=_649.sProjection;
}
return _648;
};
GDTEPSGMappings.getDatumProjection=GDTEPSGMappings_GetDatumProjection;
function GDTEPSGMappings_GetEPSGCode(_64a,_64b){
var _64c=null;
var _64d=this.objGDTToEPSG[_64a.toUpperCase()+" "+_64b.toUpperCase()];
if(_64d&&_64d.nEPSG){
_64c=_64d.nEPSG;
}
return _64c;
};
GDTEPSGMappings.getEPSGCode=GDTEPSGMappings_GetEPSGCode;
function GDTEPSGMappings_GetEPSGWKTFromDatumProjection(_64e,_64f){
var sWKT=null;
var _651=this.objGDTToEPSG[_64e.toUpperCase()+" "+_64f.toUpperCase()];
if(_651&&_651.sWKT){
sWKT=_651.sWKT;
}
return sWKT;
};
GDTEPSGMappings.getEPSGWKTFromDatumProjection=GDTEPSGMappings_GetEPSGWKTFromDatumProjection;
function GDTEPSGMappings_GetEPSGWKTFromEPSGCode(_652){
var sWKT=null;
var _654=this.objEPSGToGDT["#"+_652];
if(_654&&_654.sWKT){
sWKT=_654.sWKT;
}
return sWKT;
};
GDTEPSGMappings.getEPSGWKTFromEPSGCode=GDTEPSGMappings_GetEPSGWKTFromEPSGCode;
SIX.provide("sorttable.js");
var SORT_COLUMN_INDEX;
var aTagExclusionsByTableId=new Object();
function sortables_init(){
if(!document.getElementsByTagName){
return;
}
tbls=document.getElementsByTagName("table");
for(ti=0;ti<tbls.length;ti++){
thisTbl=tbls[ti];
if(((" "+thisTbl.className+" ").indexOf("sortable")!=-1)&&(thisTbl.id)){
ts_makeSortable(thisTbl);
}
}
};
function ts_makeSortable(_655){
if(_655.rows&&_655.rows.length>0){
var _656=_655.rows[0];
}
if(!_656){
return;
}
for(var i=0;i<_656.cells.length;i++){
var cell=_656.cells[i];
if(cell.style.display=="none"||cell.style.visibility=="hidden"){
continue;
}
var j=0;
var txt=ts_getInnerText(cell);
var _65b=cell.getElementsByTagName("a");
var _65c=new Array();
var _65d=0;
for(j=0;j<_65b.length;j++){
var _65e=(_65b[j].getAttribute("class")?_65b[j].getAttribute("class"):_65b[j].getAttribute("className"));
if(_65e!="sortheader"){
_65c[_65d]=_65b[j].cloneNode(true);
_65d++;
}
}
var _65f=cell.getElementsByTagName("input");
var _660=new Array();
var _661=0;
for(j=0;j<_65f.length;j++){
_660[_661]=_65f[j].cloneNode(true);
_661++;
}
var _662=cell.getElementsByTagName("select");
var _663=new Array();
var _664=0;
for(j=0;j<_662.length;j++){
_663[_664]=_662[j].cloneNode(true);
_664++;
}
cell.innerHTML="<a href=\"#\" class=\"sortheader\" onclick=\"ts_resortTable(this);return false;\">"+txt+"<span class=\"sortarrow\">&nbsp;&uarr;&darr;</span></a>";
for(j=0;j<_661;j++){
cell.appendChild(_660[j]);
}
for(j=0;j<_65d;j++){
cell.appendChild(_65c[j]);
}
for(j=0;j<_664;j++){
cell.appendChild(_663[j]);
}
}
};
function ts_persistCheckbox(_665){
var _666=_665.currentTarget?_665.currentTarget:_665.srcElement;
_666.defaultChecked=_666.checked;
return true;
};
function ts_getNodeByAttribute(el,_668,_669){
if(typeof el=="string"){
return el;
}
if(typeof el=="undefined"){
return el;
}
var _66a=null;
var cs=el.childNodes;
var _66c=_668.toLowerCase();
var _66d=_669.toLowerCase();
for(var i=0;i<cs.length;i++){
if(cs[i].nodeType==1){
var _66f=cs[i].getAttribute(_66c);
if(_66f&&_66f.toLowerCase()==_66d){
_66a=cs[i];
break;
}
_66a=ts_getNodeByAttribute(cs[i],_66c,_66d);
if(_66a){
break;
}
}
}
return _66a;
};
function ts_getInnerText(el){
if(typeof el=="string"){
return el;
}
if(typeof el=="undefined"){
return el;
}
var str="";
var cs=el.childNodes;
var l=cs.length;
var _674="";
var _675=getParent(el,"table");
var _676=["a","input","select"];
if(_675&&_675.id&&aTagExclusionsByTableId[_675.id]){
_676=aTagExclusionsByTableId[_675.id];
}
for(var i=0;i<l;i++){
var _678=cs[i].nodeName.toLowerCase();
if((_678=="input")&&(cs[i].type=="checkbox")){
if(cs[i].checked){
_674="1";
}else{
_674="0";
}
}else{
var _679=false;
for(var j=0;j<_676.length;j++){
if(_678==_676[j]){
_679=true;
break;
}
}
if(_679){
continue;
}
}
switch(cs[i].nodeType){
case 1:
str+=ts_getInnerText(cs[i]);
break;
case 3:
str+=cs[i].nodeValue;
break;
}
}
if(str==""){
str=_674;
}
return str;
};
function ts_resortTable(node,_67c){
var isIE=(navigator.appName.indexOf("Microsoft")>=0?true:false);
var span=null;
var lnk=null;
var td=null;
switch(node.tagName.toLowerCase()){
case "a":
lnk=node;
td=lnk.parentNode;
break;
case "td":
if(node.firstChild&&node.firstChild.tagName&&(node.firstChild.tagName.toLowerCase()=="a")&&((node.firstChild.getAttribute("className")=="sortheader")||(node.firstChild.getAttribute("class")=="sortheader"))){
lnk=node.firstChild;
td=node;
}
break;
default:
break;
}
if(!lnk||!td){
return;
}
for(var ci=0;ci<lnk.childNodes.length;ci++){
if(lnk.childNodes[ci].tagName&&lnk.childNodes[ci].tagName.toLowerCase()=="span"){
span=lnk.childNodes[ci];
}
}
var _682=ts_getInnerText(span);
var _683=getParent(td,"TABLE");
if(isIE){
var _684=_683.getElementsByTagName("input");
for(var i=0;i<_684.length;i++){
if(_684[i].type.toLowerCase()=="checkbox"){
_684[i].defaultChecked=_684[i].checked;
addEvent(_684[i],"change",ts_persistCheckbox);
}
}
}
if(_683.rows.length<=1){
return;
}
var _686=1;
for(i=1;i<_683.rows.length;i++){
var _687=_683.rows[i];
if((_687.getAttribute("className")=="nosort")||(_687.getAttribute("class")=="nosort")){
_686++;
}else{
var _688=false;
var _689=_687.getElementsByTagName("a");
for(var j=0;j<_689.length;j++){
var _68b=_689[j];
if((_68b.getAttribute("className")=="sortheader")||(_68b.getAttribute("class")=="sortheader")){
_688=true;
_686++;
break;
}
}
if(!_688){
break;
}
}
}
if(_683.rows.length<=_686){
return;
}
var _68c=td.cellIndex;
if(isIE){
for(var i=0;i<_683.rows[_686].cells.length;i++){
if(_683.rows[_686].cells[i].style.display=="none"){
_68c++;
}else{
break;
}
}
}
var itm=ts_getInnerText(_683.rows[_686].cells[_68c]);
if(itm==null){
return;
}
sortfn=ts_sort_caseinsensitive;
if(itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)){
sortfn=ts_sort_date;
}
if(itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)){
sortfn=ts_sort_date;
}
if(itm.match(/^[œ$]/)){
sortfn=ts_sort_currency;
}
if(itm.match(/^[\d\.]+$/)){
sortfn=ts_sort_numeric;
}
SORT_COLUMN_INDEX=_68c;
var _68e=new Array();
var _68f=_686;
var _690=0;
for(i=_683.rows.length-1;i>=_686;i--){
if((_683.rows[i].getAttribute("className")=="nosort")||(_683.rows[i].getAttribute("class")=="nosort")){
_690++;
}else{
break;
}
}
for(j=_68f;j<(_683.rows.length-_690);j++){
_68e[j-_68f]=_683.rows[j];
}
_68e.sort(sortfn);
if((span.getAttribute("sortdir")=="down")&&!(arguments.length<2?false:_67c)){
ARROW="&nbsp;&nbsp;&uarr;";
_68e.reverse();
span.setAttribute("sortdir","up");
}else{
ARROW="&nbsp;&nbsp;&darr;";
span.setAttribute("sortdir","down");
}
var _691=new Array();
for(j=0;j<_683.rows.length-1;j++){
if((j<(_68f-1))||(j>=(_68e.length+_68f-1))){
_691[j]=_683.rows[j+1];
}else{
_691[j]=_68e[j-_68f+1];
}
}
for(i=0;i<_691.length;i++){
if(!_691[i].className||(_691[i].className&&(_691[i].className.indexOf("sortbottom")==-1))){
_683.tBodies[0].appendChild(_691[i]);
}
}
for(i=0;i<_691.length;i++){
if(_691[i].className&&(_691[i].className.indexOf("sortbottom")!=-1)){
_683.tBodies[0].appendChild(_691[i]);
}
}
var _692=document.getElementsByTagName("span");
for(var ci=0;ci<_692.length;ci++){
if(_692[ci].className=="sortarrow"){
if(getParent(_692[ci],"table")==getParent(lnk,"table")){
_692[ci].innerHTML="&nbsp;&nbsp;&nbsp;";
}
}
}
span.innerHTML=ARROW;
};
function getParent(el,_694){
if(el==null){
return null;
}else{
if(el.nodeType==1&&el.tagName.toLowerCase()==_694.toLowerCase()){
return el;
}else{
return getParent(el.parentNode,_694);
}
}
};
function ts_sort_date(a,b){
aa=ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
bb=ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
if(aa.length==10){
dt1=aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2);
}else{
yr=aa.substr(6,2);
if(parseInt(yr)<50){
yr="20"+yr;
}else{
yr="19"+yr;
}
dt1=yr+aa.substr(3,2)+aa.substr(0,2);
}
if(bb.length==10){
dt2=bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2);
}else{
yr=bb.substr(6,2);
if(parseInt(yr)<50){
yr="20"+yr;
}else{
yr="19"+yr;
}
dt2=yr+bb.substr(3,2)+bb.substr(0,2);
}
if(dt1==dt2){
return 0;
}
if(dt1<dt2){
return -1;
}
return 1;
};
function ts_sort_currency(a,b){
aa=ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,"");
bb=ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,"");
return parseFloat(aa)-parseFloat(bb);
};
function ts_sort_numeric(a,b){
aa=parseFloat(ts_getInnerText(a.cells[SORT_COLUMN_INDEX]));
if(isNaN(aa)){
aa=0;
}
bb=parseFloat(ts_getInnerText(b.cells[SORT_COLUMN_INDEX]));
if(isNaN(bb)){
bb=0;
}
return aa-bb;
};
function ts_sort_caseinsensitive(a,b){
aa=ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase();
bb=ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase();
if(aa==bb){
return 0;
}
if(aa<bb){
return -1;
}
return 1;
};
function ts_sort_default(a,b){
aa=ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
bb=ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
if(aa==bb){
return 0;
}
if(aa<bb){
return -1;
}
return 1;
};
function addEvent(elm,_6a0,fn,_6a2){
if(elm.addEventListener){
elm.addEventListener(_6a0,fn,_6a2);
return true;
}else{
if(elm.attachEvent){
var r=elm.attachEvent("on"+_6a0,fn);
return r;
}else{
alert("Handler could not be removed");
}
}
};
SIX.provide("NCSProgressbar3.js");
function NCSProgressbar3(uid,_6a5,_6a6,_6a7,_6a8,_6a9,_6aa,_6ab,_6ac){
if(arguments.length>0){
this.init(uid,_6a5);
}
this.outerDivID=uid+"_outerDivID";
this.innerDivID=uid+"_innerDivID";
this.percentCompleteLabelID=uid+"_percentCompleteLabelID";
this.progress=0;
this.nWidth=_6a6;
this.nHeight=_6a7;
this.nLeftLabelWidth=(_6ab?_6ab:Math.floor(0.4*this.nWidth));
this.nPercentCompleteLabelWidth=(_6ac?_6ac:Math.floor(0.2*this.nWidth));
this.progressCompleteColor="#FF0000";
this.progressIncompleteColor="#00FF00";
this.backgroundColor="transparent";
this.nCustomBorderWidth=0;
if(_6aa!=null){
this.sLeftLabel=_6aa;
}
if(_6a9!=null){
this.percentCompleteLabel=_6a9;
}
this.nProgressWidth=this.nWidth-(this.percentCompleteLabel?this.nPercentCompleteLabelWidth:0)-(this.sLeftLabel?this.nLeftLabelWidth:0);
this.nIncrements=(_6a8?_6a8:1);
this.nIncrementSpacing=((_6a8==1)?0:2);
this.nIncrementWidth=Math.floor(this.nProgressWidth/this.nIncrements-this.nIncrementSpacing);
if(this.nIncrementWidth<2){
this.nIncrementWidth=2;
}
if(_6a5!=null){
this.build();
}
};
function NCSProgressbar3_Build(){
var _6ad=2;
var _6ae=this.nHeight;
var text="";
text+="<div style=\"padding:0px;margin:0px;border:0px;overflow:hidden;width:"+this.nWidth+"px;\">";
if(this.sLeftLabel!=null||this.percentCompleteLabel==true){
if(this.sLeftLabel!=null){
text+="<div style=\"width:"+this.nLeftLabelWidth+"px;margin:0px;padding-top:0px;padding-bottom:0px;padding-right:5px;padding-left:0px;position:relative;float:left;text-align:right;font-size:11px\">"+this.sLeftLabel+"</div>";
}
}
text+="<div id=\""+this.outerDivID+"\" style=\"width:"+((this.nIncrements>1)?this.nIncrements*(this.nIncrementWidth+this.nIncrementSpacing):0)+"px;position:relative;float:left;visibility:visible;background-color:"+this.backgroundColor+"; height:"+_6ae+"px; border: "+this.nCustomBorderWidth+"px solid\">";
for(var i=0;i<this.nIncrements;i++){
text+="<div id=\""+this.innerDivID+i+"\" style=\"position:absolute; top:0px; left:"+((i>0)?i*(this.nIncrementWidth+this.nIncrementSpacing):0)+"px; width:"+this.nIncrementWidth+"px; height:"+(_6ae-_6ad)+"px; background-color:"+this.progressIncompleteColor+"; font-size:0px; \"></div>";
}
text+="</div>";
if(this.sLeftLabel!=null||this.percentCompleteLabel==true){
if(this.percentCompleteLabel==true){
text+="<div id="+this.percentCompleteLabelID+" style=\"width:"+this.nPercentCompleteLabelWidth+"px;margin:0px;padding-top:0px;padding-bottom:0px;padding-right:0px;padding-left:5px;position:relative;float:left;text-align:left;font-size:11px\">&nbsp;</div>";
}
}
text+="</div>";
if(this.element){
this.element.innerHTML=text;
}else{
return text;
}
};
function NCSProgressbar3_SetProgressCompleteColor(_6b1){
this.progressCompleteColor=_6b1;
};
function NCSProgressbar3_SetProgressIncompleteColor(_6b2){
this.progressIncompleteColor=_6b2;
};
function NCSProgressbar3_SetBackgroundColor(_6b3){
this.backgroundColor=_6b3;
};
function NCSProgressbar3_SetProgress(_6b4){
if(_6b4<0){
_6b4=0;
}
if(_6b4>100){
_6b4=100;
}
if(this.nIncrements==1){
var elem=document.getElementById(this.innerDivID+0);
if(elem){
elem.style.width=_6b4+"%";
}
}else{
var _6b6=(_6b4*this.nIncrements/100)-1;
for(var i=0;i<this.nIncrements;i++){
var elem=document.getElementById(this.innerDivID+i);
if(elem){
elem.style.backgroundColor=((_6b6>=i)?this.progressCompleteColor:this.progressIncompleteColor);
}
}
}
if(this.percentCompleteLabel==true){
var elem=document.getElementById(this.percentCompleteLabelID);
if(elem){
elem.innerHTML=_6b4+"%";
}
}
};
NCSProgressbar3.prototype=new NCSControl();
NCSProgressbar3.prototype.constructor=NCSProgressbar3;
NCSProgressbar3.superclass=NCSControl.prototype;
NCSProgressbar3.prototype.build=NCSProgressbar3_Build;
NCSProgressbar3.prototype.setProgress=NCSProgressbar3_SetProgress;
NCSProgressbar3.prototype.setProgressCompleteColor=NCSProgressbar3_SetProgressCompleteColor;
NCSProgressbar3.prototype.setProgressIncompleteColor=NCSProgressbar3_SetProgressIncompleteColor;
NCSProgressbar3.prototype.setBackgroundColor=NCSProgressbar3_SetBackgroundColor;
SIX.provide("AnchorPosition.js");
function getAnchorPosition(_6b8){
var _6b9=false;
var _6ba=new Object();
var x=0,y=0;
var _6bd=false,_6be=false,_6bf=false;
if(document.getElementById){
_6bd=true;
}else{
if(document.all){
_6be=true;
}else{
if(document.layers){
_6bf=true;
}
}
}
if(_6bd&&document.all){
x=AnchorPosition_getPageOffsetLeft(document.all[_6b8]);
y=AnchorPosition_getPageOffsetTop(document.all[_6b8]);
}else{
if(_6bd){
var o=document.getElementById(_6b8);
x=AnchorPosition_getPageOffsetLeft(o);
y=AnchorPosition_getPageOffsetTop(o);
}else{
if(_6be){
x=AnchorPosition_getPageOffsetLeft(document.all[_6b8]);
y=AnchorPosition_getPageOffsetTop(document.all[_6b8]);
}else{
if(_6bf){
var _6c1=0;
for(var i=0;i<document.anchors.length;i++){
if(document.anchors[i].name==_6b8){
_6c1=1;
break;
}
}
if(_6c1==0){
_6ba.x=0;
_6ba.y=0;
return _6ba;
}
x=document.anchors[i].x;
y=document.anchors[i].y;
}else{
_6ba.x=0;
_6ba.y=0;
return _6ba;
}
}
}
}
_6ba.x=x;
_6ba.y=y;
return _6ba;
};
function getAnchorWindowPosition(_6c3){
var _6c4=getAnchorPosition(_6c3);
var x=0;
var y=0;
if(document.getElementById){
if(isNaN(window.screenX)){
x=_6c4.x-document.body.scrollLeft+window.screenLeft;
y=_6c4.y-document.body.scrollTop+window.screenTop;
}else{
x=_6c4.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
y=_6c4.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
}
}else{
if(document.all){
x=_6c4.x-document.body.scrollLeft+window.screenLeft;
y=_6c4.y-document.body.scrollTop+window.screenTop;
}else{
if(document.layers){
x=_6c4.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
y=_6c4.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
}
}
}
_6c4.x=x;
_6c4.y=y;
return _6c4;
};
function AnchorPosition_getPageOffsetLeft(el){
var ol=el.offsetLeft;
while((el=el.offsetParent)!=null){
ol+=el.offsetLeft;
}
return ol;
};
function AnchorPosition_getWindowOffsetLeft(el){
return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
};
function AnchorPosition_getPageOffsetTop(el){
var ot=el.offsetTop;
while((el=el.offsetParent)!=null){
ot+=el.offsetTop;
}
return ot;
};
function AnchorPosition_getWindowOffsetTop(el){
return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
};
SIX.provide("MarkerSymbols.js");
function AddMarkerSymbols(_6cd){
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_black","images/pin-black.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_blue","images/pin-blue.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_cyan","images/pin-cyan.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_grey","images/pin-grey.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_lime","images/pin-lime.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_orange","images/pin-orange.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_purple","images/pin-purple.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_red","images/pin-red.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("pin_yellow","images/pin-yellow.gif","",3,30));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("display_camera","images/display_camera.gif","images/display_camera_on.gif",23,41));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("display_gov","images/display_gov.gif","images/display_gov_on.gif",23,41));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("display_house","images/display_house.gif","images/display_house_on.gif",23,41));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("display_meet","images/display_meet.gif","images/display_meet_on.gif",23,41));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("display_pdf","images/display_pdf.gif","images/display_pdf_on.gif",23,41));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("onmap_camera","images/onmap_camera.gif","",0,36));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("onmap_gov","images/onmap_gov.gif","",0,36));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("onmap_house","images/onmap_house.gif","",0,36));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("onmap_meet","images/onmap_meet.gif","",0,36));
_6cd.addMarkerSymbol(new SIX.MarkerSymbol("onmap_pdf","images/onmap_pdf.gif","",0,36));
_6cd.setDefaultMarkerSymbolId("pin_red");
};
SIX.provide("SIXConfig.js");
var SIXConfig=new Object();
var sHost=document.location.host;
sHost=sHost.toLowerCase();
SIXConfig.nNumHostAliases=0;
SIXConfig.aHostAliases=new Array();
var nIndex=sHost.indexOf(".");
for(var i=0;i<SIXConfig.nNumHostAliases;i++){
SIXConfig.aHostAliases[i]=(nIndex==-1)?sHost+(i+1):sHost.replace(".",(""+(i+1)+"."));
}
SIXConfig.ECWP_SERVER_ALIASES=SIXConfig.aHostAliases;
var sPluginInstallMethod=getCookie("NCSPluginInstallMethod");
var bDHTMLControl=(sPluginInstallMethod&&sPluginInstallMethod=="HTML");
SIXConfig.bAuthorisationRequired=false;
SIXConfig.AUTHORISATION_FAILURE_URL="AuthorisationFailure.htm";
SIXConfig.MAX_CACHED_ECWP_CONNECTIONS=6;
SIXConfig.FREECACHE="FALSE";
SIXConfig.AUTHORISATION_URL="http://203.14.35.118/cgi-bin/apps/authService";
SIXConfig.AIRVIEW_URL="http://lite.maps.nsw.gov.au/gsp/prod/";
SIXConfig.ECWP_SERVER=sHost;
SIXConfig.SOAP_SERVER="address.maps.nsw.gov.au/HRAddressSearchWeb/services";
SIXConfig.ARCXML_SERVER=sHost+"/IMS";
SIXConfig.EMSINA_ARCXML_SERVER="ows.bom.gov.au/cgi-bin/mapserver/users/bomw0052/latest";
SIXConfig.EMSINA2_ARCXML_SERVER="ows.bom.gov.au/cgi-bin/mapserver/users/bomw0052/latest";
SIXConfig.AGS93Server=sHost+"/AGS93/";
SIXConfig.SENTINEL_ARCXML_SERVER="sentinel.ga.gov.au";
SIXConfig.PLANNING_WMS_SERVER="wmp.dnr.nsw.gov.au:8080/proxy/dipnr/wms_planning_shr";
SIXConfig.MARITIME_ARCXML_SERVER="srv-bx-arcims1";
SIXConfig.ABORIGINAL_WATER_QUALITY_WMS_SERVER=sHost+"/AGS93/services/AboriginalCommunities/MapServer/WMSServer";
SIXConfig.CLIP_N_SHIP_URL="/order/order_clipnship.aspx";
SIXConfig.SPOT5_SCENE_ORDER_URL="/order/order_spatial.aspx";
SIXConfig.DATA_ORDER_URL="/order/order_datatool.aspx";
SIXConfig.REPORTS_SERVER="http://"+sHost+"/SIXReports";
SIXConfig.PLANNING_REPORTS_URL=SIXConfig.REPORTS_SERVER+"/servlet/PlanningPropertyReportServlet";
SIXConfig.bHaveOTDF=false;
SIXConfig.JSVIEWPROXY_PATH=SIXConfig.ECWP_SERVER+"/IWSJSViewProxy/jsviewproxy.dll";
SIXConfig.BLANK_WGS84_GEODETIC_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/WGS84-GEO.ecw";
SIXConfig.BLANK_GDA94_GEODETIC_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/GDA94-GEO.ecw";
SIXConfig.BLANK_GDA94_NSWLAM94_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/GDA94-NSWLAM94.ecw";
SIXConfig.BALRANALDAREA_ID="BALRANALD";
SIXConfig.BALRANALDAREA_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/balranald.ecw";
SIXConfig.BALRANALDAREA_METADATA_URL="metadata_unavailable.htm";
SIXConfig.BALRANALDAREA_DESCRIPTION="Balranald Aerial Photos (Med-High resolution) - &copy Lands 2006";
SIXConfig.BALRANALDAREA_REGION=[[140.99980293344385,-33.980428898163666],[142.51452061214204,-33.97117810329312],[142.5274145642476,-34.511325935684035],[144.04948018782298,-34.4835421956734],[144.0706245433163,-35.02328996420249],[142.53600348777658,-35.05236577047161],[142.53093246516121,-34.782446869098194],[142.20373710212561,-34.78619490181255],[142.19819324700987,-34.51737077313327],[141.98320467849544,-34.51868286994429],[141.9784314528818,-34.24860273321045],[140.99997707866999,-34.25170549387555],[140.99980293344385,-33.980428898163666]];
SIXConfig.BALRANALDAREA_MIN_SCALE=0;
SIXConfig.BALRANALDAREA_MAX_SCALE=30000;
SIXConfig.BALRANALDAREA_EXTENTS=[-33.908,140.9297,-35.0976,144.1028];
SIXConfig.NSWTOPOS2V2_ID="NSWTopoS2v2";
SIXConfig.NSWTOPOS2V2_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/NSWTopoS2v2.ecw";
SIXConfig.NSWTOPOS2V2_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/NSWTopoS2v2.htm";
SIXConfig.NSWTOPOS2V2_DESCRIPTION="Topographic maps (Current Series) - &copy; Lands 2007";
SIXConfig.NSWTOPOS2V2_EXTENTS=[-28.106071485061758,140.35262627080485,-37.375804747089894,154.50413272387064];
SIXConfig.NSWTOPOS2V2_OTDF_PATH="OTDF_Imagery/NSWTopoS2v2.ecw";
SIXConfig.SYDPEN07_01_ID="SYDPEN07";
SIXConfig.SYDPEN07_01_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/sydpen07_01.ecw";
SIXConfig.SYDPEN07_01_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/rtasydney2.htm";
SIXConfig.SYDPEN07_01_DESCRIPTION="Sydney Aerial photos (High resolution) - Ausimage &copy; SKM 2008";
SIXConfig.SYDPEN07_01_MIN_SCALE=0;
SIXConfig.SYDPEN07_01_MAX_SCALE=2000000;
SIXConfig.SYDPEN07_01_EXTENTS=[-33.561488,150.482317,-34.075739,151.370153];
SIXConfig.SYDPEN07_01_OTDF_PATH="OTDF_Imagery/sydpen07_01.ecw";
SIXConfig.RTASYDNEY2_ID="rtasydney2";
SIXConfig.RTASYDNEY2_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/rtasydney2.ecw";
SIXConfig.RTASYDNEY2_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/rtasydney2.htm";
SIXConfig.RTASYDNEY2_DESCRIPTION="Sydney Aerial photos (High resolution) - Ausimage &copy; SKM 2006";
SIXConfig.RTASYDNEY2_MIN_SCALE=0;
SIXConfig.RTASYDNEY2_MAX_SCALE=2000000;
SIXConfig.RTASYDNEY2_EXTENTS=[-33.561488,150.482317,-34.075739,151.370153];
SIXConfig.INNERSYDNEY_ID="inner_sydney";
SIXConfig.INNERSYDNEY_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.ecw";
SIXConfig.INNERSYDNEY_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.INNERSYDNEY_DESCRIPTION="Inner Sydney Aerial photography (High resolution) - &copy; Lands 2007";
SIXConfig.INNERSYDNEY_REGION=[[151.231433,-33.828805],[151.229599,-33.920855],[151.22769,-34.012859],[151.129847,-34.011417],[151.131805,-33.920937],[151.133874,-33.827358]];
SIXConfig.INNERSYDNEY_MIN_SCALE=0;
SIXConfig.INNERSYDNEY_MAX_SCALE=2000000;
SIXConfig.SYDNEY43_ID="lr94_1943_sydney";
SIXConfig.SYDNEY43_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/sixiaview/Historical/lr94_1943_sydney_v2.ecw";
SIXConfig.SYDNEY43_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/sixiaview/Historical/lr94_1943_sydney_v2.htm";
SIXConfig.SYDNEY43_DESCRIPTION="1943 Sydney suburbs - Ausimage &copy; SKM 2007 from RTA photography";
SIXConfig.SYDNEY43_MIN_SCALE=0;
SIXConfig.SYDNEY43_MAX_SCALE=1500000;
SIXConfig.SYDNEY43_EXTENTS=[-33.51969229131263,150.20915043716667,-34.19342089575796,151.33970675641325];
SIXConfig.SYDNEY43_OTDF_PATH="OTDF_Imagery/lr94_1943_sydney_v2.ecw";
SIXConfig.SYDNEY43_V2_ID="lr94_1943_sydney_v2";
SIXConfig.SYDNEY43_V2_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/sixiaview/Historical/lr94_1943_sydney_v2.ecw";
SIXConfig.SYDNEY43_V2_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/sixiaview/Historical/lr94_1943_sydney_v2.htm";
SIXConfig.SYDNEY43_V2_DESCRIPTION="1943 Sydney suburbs - Ausimage &copy; SKM 2007 from RTA photography";
SIXConfig.SYDNEY43_V2_MIN_SCALE=0;
SIXConfig.SYDNEY43_V2_MAX_SCALE=1500000;
SIXConfig.SYDNEY43_V2_EXTENTS=[-33.51969229131263,150.20915043716667,-34.19342089575796,151.33970675641325];
SIXConfig.SYDNEY43_V2_OTDF_PATH="OTDF_Imagery/lr94_1943_sydney_v2.ecw";
SIXConfig.LR94ORTHOSING10C_ID="LR94ORTHOSING10C";
SIXConfig.LR94ORTHOSING10C_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/SAN_Imagery/lr94orthosing10c.ecw";
SIXConfig.LR94ORTHOSING10C_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.LR94ORTHOSING10C_DESCRIPTION="LR94ORTHOSING10C";
SIXConfig.LR94ORTHOSING10C_MIN_SCALE=0;
SIXConfig.LR94ORTHOSING10C_MAX_SCALE=2000000;
SIXConfig.LR94ORTHOSING10C_EXTENTS=[-32.504759,150.963607,-33.095631,151.396723];
SIXConfig.LR94ORTHOHAWK10C_ID="LR94ORTHOHAWK10C";
SIXConfig.LR94ORTHOHAWK10C_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/SAN_Imagery/lr94orthohawk10c.ecw";
SIXConfig.LR94ORTHOHAWK10C_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.LR94ORTHOHAWK10C_DESCRIPTION="LR94ORTHOHAWK10C";
SIXConfig.LR94ORTHOHAWK10C_MIN_SCALE=0;
SIXConfig.LR94ORTHOHAWK10C_MAX_SCALE=2000000;
SIXConfig.LR94ORTHOHAWK10C_EXTENTS=[-33.090716,150.603866,-33.558408,151.160978];
SIXConfig.LR94ORTHOKATO10C_ID="LR94ORTHOKATO10C";
SIXConfig.LR94ORTHOKATO10C_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/SAN_Imagery/lr94orthokato10c.ecw";
SIXConfig.LR94ORTHOKATO10C_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.LR94ORTHOKATO10C_DESCRIPTION="LR94ORTHOKATO10C";
SIXConfig.LR94ORTHOKATO10C_MIN_SCALE=0;
SIXConfig.LR94ORTHOKATO10C_MAX_SCALE=2000000;
SIXConfig.LR94ORTHOKATO10C_EXTENTS=[-33.562397,150.051412,-34.114867,150.504098];
SIXConfig.LR94ORTHONEWC10C_ID="LR94ORTHONEWC10C";
SIXConfig.LR94ORTHONEWC10C_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/SAN_Imagery/lr94orthonewc10c.ecw";
SIXConfig.LR94ORTHONEWC10C_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.LR94ORTHONEWC10C_DESCRIPTION="LR94ORTHONEWC10C";
SIXConfig.LR94ORTHONEWC10C_MIN_SCALE=0;
SIXConfig.LR94ORTHONEWC10C_MAX_SCALE=2000000;
SIXConfig.LR94ORTHONEWC10C_EXTENTS=[-32.504759,151.368042,-33.065523,151.835796];
SIXConfig.LR94ORTHOLITH10C_ID="LR94ORTHOLITH10C";
SIXConfig.LR94ORTHOLITH10C_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/SAN_Imagery/lr94ortholith10c.ecw";
SIXConfig.LR94ORTHOLITH10C_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.LR94ORTHOLITH10C_DESCRIPTION="LR94ORTHOLITH10C";
SIXConfig.LR94ORTHOLITH10C_MIN_SCALE=0;
SIXConfig.LR94ORTHOLITH10C_MAX_SCALE=2000000;
SIXConfig.LR94ORTHOLITH10C_EXTENTS=[-33.107437,150.035749,-33.573684,150.622456];
SIXConfig.LR94ORTHOGOSF10C_ID="LR94ORTHOGOSF10C";
SIXConfig.LR94ORTHOGOSF10C_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/SAN_Imagery/lr94orthogosf10c.ecw";
SIXConfig.LR94ORTHOGOSF10C_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.LR94ORTHOGOSF10C_DESCRIPTION="LR94ORTHOGOSF10C";
SIXConfig.LR94ORTHOGOSF10C_MIN_SCALE=0;
SIXConfig.LR94ORTHOGOSF10C_MAX_SCALE=2000000;
SIXConfig.LR94ORTHOGOSF10C_EXTENTS=[-33.071683,151.139631,-33.541602,151.69928];
SIXConfig.LR94ORTHOSTEP10C_ID="LR94ORTHOSTEP10C";
SIXConfig.LR94ORTHOSTEP10C_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/SAN_Imagery/lr94orthostep10c.ecw";
SIXConfig.LR94ORTHOSTEP10C_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.LR94ORTHOSTEP10C_DESCRIPTION="LR94ORTHOSTEP10C";
SIXConfig.LR94ORTHOSTEP10C_MIN_SCALE=0;
SIXConfig.LR94ORTHOSTEP10C_MAX_SCALE=2000000;
SIXConfig.LR94ORTHOSTEP10C_EXTENTS=[-32.317952,151.79595,-32.876195,152.252684];
SIXConfig.LR94ORTHOWOLL10CA_ID="LR94ORTHOWOLL10CA";
SIXConfig.LR94ORTHOWOLL10CA_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/SAN_Imagery/lr94orthowoll10cA.ecw";
SIXConfig.LR94ORTHOWOLL10CA_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/inner_sydney.htm";
SIXConfig.LR94ORTHOWOLL10CA_DESCRIPTION="LR94ORTHOWOLL10CA";
SIXConfig.LR94ORTHOWOLL10CA_MIN_SCALE=0;
SIXConfig.LR94ORTHOWOLL10CA_MAX_SCALE=2000000;
SIXConfig.LR94ORTHOWOLL10CA_EXTENTS=[-34.075553,150.439054,-34.348779,151.405082];
SIXConfig.NSWCOLSIV1_ID="NSWcolSIv1";
SIXConfig.NSWCOLSIV1_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/sp5col2p5_nsw_lcc.ecw";
SIXConfig.NSWCOLSIV1_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/NSWcolSIv1.htm";
SIXConfig.NSWCOLSIV1_DESCRIPTION="Colour Satellite imagery (Med resolution) - via Raytheon &copy; CNES 2006";
SIXConfig.NSWCOLSIV1_OTDF_PATH="OTDF_Imagery/sp5col2p5_nsw_lcc.ecw";
SIXConfig.LANDSAT2000_NSWIMAGE_ID="Landsat2000_NSWImage";
SIXConfig.LANDSAT2000_NSWIMAGE_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/Landsat2000_NSWimage.ecw";
SIXConfig.LANDSAT2000_NSWIMAGE_METADATA_URL="metadata_unavailable.htm";
SIXConfig.LANDSAT2000_NSWIMAGE_DESCRIPTION="Landsat imagery (2000 Low resolution)";
SIXConfig.LANDSAT2000_NSWIMAGE_EXTENTS=[-27.693550344541016,140.04039903940682,-37.62459824070953,154.50965006322838];
SIXConfig.LANDSAT2000_OTDF_PATH="OTDF_Imagery/Landsat2000_NSWimage.ecw";
SIXConfig.NSWTOPOS1V2_ID="NSWTopoS1v2";
SIXConfig.NSWTOPOS1V2_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/NSWTopoS1v2.ecw";
SIXConfig.NSWTOPOS1V2_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/NSWTopoS1v2.htm";
SIXConfig.NSWTOPOS1V2_DESCRIPTION="Topographic maps (1970-97) - &copy; Lands 2006";
SIXConfig.NSWTOPOS1V2_EXTENTS=[-28,140,-37,155];
SIXConfig.NSWTOPOS1V2_OTDF_PATH="OTDF_Imagery/NSWTopoS1v2.ecw";
SIXConfig.NSWPANV2_ID="NSWpanv2";
SIXConfig.NSWPANV2_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/NSWpanv2.ecw";
SIXConfig.NSWPANV2_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/NSWpanv2.htm";
SIXConfig.NSWPANV2_DESCRIPTION="B&W Satellite imagery (Med resolution) - via Raytheon &copy; CNES 2006";
SIXConfig.NSWPANV2_EXTENTS=[-27.588688489950496,139.74765205808126,-37.52481061896662,154.84663733059114];
SIXConfig.NSWPANV2_OTDF_PATH="OTDF_Imagery/NSWpanv2.ecw";
SIXConfig.SPOT5MULTISPECTRAL_ID="SPOT5Multispectral";
SIXConfig.SPOT5MULTISPECTRAL_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/NSWms123V1.ecw";
SIXConfig.SPOT5MULTISPECTRAL_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/SPOT5Multispectral.htm";
SIXConfig.SPOT5MULTISPECTRAL_DESCRIPTION="Multispectral Satellite imagery (Low resolution Bands 123) - via Raytheon &copy; CNES 2006";
SIXConfig.SPOT5MULTISPECTRAL_EXTENTS=[-27.59047349579133,139.74762914106816,-37.525054310562126,154.84677126699478];
SIXConfig.SPOT5MULTISPECTRAL_OTDF_PATH="OTDF_Imagery/NSWms123V1.ecw";
SIXConfig.LR94SYDWAY5KV2_ID="lr94sydway5kv2";
SIXConfig.LR94SYDWAY5KV2_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/lr94sydway5kv2.ecw";
SIXConfig.LR94SYDWAY5KV2_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/lr94sydway5kv2.htm";
SIXConfig.LR94SYDWAY5KV2_DESCRIPTION="Sydney CBD road directory - &copy; Sydways Publishing Pty Ltd";
SIXConfig.LR94SYDWAY5KV2_MIN_SCALE=0;
SIXConfig.LR94SYDWAY5KV2_MAX_SCALE=100000;
SIXConfig.LR94SYDWAY5KV2_EXTENTS=[-33.85151236703515,151.19324659283868,-33.888586453706694,151.22962804020827];
SIXConfig.LR94SYDWAY5KV2_OTDF_PATH="OTDF_Imagery/lr94sydway5kv2.ecw";
SIXConfig.LR94SYDWAY20KV2_ID="lr94sydway20kv2";
SIXConfig.LR94SYDWAY20KV2_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/lr94sydway20kv2.ecw";
SIXConfig.LR94SYDWAY20KV2_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/lr94sydway20kv2.htm";
SIXConfig.LR94SYDWAY20KV2_DESCRIPTION="Sydney region road directory - &copy; Sydways Publishing Pty Ltd";
SIXConfig.LR94SYDWAY20KV2_MIN_SCALE=0;
SIXConfig.LR94SYDWAY20KV2_MAX_SCALE=2000000;
SIXConfig.LR94SYDWAY20KV2_EXTENTS=[-33.05405632708574,150.17988206106563,-34.257892164557084,151.7342385341311];
SIXConfig.LR94SYDWAY20KV2_OTDF_PATH="OTDF_Imagery/lr94sydway20kv2.ecw";
SIXConfig.NEWCASTLEL_ID="newcastleL";
SIXConfig.NEWCASTLEL_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/newcastleL.ecw";
SIXConfig.NEWCASTLEL_METADATA_URL="metadata_unavailable.htm";
SIXConfig.NEWCASTLEL_DESCRIPTION="Newcastle Aerial photo (Med - High resolution) - &copy; Lands 2006";
SIXConfig.NEWCASTLEL_MIN_SCALE=0;
SIXConfig.NEWCASTLEL_MAX_SCALE=2000000;
SIXConfig.NEWCASTLEL_EXTENTS=[-32.474139,151.452242,-33.018769,152.046694];
SIXConfig.NEWCASTLEL_OTDF_PATH="OTDF_Imagery/newcastleL.ecw";
SIXConfig.LR94ORTHO1M_ID="lr94ortho1m";
SIXConfig.LR94ORTHO1M_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/lr94ortho1m.ecw";
SIXConfig.LR94ORTHO1M_METADATA_URL="metadata_unavailable.htm";
SIXConfig.LR94ORTHO1M_DESCRIPTION="East Coast Aerial Photos (Med-High resolution) - &copy; Lands 2006";
SIXConfig.LR94ORTHO1M_MIN_SCALE=0;
SIXConfig.LR94ORTHO1M_MAX_SCALE=30000;
SIXConfig.LR94ORTHO1M_EXTENTS=[-28.092036009784245,146.77402601571387,-37.576129278578236,154.42407666546615];
SIXConfig.LR94ORTHO1M_OTDF_PATH="OTDF_Imagery/lr94ortho1m.ecw";
SIXConfig.MAITLANDFLOOD_ID="MAITLANDFLOOD";
SIXConfig.MAITLANDFLOOD_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/maitland_ncb.ecw";
SIXConfig.MAITLANDFLOOD_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/maitland_ncb.htm";
SIXConfig.MAITLANDFLOOD_DESCRIPTION="Maitland flood photos (High resolution) - &copy; Lands 2007";
SIXConfig.MAITLANDFLOOD_REGION=[[151.524733,-32.711048],[151.608192,-32.734166],[151.602597,-32.748727],[151.608823,-32.750439],[151.601307,-32.769466],[151.599853,-32.769173],[151.594945,-32.781514],[151.568444,-32.773986],[151.558802,-32.786326],[151.506382,-32.758375],[151.509069,-32.75463],[151.515602,-32.737718],[151.516654,-32.738201],[151.519572,-32.730974],[151.517067,-32.730197]];
SIXConfig.MAITLANDFLOOD_MIN_SCALE=0;
SIXConfig.MAITLANDFLOOD_MAX_SCALE=250000;
SIXConfig.MAITLANDFLOOD_EXTENTS=[-32.70867036226427,151.50227931510636,-32.78900675153193,151.61228422010467];
SIXConfig.MAITLANDFLOOD_OTDF_PATH="OTDF_Imagery/maitland_ncb.ecw";
SIXConfig.THEENTRANCEFLOOD_ID="THEENTRANCEFLOOD";
SIXConfig.THEENTRANCEFLOOD_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/TheEntranceFloods.ecw";
SIXConfig.THEENTRANCEFLOOD_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/TheEntranceFloods.htm";
SIXConfig.THEENTRANCEFLOOD_DESCRIPTION="The Entrance floods (High resolution) - &copy; Lands 2007";
SIXConfig.THEENTRANCEFLOOD_REGION=[[[151.489052,-33.328191],[151.513443,-33.328662],[151.512863,-33.358618],[151.488471,-33.358288],[151.488247,-33.343971]],[[151.439472,-33.309801],[151.47648,-33.323085],[151.467077,-33.341811],[151.429975,-33.328456]]];
SIXConfig.THEENTRANCEFLOOD_MIN_SCALE=0;
SIXConfig.THEENTRANCEFLOOD_MAX_SCALE=250000;
SIXConfig.THEENTRANCEFLOOD_EXTENTS=[-33.306848333075465,151.428383209455,-33.361563561208015,151.51495988241138];
SIXConfig.THEENTRANCEFLOOD_OTDF_PATH="OTDF_Imagery/TheEntranceFloods.ecw";
SIXConfig.NOBBYS_ID="NOBBYS";
SIXConfig.NOBBYS_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/Imagery/m2587_0108s.ecw";
SIXConfig.NOBBYS_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/Imagery/m2587_0108s.htm";
SIXConfig.NOBBYS_DESCRIPTION="Port Hunter (High resolution) - &copy; Lands 2007";
SIXConfig.NOBBYS_REGION=[[151.77783738986176,-32.91011766020925],[151.80356056745697,-32.91898555684321],[151.80413822957846,-32.93063349199519],[151.7742484426466,-32.91972905269353]];
SIXConfig.NOBBYS_MIN_SCALE=0;
SIXConfig.NOBBYS_MAX_SCALE=250000;
SIXConfig.NOBBYS_EXTENTS=[-32.90896590239241,151.7728695922868,-32.932224504642356,151.8044027466575];
SIXConfig.NOBBYS_OTDF_PATH="OTDF_Imagery/m2587_0108s.ecw";
SIXConfig.YAMBA_ILUKA_ID="YAMBA_ILUKA";
SIXConfig.YAMBA_ILUKA_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/sixiaview/Emergency/Floods/fl_0905_Yamba-Iluka.ecw";
SIXConfig.YAMBA_ILUKA_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/sixiaview/Emergency/Floods/fl_0905_Yamba-Iluka.htm";
SIXConfig.YAMBA_ILUKA_DESCRIPTION="Yamba-Iluka Flooding - &copy; Lands 2009";
SIXConfig.YAMBA_ILUKA_REGION=[[153.372908,-29.383805],[153.373121,-29.45657],[153.302438,-29.456739],[153.302252,-29.384057]];
SIXConfig.YAMBA_ILUKA_MIN_SCALE=0;
SIXConfig.YAMBA_ILUKA_MAX_SCALE=250000;
SIXConfig.YAMBA_ILUKA_EXTENTS=[-29.384057,153.302252,-29.45657,153.373121];
SIXConfig.KEMPSEY_ID="KEMPSEY";
SIXConfig.KEMPSEY_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/sixiaview/Emergency/Floods/fl_0905_Kempsey.ecw";
SIXConfig.KEMPSEY_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/sixiaview/Emergency/Floods/fl_0905_Kempsey.htm";
SIXConfig.KEMPSEY_DESCRIPTION="Kempsey Flooding - &copy; Lands 2009";
SIXConfig.KEMPSEY_MIN_SCALE=0;
SIXConfig.KEMPSEY_MAX_SCALE=250000;
SIXConfig.KEMPSEY_EXTENTS=[-31.040908,152.778848,-31.100747,152.863843];
SIXConfig.NSW_ROAD_DIRECTORY_ID="NSW_ROAD_DIRECTORY";
SIXConfig.NSW_ROAD_DIRECTORY_ECWP_URL="ecwp://"+SIXConfig.ECWP_SERVER+"/sixiaview/RoadDirectory/2008/NSW_RoadDirectory08.ecw";
SIXConfig.NSW_ROAD_DIRECTORY_METADATA_URL="http://"+SIXConfig.ECWP_SERVER+"/sixiaview/RoadDirectory/2008/NSW_RoadDirectory08.htm";
SIXConfig.NSW_ROAD_DIRECTORY_DESCRIPTION="NSW Road Directory";
SIXConfig.YAMBA_ILUKA_BEST_INDEX=260;
SIXConfig.KEMPSEY_BEST_INDEX=260;
SIXConfig.NSW_REGIONAL_CENTRES_BEST_INDEX=250;
SIXConfig.NSW_SYDNEY_IMAGES_BEST_INDEX=240;
SIXConfig.ADS40_IMAGES_BEST_INDEX=238;
SIXConfig.BALRANALDAREA_BEST_INDEX=235;
SIXConfig.MAITLANDFLOOD_BEST_INDEX=230;
SIXConfig.THEENTRANCEFLOOD_BEST_INDEX=230;
SIXConfig.NOBBYS_BEST_INDEX=230;
SIXConfig.INNERSYDNEY_BEST_INDEX=220;
SIXConfig.RTASYDNEY2_BEST_INDEX=210;
SIXConfig.SYDPEN07_01_BEST_INDEX=215;
SIXConfig.SYDNEY43_BEST_INDEX=200;
SIXConfig.SYDNEY43_V2_BEST_INDEX=200;
SIXConfig.NEWCASTLEL_BEST_INDEX=190;
SIXConfig.LR94ORTHO1M_BEST_INDEX=180;
SIXConfig.NSWCOLSIV1_BEST_INDEX=170;
SIXConfig.LR94SYDWAY5KV2_BEST_INDEX=160;
SIXConfig.LR94SYDWAY20KV2_BEST_INDEX=150;
SIXConfig.NSW_ROAD_DIRECTORY_BEST_INDEX=145;
SIXConfig.NSWPANV2_BEST_INDEX=140;
SIXConfig.SPOT5MULTISPECTRAL_BEST_INDEX=130;
SIXConfig.LANDSAT2000_NSWIMAGE_BEST_INDEX=120;
SIXConfig.NSWTOPOS2V2_BEST_INDEX=110;
SIXConfig.NSWTOPOS1V2_BEST_INDEX=100;
SIXConfig.LR94ORTHOSING10C_BEST_INDEX=275;
SIXConfig.LR94ORTHOHAWK10C_BEST_INDEX=270;
SIXConfig.LR94ORTHOKATO10C_BEST_INDEX=265;
SIXConfig.LR94ORTHONEWC10C_BEST_INDEX=260;
SIXConfig.LR94ORTHOLITH10C_BEST_INDEX=255;
SIXConfig.LR94ORTHOGOSF10C_BEST_INDEX=250;
SIXConfig.LR94ORTHOSTEP10C_BEST_INDEX=245;
SIXConfig.LR94ORTHOWOLL10CA_BEST_INDEX=240;
SIXConfig.aUnsupportedEPSGCodes=new Array();
SIXConfig.LOAD_LAYERS_TIMEOUT=60000;
SIXConfig.ECWP_RECONNECTION_INITIAL_TIMEOUT=5000;
SIXConfig.ECWP_RECONNECTION_REPEAT_TIMEOUT=5000;
SIXConfig.ECWP_RECONNECTION_MAX_ATTEMPTS=8;
SIXConfig.aMarkerSymbols=[["pin1","images/pin1.gif","",10,30],["pin2","images/pin2.gif","",10,30],["pin3","images/pin3.gif","",10,30],["pin4","images/pin4.gif","",10,30],["pin5","images/pin5.gif","",10,30],["pin_black","images/pin-black.gif","",3,30],["pin_blue","images/pin-blue.gif","",3,30],["pin_cyan","images/pin-cyan.gif","",3,30],["pin_grey","images/pin-grey.gif","",3,30],["pin_lime","images/pin-lime.gif","",3,30],["pin_orange","images/pin-orange.gif","",3,30],["pin_purple","images/pin-purple.gif","",3,30],["pin_red","images/pin-red.gif","",3,30],["pin_yellow","images/pin-yellow.gif","",3,30],["cross1","images/cross1.gif","",18,19],["cross2","images/cross2.gif","",18,19],["cross3","images/cross3.gif","",18,19],["cross4","images/cross4.gif","",18,19],["cross5","images/cross5.gif","",18,19],["cross6","images/cross6.gif","",18,19],["cross7","images/cross7.gif","",18,19],["cross8","images/cross8.gif","",18,19],["cross9","images/cross9.gif","",18,19],["cross10","images/cross10.gif","",18,19],["cross11","images/cross11.gif","",18,19],["cross12","images/cross12.gif","",18,19],["cross13","images/cross13.gif","",18,19],["cross14","images/cross14.gif","",18,19]];
SIXConfig.nDefaultMarkerIndex=0;
SIXConfig.eRequestResponseStatus={SUCCESS:0,FAILURE:1};
var aRequestResponseStatus=new Array();
aRequestResponseStatus[SIXConfig.eRequestResponseStatus.SUCCESS]=new Object();
aRequestResponseStatus[SIXConfig.eRequestResponseStatus.SUCCESS].sSummary="Success";
aRequestResponseStatus[SIXConfig.eRequestResponseStatus.SUCCESS].sErrorString="NCS_OVERLAY_SUCCESS";
aRequestResponseStatus[SIXConfig.eRequestResponseStatus.FAILURE]=new Object();
aRequestResponseStatus[SIXConfig.eRequestResponseStatus.FAILURE].sSummary="Failure";
aRequestResponseStatus[SIXConfig.eRequestResponseStatus.FAILURE].sErrorString="NCS_OVERLAY_FAILURE";
SIXConfig.MAX_CONSOLE_ENTRIES=100;
SIXConfig.MAX_CONSOLE_ENTRY_SUMMARY_LENGTH=200;
SIXConfig.STATISTICS_CALCULATION_PERIOD=300000;
SIXConfig.STATISTICS_UPDATE_INTERVAL=10000;
SIXConfig.aBandwidthThresholds=[0,262144,655360,2097153];
SIXConfig.aBandwidthStatus=["Poor","Fair","Good","Excellent"];
SIXConfig.aBandwidthSpeedLabels=["<256Kbps","512Kbps","1Mbps",">2Mbps"];
SIXConfig.aBandwidthSpeeds=[262143,524288,1048576,2097153];
SIXConfig.aBandwidthTests=new Array();
var objBandwidthTest=new Object();
objBandwidthTest.sName="600KB";
objBandwidthTest.nSize=614400;
objBandwidthTest.sSuitability="ADSL, ADSL2+, Wireless, Satellite";
objBandwidthTest.sImagePath="images/DoLQueensSquare600KB.bmp";
objBandwidthTest.sImageDescription="Queens Square building";
SIXConfig.aBandwidthTests[SIXConfig.aBandwidthTests.length]=objBandwidthTest;
SIXConfig.aServerAliases=new Array();
var oNameAlias=new Object();
oNameAlias.sName="imagery.maps.nsw.gov.au/IMS";
oNameAlias.sAlias="server1";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
oNameAlias=new Object();
oNameAlias.sName="imagery.maps.nsw.gov.au";
oNameAlias.sAlias="server2";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
oNameAlias=new Object();
oNameAlias.sName="sentinel.ga.gov.au";
oNameAlias.sAlias="server3";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
oNameAlias=new Object();
oNameAlias.sName="ows.bom.gov.au/cgi-bin/mapserver/users/bomw0052/latest";
oNameAlias.sAlias="server4";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
oNameAlias=new Object();
oNameAlias.sName="srv-bx-uat2";
oNameAlias.sAlias="server5";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
oNameAlias=new Object();
oNameAlias.sName="srv-bx-web3";
oNameAlias.sAlias="server6";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
oNameAlias=new Object();
oNameAlias.sName="address.maps.nsw.gov.au/HRAddressSearchWeb/services";
oNameAlias.sAlias="server7";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
oNameAlias=new Object();
oNameAlias.sName="address/HRAddressSearchWeb/services";
oNameAlias.sAlias="server8";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
oNameAlias=new Object();
oNameAlias.sName="srv-bx-uat1";
oNameAlias.sAlias="server9";
SIXConfig.aServerAliases[SIXConfig.aServerAliases.length]=oNameAlias;
SIXConfig.aAddressRoadTypes=["","ACCESS","ALLEY","ALLEYWAY","AMBLE","APPROACH","ARCADE","ARTERIAL","ARTERY","AVENUE","BANAN","BEND","BOARDWALK","BOULEVARD","BRACE","BRAE","BREAK","BROADWAY","BROW","BYPASS","BYWAY","CAUSEWAY","CENTRE","CHASE","CIRCLE","CIRCLET","CIRCUIT","CIRCUS","CLOSE","COMMON","CONCOURSE","COPSE","CORNER","COURT","COURTYARD","COVE","CRESCENT","CREST","CROSS","CROSSING","CUL-DE-SAC","CUTTING","DALE","DEVIATION","DIP","DISTRIBUTOR","DRIVE","DRIVEWAY","EDGE","ELBOW","END","ENTRANCE","ESPLANADE","EXPRESSWAY","EXTENSION","FAIRWAY","FIRETRACK","FIRETRAIL","FOLLOW","FOOTWAY","FORMATION","FREEWAY","FRONTAGE","GAP","GARDEN","GARDENS","GATE","GLADE","GLEN","GRANGE","GREEN","GROVE","HEIGHTS","HIGHROAD","HIGHWAY","HILL","INTERCHANGE","JUNCTION","KEY","LANE","LANEWAY","LINE","LINK","LOOKOUT","LOOP","MALL","MEANDER","MEWS","MOTORWAY","NOOK","OUTLOOK","PARADE","PARKWAY","PASS","PASSAGE","PATH","PATHWAY","PIAZZA","PLACE","PLAZA","POCKET","POINT","PORT","PROMENADE","QUADRANT","QUAY","QUAYS","RAMBLE","RAMP","REST","RETREAT","RIDGE","RING","RISE","ROAD","ROADS","ROTARY","ROUTE","ROW","RUE","SERVICEWAY","SHUNT","SPUR","SQUARE","STAIRS","STEPS","STREET","STRIP","SUBWAY","TARN","TERRACE","THOROUGHFARE","TOLLWAY","TOP","TOR","TRACK","TRAIL","TURN","UNDERPASS","VALE","VIADUCT","VIEW","VISTA","WALK","WALKWAY","WAY","WHARF","WYND"];
SIX.provide("SIX.js");
SIX.require("SIXConfig.js");
SIX.require("AnchorPosition.js");
SIX.require("sorttable.js");
SIX.require("GDT_EPSG_Mappings.js");
SIX.require("json2.js");
SIX.require("NCSProgressbar3.js");
SIX.require("MarkerSymbols.js");
if(!window.Node){
var Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};
}
SIX.aUidToObject=new Object();
SIX.nRefIndex=0;
SIX.aRefArray=new Array();
SIX.addRef=function(obj){
SIX.nRefIndex++;
SIX.aRefArray[SIX.nRefIndex]=obj;
obj.myself="SIX.aRefArray["+SIX.nRefIndex+"]";
};
SIX.Uid=new function(_6cf){
this.aPrefixes=new Object();
};
SIX.Uid.getUid=function(_6d0){
var _6d1=(_6d0&&_6d0!="")?_6d0:"default";
if(!this.aPrefixes[_6d1]){
this.aPrefixes[_6d1]=1;
}else{
this.aPrefixes[_6d1]+=1;
}
return (_6d1+"Uid"+this.aPrefixes[_6d1]);
};
var timestamp=0;
var DEBUG=1;
function debug(flag,_6d3,_6d4){
if(flag){
var _6d5=debug.caller.toString();
_6d5=_6d5.substring(10,_6d5.indexOf(")")+1);
var msg="In "+_6d5+": "+_6d3+"="+_6d4;
var now=new Date();
var _6d8=now-timestamp;
if(_6d8<10000){
msg+=" ("+_6d8+" msec)";
}
timestamp=now;
java.lang.System.out.println(msg);
}
};
SIX.LastError=new function(){
this.sTitle="";
this.sMessage="";
this.sErrorText="";
};
SIX.LastError.setLastError=function(_6d9,_6da,_6db){
this.sTitle=_6d9;
this.sMessage=_6da;
this.sErrorText=_6db;
};
SIX.Util={};
SIX.Util.decToHex=function(nDec){
var _6dd="0123456789abcdef";
var sHex=_6dd.substr(nDec&15,1);
while(nDec>15){
nDec>>=4;
sHex=_6dd.substr(nDec&15,1)+sHex;
}
return sHex;
};
SIX.Util.hexToDec=function(sHex){
return parseInt(sHex,16);
};
SIX.Util.hexNoPrefix=function(sHex){
var _6e1=sHex;
if(sHex.substring(0,1)=="#"){
_6e1=sHex.substring(1,7);
}else{
if((sHex.substring(0,2)=="0x")||(sHex.substring(0,2)=="0X")){
_6e1=sHex.substring(2,8);
}
}
return _6e1;
};
SIX.Util.rgbToHex=function(_6e2){
var _6e3="";
if(_6e2.length>=3){
var _6e4=SIX.Util.decToHex(_6e2[0]);
if(_6e4.length==1){
_6e4="0"+_6e4;
}
var _6e5=SIX.Util.decToHex(_6e2[1]);
if(_6e5.length==1){
_6e5="0"+_6e5;
}
var _6e6=SIX.Util.decToHex(_6e2[2]);
if(_6e6.length==1){
_6e6="0"+_6e6;
}
_6e3="#"+_6e4+_6e5+_6e6;
}
return _6e3;
};
SIX.Util.toHex=function(_6e7){
var sHex="";
_6e7=_6e7.toLowerCase();
if((_6e7.indexOf("#")!=-1)||(_6e7.indexOf("transparent")!=-1)){
sHex=_6e7;
}else{
_6e7=_6e7.replace(/\s+/g,"");
var _6e9=_6e7.indexOf("rgb(");
var _6ea=_6e7.indexOf(")");
if((_6e9!=-1)&&(_6ea!=-1)){
_6e7=_6e7.substring(_6e9+4,_6ea);
var aRGB=_6e7.split(",");
sHex=SIX.Util.rgbToHex(aRGB);
}
}
return sHex;
};
SIX.Util.hexToRgb=function(_6ec){
if(_6ec.substring(0,1)=="#"){
_6ec=_6ec.substring(1,7);
}
var aRGB=new Array();
var nR=SIX.Util.hexToDec(_6ec.substring(0,2));
var nG=SIX.Util.hexToDec(_6ec.substring(2,4));
var nB=SIX.Util.hexToDec(_6ec.substring(4,6));
if(isNaN(nR)||isNaN(nG)||isNaN(nB)){
return null;
}
aRGB[0]=nR;
aRGB[1]=nG;
aRGB[2]=nB;
return aRGB;
};
SIX.Util.clone=function(src){
var _6f2=src;
if(src&&(typeof (src)=="object")){
_6f2=new Object();
for(var i in src){
_6f2[i]=this.clone(src[i]);
}
}
return _6f2;
};
SIX.Util.trim=function(str){
var _6f5=str.replace(/^\s+/g,"");
_6f5=_6f5.replace(/\s+$/g,"");
return _6f5;
};
SIX.Util.compareStrings=function(s1,s2){
var _6f8=false;
if(s1==s2){
_6f8=true;
}else{
if((typeof s1=="string")&&(typeof s2=="string")&&(s1.toLowerCase()==s2.toLowerCase())){
_6f8=true;
}
}
return _6f8;
};
SIX.Util.cookiesEnabled=function(){
var _6f9=document.cookie;
var _6fa=true;
document.cookie="cookies_enabled=1";
var pos=document.cookie.indexOf("cookies_enabled=");
if(pos==-1){
_6fa=false;
}
document.cookie=_6f9;
return _6fa;
};
SIX.Util.setCookie=function(name,_6fd,_6fe,path,_700,_701){
if(!this.cookiesEnabled()){
return;
}
var _702=new Date();
_702.setTime(_702.getTime());
if(_6fe){
_6fe=_6fe*1000*60*60*24;
}
var _703=new Date(_702.getTime()+_6fe);
document.cookie=name+"="+escape(_6fd)+(_6fe?";expires="+_703.toGMTString():"")+(path?";path="+path:"")+(_700?";domain="+_700:"")+(_701?";secure":"");
};
SIX.Util.getCookie=function(name){
if(!this.cookiesEnabled()){
return null;
}
var _705=document.cookie.indexOf(name+"=");
var len=_705+name.length+1;
if(!_705&&(name!=document.cookie.substring(0,name.length))){
return null;
}
if(_705==-1){
return null;
}
var end=document.cookie.indexOf(";",len);
if(end==-1){
end=document.cookie.length;
}
return unescape(document.cookie.substring(len,end));
};
SIX.Util.deleteCookie=function(name,path,_70a){
if(!this.cookiesEnabled()){
return;
}
if(this.getCookie(name)){
document.cookie=name+"="+(path?";path="+path:"")+(_70a?";domain="+_70a:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
};
SIX.Util.getQueryStringParamValue=function(_70b){
var _70c=window.location.search.substring(1);
_70c=unescape(_70c);
var _70d=_70c.split("&");
var _70e="";
for(var i=0;i<_70d.length;i++){
var _710=_70d[i].split("=");
if(_710[0].toLowerCase()==_70b.toLowerCase()){
_70e=_710[1];
break;
}
}
return _70e;
};
SIX.Util.getQueryStringParamValueEx=function(_711,_712,_713){
var _714=_711.split(_713);
var _715="";
for(var i=0;i<_714.length;i++){
var _717=_714[i].split("=");
if(_717[0].toLowerCase()==_712.toLowerCase()){
_715=_717[1];
break;
}
}
return _715;
};
SIX.Util.stringToDegrees=function(s){
var s2=s.replace("&deg;",":");
s2=s2.replace("'",":");
s2=s2.replace("\"",":");
s2=s2.replace(/\s+/g,":");
var _71a=false;
if(s2.length&&s2.substr(0,1)=="-"){
_71a=true;
s2=s2.substr(1,s2.length-1);
}
var dms=s2.split(":");
var dd=0;
var _71d=1;
for(var i=0;i<dms.length;i++){
var part=parseFloat(dms[i]);
if(isNaN(part)){
break;
}
dd+=(part/_71d);
_71d=_71d*60;
}
if(_71a||s.substr(s.length-1,1)=="S"||s.substr(s.length-1,1)=="W"){
dd*=-1;
}
return dd;
};
SIX.Util.latitudeToString=function(dd){
var dms=this.DDToDMS(dd);
dms+=(dd>=0?"N":"S");
return dms;
};
SIX.Util.longitudeToString=function(dd){
var dms=this.DDToDMS(dd);
dms+=(dd>=0?"E":"W");
return dms;
};
SIX.Util.DDToDMS=function(dd){
var d=Math.abs(dd);
var nDeg=Math.floor(d);
d=(d-nDeg)*60;
nMin=Math.floor(d);
d=(d-nMin)*60;
nSec=d.toFixed(2);
if(nSec==60){
nSec=0;
nMin+=1;
if(nMin==60){
nMin=0;
nDeg+=1;
}
}
var dms=nDeg+"&deg;"+(nMin<10?"0"+nMin:nMin)+"'"+(nSec<10?"0"+nSec:nSec)+"\"";
return dms;
};
SIX.Util.pause=function(_728){
var tNow=new Date();
var _72a=tNow.getTime()+_728;
while(true){
tNow=new Date();
if(tNow.getTime()>_72a){
return;
}
}
};
SIX.Util.formatDate=function(date,_72c){
var _72d=_72c;
var sDay=SIX.Util.getZeroPadded(date.getDate(),2);
var _72f=SIX.Util.getZeroPadded(date.getMonth()+1,2);
var _730=SIX.Util.getZeroPadded(date.getFullYear(),2);
var _731=SIX.Util.getZeroPadded(date.getHours(),2);
var _732=SIX.Util.getZeroPadded(date.getMinutes(),2);
var _733=SIX.Util.getZeroPadded(date.getSeconds(),2);
_72d=_72d.replace("dd",sDay);
_72d=_72d.replace("mm",_72f);
_72d=_72d.replace("yyyy",_730);
_72d=_72d.replace("yy",_730.substring(2,4));
_72d=_72d.replace("hh",_731);
_72d=_72d.replace("mm",_732);
_72d=_72d.replace("ss",_733);
return _72d;
};
SIX.Util.timeStampToDate=function(_734,_735){
var _736="Invalid time stamp";
_734=_734.replace(/ /g,"");
if((_734.length==10)||(_734.length==12)||(_734.length==13)){
var _737=parseInt(_734);
if(!isNaN(_737)){
var date=new Date(_737);
_736=SIX.Util.formatDate(date,_735);
}
}
return _736;
};
SIX.Util.getZeroPadded=function(nNum,_73a){
var sNum=""+nNum;
while(sNum.length<_73a){
sNum="0"+nNum;
}
return sNum;
};
SIX.Util.getSpaces=function(_73c){
var _73d="";
for(var i=0;i<_73c;i++){
_73d+=" ";
}
return _73d;
};
SIX.Util.getStyle=function(el,_740){
if(el.currentStyle){
var _741=el.currentStyle[_740];
}else{
if(window.getComputedStyle){
var _741=document.defaultView.getComputedStyle(el,null).getPropertyValue(_740);
}
}
return _741;
};
SIX.Hash=function(){
this.length=0;
this.items=new Object();
for(var i=0;i<arguments.length;i+=2){
if(typeof (arguments[i+1])!="undefined"){
this.items[arguments[i]]=arguments[i+1];
this.length++;
}
}
};
SIX.Hash.prototype.removeItem=function(key){
var _744;
if(typeof (this.items[key])!="undefined"){
this.length--;
var _744=this.items[key];
delete this.items[key];
}
return _744;
};
SIX.Hash.prototype.removeAllItems=function(){
for(var i in this.items){
if(this.items.hasOwnProperty(i)){
this.removeItem(i);
}
}
};
SIX.Hash.prototype.getItem=function(key){
return this.items[key];
};
SIX.Hash.prototype.setItem=function(key,_748){
if(typeof (_748)!="undefined"){
if(typeof (this.items[key])=="undefined"){
this.length++;
}
this.items[key]=_748;
}
return _748;
};
SIX.Hash.prototype.hasItem=function(key){
return (typeof (this.items[key])!="undefined");
};
SIX.Point=function(x,y){
this.x=x?x:0;
this.y=y?y:0;
};
SIX.Envelope=function(_74c,_74d,_74e,_74f){
this.dMinX=_74c;
this.dMinY=_74d;
this.dMaxX=_74e;
this.dMaxY=_74f;
};
SIX.Envelope.prototype.setMinX=function(_750){
this.dMinX=_750;
};
SIX.Envelope.prototype.setMinY=function(_751){
this.dMinY=_751;
};
SIX.Envelope.prototype.setMaxX=function(_752){
this.dMaxX=_752;
};
SIX.Envelope.prototype.setMaxY=function(_753){
this.dMaxY=_753;
};
SIX.Envelope.prototype.containsPoint=function(_754){
var _755=false;
if((_754.x>=this.dMinX)&&(_754.x<=this.dMaxX)&&(_754.y>=this.dMinY)&&(_754.y<=this.dMaxY)){
_755=true;
}
return _755;
};
SIX.Envelope.prototype.containsPoints=function(_756){
var _757=true;
for(var i=0;i<_756.length;i++){
if(!this.containsPoint(_756[i])){
_757=false;
break;
}
}
return _757;
};
SIX.Envelope.prototype.contains=function(_759){
var _75a=false;
if((_759.dMinX>this.dMinX)&&(_759.dMaxX<this.dMaxX)&&(_759.dMinY>this.dMinY)&&(_759.dMaxY<this.dMaxY)){
_75a=true;
}
return _75a;
};
SIX.Envelope.prototype.intersects=function(_75b){
var _75c=false;
if((((_75b.dMinX<=this.dMinX)&&(_75b.dMaxX>=this.dMinX))||((_75b.dMinX>=this.dMinX)&&(_75b.dMinX<=this.dMaxX)))&&(((_75b.dMaxY>=this.dMaxY)&&(_75b.dMinY<=this.dMaxY))||((_75b.dMaxY<=this.dMaxY)&&(_75b.dMaxY>=this.dMinY)))){
_75c=true;
}
return _75c;
};
SIX.Polygon=function(_75d,_75e){
this.envelope=(_75e?_75e:null);
this.aRings=_75d;
};
SIX.Polygon.prototype.containsPoint=function(_75f){
if(this.envelope&&!this.envelope.containsPoint(_75f)){
return false;
}
var _760=false;
if(this.aRings){
var _761=this.aRings;
for(var i=0;i<_761.length;i++){
var ring=_761[i];
if(SIX.Util.inRegion(ring.aPoints,_75f)){
_760=true;
var _764=ring.aHoles;
for(var j=0;j<_764.length;j++){
if(SIX.Util.inRegion(_764[j].aPoints,_75f)){
_760=false;
break;
}
}
if(_760){
break;
}
}
}
}
return _760;
};
SIX.PolygonRing=function(_766,_767){
this.aPoints=_766;
this.aHoles=_767;
};
SIX.PolygonHole=function(_768){
this.aPoints=_768;
};
SIX.Util.pointsInRegion=function(_769,_76a){
var _76b=false;
if(_76a.length){
_76b=true;
for(var i=0;i<_76a.length;i++){
if(!this.inRegion(_769,_76a[i])){
_76b=false;
break;
}
}
}
return _76b;
};
SIX.Util.inRegion=function(_76d,_76e){
var _76f=false;
var _770=((_76d[0].x==_76d[_76d.length-1].x)&&(_76d[0].y==_76d[_76d.length-1].y));
var _771=(_770?_76d.length-1:_76d.length);
if(_771>=3){
var i=0;
var j=0;
for(i=0;i<_771;i++){
j++;
if(j==_771){
j=0;
}
if(_76d[i].y<_76e.y&&_76d[j].y>=_76e.y||_76d[j].y<_76e.y&&_76d[i].y>=_76e.y){
if(_76d[i].x+(_76e.y-_76d[i].y)/(_76d[j].y-_76d[i].y)*(_76d[j].x-_76d[i].x)<_76e.x){
_76f=!_76f;
}
}
}
}
return _76f;
};
SIX.Util.searchObjectArray=function(_774,sKey,_776){
var _777=-1;
if(_774.length&&(typeof _774[0]=="object")&&(sKey!="")){
var _778=-1;
var _779=_774.length;
var nMid;
while(_779-_778>1){
nMid=(_778+_779)>>>1;
if(_774[nMid][sKey]<_776){
_778=nMid;
}else{
_779=nMid;
}
}
if((_779<_774.length)&&(_774[_779][sKey]==_776)){
_777=_779;
}else{
_777=-(_779+1);
}
}
return _777;
};
SIX.Util.escapeMarkup=function(_77b){
var _77c=_77b.replace(/\\'/g,"&#92;&#39;");
_77c=_77c.replace(/'/g,"&#39;");
_77c=_77c.replace(/\\"/g,"&#92;&#34;");
_77c=_77c.replace(/"/g,"&#34;");
_77c=_77c.replace(/</g,"&lt;");
_77c=_77c.replace(/>/g,"&gt;");
return _77c;
};
SIX.Util.convertTextUrlsToLinks=function(_77d){
var _77e=_77d.replace(/^(http|https|ftp)(:\/\/\S+)/gim,"<a href='$1$2' target='_blank'>$1$2</a>");
_77e=_77e.replace(/^(www\.\S+)/gim,"<a href='http://$1' target='_blank'>$1</a>");
_77e=_77e.replace(/(\s)(http|https|ftp)(:\/\/\S+)/gim,"$1<a href='$2$3' target='_blank'>$2$3</a>");
_77e=_77e.replace(/(\s)(www\.\S+)/gim,"$1<a href='http://$2' target='_blank'>$2</a>");
_77e=_77e.replace(/\r\n/g,"<br>");
_77e=_77e.replace(/\r/g,"<br>");
_77e=_77e.replace(/\n/g,"<br>");
_77e=_77e.replace(/  </gi,"&nbsp; <");
if(_77e!=""){
var _77f="";
while(_77f!=_77e){
_77f=_77e;
_77e=_77f.replace(/  &nbsp;/gi," &nbsp;&nbsp;");
}
}
_77e=_77e.replace(/>  /gi,"> &nbsp;");
if(_77e!=""){
var _77f="";
while(_77f!=_77e){
_77f=_77e;
_77e=_77f.replace(/&nbsp;  /gi,"&nbsp;&nbsp; ");
}
}
_77e=_77e.replace(/<br><br>/g,"<br>&nbsp;<br>");
_77e=_77e.replace(/<br><br>/g,"<br>&nbsp;<br>");
return _77e;
};
SIX.Util.calculateArea=function(_780){
var _781=0;
for(var i=0;i<_780.length;i++){
var _783=_780[i];
if(_783 instanceof SIX.Point){
var x1=_783.x;
var y1=_783.y;
}else{
var x1=_783[0];
var y1=_783[1];
}
var j=(i+1)%_780.length;
var _787=_780[j];
if(_787 instanceof SIX.Point){
var x2=_787.x;
var y2=_787.y;
}else{
var x2=_787[0];
var y2=_787[1];
}
_781+=x1*y2;
_781-=y1*x2;
}
_781=Math.abs(_781/2);
return _781;
};
SIX.Util.findPosX=function(obj){
var _78b=0;
if(obj.offsetParent){
while(1){
_78b+=obj.offsetLeft;
if(!obj.offsetParent){
break;
}
obj=obj.offsetParent;
}
}else{
if(obj.x){
_78b+=obj.x;
}
}
return _78b;
};
SIX.Util.findPosY=function(obj){
var _78d=0;
if(obj.offsetParent){
while(1){
_78d+=obj.offsetTop;
if(!obj.offsetParent){
break;
}
obj=obj.offsetParent;
}
}else{
if(obj.y){
_78d+=obj.y;
}
}
return _78d;
};
SIX.Util.sortSelect=function(obj){
var o=new Array();
if(obj==null||obj.options==null){
return;
}
for(var i=0;i<obj.options.length;i++){
o[o.length]=new Option(obj.options[i].text,obj.options[i].value,obj.options[i].defaultSelected,obj.options[i].selected);
}
if(o.length==0){
return;
}
o=o.sort(function(a,b){
if((a.text+"")<(b.text+"")){
return -1;
}
if((a.text+"")>(b.text+"")){
return 1;
}
return 0;
});
for(var i=0;i<o.length;i++){
obj.options[i]=new Option(o[i].text,o[i].value,o[i].defaultSelected,o[i].selected);
}
};
SIX.Util.getScreenXDPI=function(){
var _793=96;
if(SIX.App.isIE){
_793=screen.deviceXDPI;
}else{
var _794=document.getElementById("ScreenDPICalculator");
if(_794){
_793=_794.offsetWidth;
}
}
return _793;
};
SIX.Util.getScreenYDPI=function(){
var _795=96;
if(SIX.App.isIE){
_795=screen.deviceYDPI;
}else{
var _796=document.getElementById("ScreenDPICalculator");
if(_796){
_795=_796.offsetHeight;
}
}
return _795;
};
SIX.Util.getRandomNum=function(_797,_798){
return (Math.floor(Math.random()*(_798-_797))+_797);
};
SIX.Util.getRandomChar=function(_799,_79a,_79b,_79c,_79d){
var _79e="0123456789";
var _79f="abcdefghijklmnopqrstuvwxyz";
var _7a0="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var _7a1="`~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/? ";
var _7a2=_79d;
if(_799==true){
_7a2+=_79e;
}
if(_79a==true){
_7a2+=_79f;
}
if(_79b==true){
_7a2+=_7a0;
}
if(_79c==true){
_7a2+=_7a1;
}
return _7a2.charAt(this.getRandomNum(0,_7a2.length));
};
SIX.Util.getParentNode=function(el,_7a4){
if(el==null){
return null;
}else{
if(el.nodeType==Node.ELEMENT_NODE&&el.tagName.toLowerCase()==_7a4.toLowerCase()){
return el;
}else{
return this.getParentNode(el.parentNode,_7a4);
}
}
};
SIX.Util.isParentNode=function(node,_7a6){
var _7a7=false;
if(node&&_7a6&&node!=_7a6){
var _7a8=_7a6.parentNode;
while(_7a8){
if(node==_7a8){
_7a7=true;
break;
}
_7a8=_7a8.parentNode;
}
}
return _7a7;
};
SIX.Util.extend=function(_7a9,_7aa){
for(var i in _7aa.prototype){
if(_7aa.prototype.hasOwnProperty(i)&&typeof _7a9.prototype[i]=="undefined"){
_7a9.prototype[i]=_7aa.prototype[i];
}
}
for(var i in _7aa){
if(_7aa.hasOwnProperty(i)&&typeof _7aa[i]!="function"&&typeof _7a9[i]=="undefined"){
_7a9[i]=_7aa[i];
}
}
};
SIX.Util.getParameter=function(_7ac,name,_7ae){
var _7af=_7ac&&typeof _7ac[name]!="undefined"?_7ac[name]:_7ae;
return _7af;
};
SIX.Util.interpolateRGBColors=function(_7b0,_7b1,_7b2){
var _7b3=new Array();
var _7b4=_7b0[0];
var _7b5=_7b0[1];
var _7b6=_7b0[2];
var _7b7=_7b1[0];
var _7b8=_7b1[1];
var _7b9=_7b1[2];
var _7ba=_7b7-_7b4;
var _7bb=_7b8-_7b5;
var _7bc=_7b9-_7b6;
for(var i=0;i<_7b2+1;i++){
var nR=_7b4+(_7ba*i/_7b2);
var nG=_7b5+(_7bb*i/_7b2);
var nB=_7b6+(_7bc*i/_7b2);
var _7c1=SIX.Util.decToHex(nR);
if(_7c1.length==1){
_7c1="0"+_7c1;
}
var _7c2=SIX.Util.decToHex(nG);
if(_7c2.length==1){
_7c2="0"+_7c2;
}
var _7c3=SIX.Util.decToHex(nB);
if(_7c3.length==1){
_7c3="0"+_7c3;
}
var _7c4="#"+_7c1+_7c2+_7c3;
_7b3[i]=_7c4.toLowerCase();
}
return _7b3;
};
SIX.Util.interpolateHexColors=function(_7c5,_7c6,_7c7){
var _7c8=SIX.Util.hexToRgb(_7c5);
var _7c9=SIX.Util.hexToRgb(_7c6);
return SIX.Util.interpolateRGBColors(_7c8,_7c9,_7c7);
};
SIX.Util.interpolateRGBColor=function(_7ca,_7cb,_7cc){
var _7cd=_7ca[0];
var _7ce=_7ca[1];
var _7cf=_7ca[2];
var _7d0=_7cb[0];
var _7d1=_7cb[1];
var _7d2=_7cb[2];
var _7d3=_7d0-_7cd;
var _7d4=_7d1-_7ce;
var _7d5=_7d2-_7cf;
var nR=_7cd+(_7d3*_7cc/100);
var nG=_7ce+(_7d4*_7cc/100);
var nB=_7cf+(_7d5*_7cc/100);
var _7d9=SIX.Util.decToHex(nR);
if(_7d9.length==1){
_7d9="0"+_7d9;
}
var _7da=SIX.Util.decToHex(nG);
if(_7da.length==1){
_7da="0"+_7da;
}
var _7db=SIX.Util.decToHex(nB);
if(_7db.length==1){
_7db="0"+_7db;
}
var _7dc="#"+_7d9+_7da+_7db;
_7dc=_7dc.toLowerCase();
return _7dc;
};
SIX.Util.interpolateHexColor=function(_7dd,_7de,_7df){
var _7e0=SIX.Util.hexToRgb(_7dd);
var _7e1=SIX.Util.hexToRgb(_7de);
return SIX.Util.interpolateRGBColor(_7e0,_7e1,_7df);
};
SIX.Util.interpolateHexColorsArray=function(_7e2,_7e3){
var _7e4=new Array();
for(var i=0;i<_7e3;i++){
var dBin=(_7e2.length-1)*i/_7e3;
var nBin=Math.floor(dBin);
var _7e8=_7e2[nBin];
var _7e9=_7e2[nBin+1];
var _7ea=100*(dBin-nBin);
_7e4[i]=SIX.Util.interpolateHexColor(_7e8,_7e9,_7ea);
}
return _7e4;
};
SIX.Parameters=function(_7eb){
var _7ec=_7eb.split(";");
this.parameters=new Object();
for(var i=0;i<_7ec.length;i++){
var _7ee=_7ec[i].indexOf("=");
this.parameters[_7ec[i].substr(0,_7ee).toLowerCase()]=_7ec[i].substr(_7ee+1);
}
};
SIX.Parameters.prototype.getParameter=function(name,type,_7f1){
type=type.toLowerCase();
var _7f2=_7f1;
if(this.parameters&&typeof this.parameters[name]!="undefined"){
switch(type){
case "boolean":
_7f2=this.parameters[name].toLowerCase()=="true";
break;
case "number":
_7f2=parseFloat(this.parameters[name]);
break;
case "string":
_7f2=this.parameters[name];
break;
}
}
return _7f2;
};
SIX.eMapLoadState={LOAD_ERROR:-1,NOT_LOADED:0,LOADING:1,LOADED:2};
SIX.eLayersLoadState={LOAD_ERROR:-1,NOT_LOADED:0,LOADING:1,LOADED:2};
SIX.Access=function(_7f3,_7f4){
SIX.addRef(this);
this.service=_7f3;
this.name="";
};
SIX.Access.prototype.updateMap=function(map){
if(this.service.aServices.length){
for(var i=0;i<this.service.aServices.length;i++){
this.service.aServices[i].access.updateMap(map);
}
this.service.loaded=true;
return;
}
var _7f7=document[map.uid];
if(this.service.loaded&&!this.service.active){
this.service.busy(false);
}else{
if(!this.service.loaded){
if(this.service.queries){
for(var i=0;i<this.service.queries.aQueries.length;i++){
var _7f8=_7f7.GetLayerIndex(this.service.queries.aQueries[i].uid);
if(_7f8==-1){
_7f8=map.addLayer("GISOverlay","",this.service.queries.aQueries[i].uid,"");
}
if(_7f8==-1){
alert("Unable to open GIS layer\n"+this.service.queries.aQueries[i].uid);
this.service.online(false);
break;
}
}
}
var _7f8=_7f7.GetLayerIndex(this.service.uid);
if(_7f8==-1){
_7f8=map.addLayer("GISOverlay","",this.service.uid,"");
}
if(_7f8==-1){
alert("Unable to open GIS layer\n"+this.service.uid);
this.service.online(false);
}else{
this.service.loaded=true;
map.setLayerTransparency(this.service.uid,"#",this.service.transparency);
if(this.service.colorMask){
var mask="transmask=#"+this.service.colorMask.toString(16);
map.setLayerParameter(this.service.uid,mask);
}
var _7fa;
for(_7fa in this.service.colors){
if(this.service.colors.hasOwnProperty(_7fa)){
map.setLayerTransparency(this.service.uid,_7fa,this.service.colors[_7fa].percent/100);
}
}
this.orderLayers(map);
}
}
}
this.service.loadMap(map);
};
SIX.Access.prototype.loadMap=function(map){
};
SIX.Access.prototype.loadLayers=function(map){
this.service.nLayersLoadState=SIX.eLayersLoadState.LOADED;
return true;
};
SIX.Access.prototype.queryLayers=function(map){
};
SIX.Access.prototype.responseMap=function(map,_7ff,url,body,_802,tlx,tly,brx,bry,_807){
return true;
};
SIX.Access.prototype.queryResponse=function(map){
};
SIX.Access.prototype.searchResponse=function(map){
};
SIX.Access.prototype.searchMap=function(map,_80b){
};
SIX.Access.prototype.orderLayers=function(map){
var _80d=document[map.uid];
var _80e=((_80d.GetLayerIndex(map.sDefaultECWJP2LayerName)>-1)?1:0);
var _80f=this.service.catalog;
for(var i=0;i<_80f.services.length;i++){
var _811=_80f.services[_80f.servicesOrder[i]];
if(_811.access instanceof SIX.Access.ECWP){
for(var j=_811.layers.length-1;j>=0;j--){
var _813=_811.layers[_811.layersOrder[j]];
if(_813.loaded){
var _814=_80d.GetLayerIndex(_813.uid);
if(_814!=-1){
if(_814!=_80e){
map.moveLayer(_814,_80e);
}
_80e+=1;
}
for(var k=_813.aLayers.length-1;k>=0;k--){
var _816=_813.aLayers[k];
var _817=_80d.GetLayerIndex(_816.uid);
if(_817!=-1){
if(_817!=_80e){
map.moveLayer(_817,_80e);
}
_80e+=1;
}
}
}
}
}else{
if(_811.loaded){
var _814=_80d.GetLayerIndex(_811.uid);
if(_814!=-1){
if(_814!=_80e){
map.moveLayer(_814,_80e);
}
_80e+=1;
}
for(var j=_811.aServices.length-1;j>=0;j--){
var _818=_811.aServices[j];
var _814=_80d.GetLayerIndex(_818.uid);
if(_814!=-1){
if(_814!=_80e){
map.moveLayer(_814,_80e);
}
_80e+=1;
}
}
}
}
}
};
SIX.Access.prototype.getScale=function(map){
return map.scale;
};
SIX.Access.prototype.getBestScale=function(map){
return 0;
};
SIX.Access.ECWP=function(_81b){
SIX.Access.call(this,_81b);
this.name="Image Web Server (ECWP protocol)";
this.hasMetadata=true;
this.hasLegend=false;
this.hasQuery=false;
this.hasSearch=false;
this.canReorder=true;
this.hasPrint=true;
};
SIX.Util.extend(SIX.Access.ECWP,SIX.Access);
SIX.Access.ECWP.prototype.updateMap=function(map){
if(this.service.aServices.length){
for(var i=0;i<this.service.aServices.length;i++){
this.service.aServices[i].access.updateMap(map);
}
this.service.loaded=true;
return;
}
var _81e=false;
map.bAllowExtentsUpdate=false;
this.service.loaded=true;
var _81f=document[map.uid];
var _820=0;
var _821="<table>";
var _822=new SIX.CoordSys();
var _823=false;
var _824=SIX.App.getCurrentChannel();
var _825=false;
for(var i=0;i<this.service.layers.length;i++){
var _826=this.service.layers[this.service.layersOrder[i]];
if(_826.loaded&&(!_826.bInList||!_826.bSelected||!_826.bInScale||!this.service.active)){
if(this.service.deleteEcwpLayer(map,_826)){
_825=true;
}
}else{
if(_826.bSelected&&_826.bInScale&&this.service.active){
for(var j=0;j<_826.aLayers.length;j++){
var _828=_826.aLayers[j];
if(_828.loaded&&(!_828.bSelected||!_828.bInScale)){
if(this.service.deleteEcwpLayer(map,_828)){
_825=true;
}
}
if(!_828.loaded&&_828.bSelected&&_828.bInScale){
_826.loaded=false;
}
}
if(!_823){
if(!map.coordSys.equals(_826.coordSys)){
_823=true;
map.coordSys=_826.coordSys.clone(map.coordSys);
}
}
_822=_826.coordSys.clone(_822);
}
}
}
var _829=false;
if(_825&&!_823){
_823=this.checkECWJP2Exists(map);
}
if((map.coordSys.initialized()&&_822.initialized()&&!map.coordSys.equals(_822))||_823){
_829=true;
for(var i=0;i<map.catalog.services.length;i++){
var _82a=map.catalog.services[i];
if(_82a.access instanceof SIX.Access.ECWP){
for(var j=0;j<_82a.layers.length;j++){
var _826=_82a.layers[j];
_82a.deleteEcwpLayer(map,_826);
}
}
}
}
for(var i=this.service.layers.length-1;i>=0;i--){
var _826=this.service.layers[this.service.layersOrder[i]];
if(!_826.loaded&&_826.bInList&&_826.bSelected&&_826.bInScale&&this.service.active){
if(_81f.GetLayerIndex(map.sDefaultECWJP2LayerName)!=-1){
map.deleteAllLayers();
for(var j=0;j<map.catalog.services.length;j++){
var svc=map.catalog.services[j];
if(svc!=this.service){
svc.loaded=false;
for(var k=0;k<svc.aServices.length;k++){
svc.aServices[k].loaded=false;
}
}
}
}
var _82d;
var _82e;
if(_826.url&&_826.url!=""){
if(_826.bCalculateExtents&&!(_826.tlLatitude||_826.tlLongitude||_826.brLatitude||_826.brLongitude)){
_82e=_81f.GetLayerIndex(_826.uid);
if(_82e==-1){
_82e=map.addLayer("ecwjp2",_826.url,_826.uid,"freecache=true;visibility=false"+(_826.bOTDF?";otdf=true":""));
}
if(_82e!=-1){
map.setLayerExtents(_826);
if(!map.layerInExtents(_826)){
_826.bInScale=false;
_81e=true;
}
map.deleteLayer(_826.uid);
}
}
if(_826.bInScale){
_82e=_81f.GetLayerIndex(_826.uid);
if(_82e==-1){
var _82f="freecache="+SIXConfig.FREECACHE;
if(SIX.App.bDHTMLControl){
if(_826.bOTDF){
_82f+=";otdf=true";
}else{
var _830="";
if(_826.aClipRegion.length&&!map.inLayerClipRegion(_826)){
_830=_826.getClipRegionStr();
if(_830!=""){
_82f+=";imagetype=png;otdf=false;clipregion="+_830;
}
}
if(_826.sOTDFPath!=""){
_82f+=";otdfpath="+_826.sOTDFPath;
if(_830==""){
_82f+=";otdf=true;imagetype=jpg";
}
}
}
}
_82e=map.addLayer("ecwjp2",_826.url,_826.uid,_82f);
}
if(_82e!=-1){
map.uncacheEcwpLayer(_826);
map.setLayerClipRegion(_826);
}
}
}
if(_82e!=-1){
for(var j=0;j<_826.aLayers.length;j++){
var _828=_826.aLayers[j];
if(_828.bInScale&&_828.bSelected){
var _831=_81f.GetLayerIndex(_828.uid);
if(_831==-1){
var _832=function(_833){
var _834=_81f.GetLastErrorText();
var _835="Unable to open image layer "+_833.url+"\n"+_834;
alert(_835);
};
if(_828.bCalculateExtents&&!(_828.tlLatitude||_828.tlLongitude||_828.brLatitude||_828.brLongitude)){
_82e=map.addLayer("ecwjp2",_828.url,_828.uid,"freecache=true;visibility=false"+(_828.bOTDF?";otdf=true":""));
if(_82e==-1){
_832(_828);
break;
}
map.setLayerExtents(_828);
if(!map.layerInExtents(_828)){
_828.bInScale=false;
_81e=true;
}
map.deleteLayer(_828.uid);
}
if(_828.bInScale){
var _82f="freecache="+SIXConfig.FREECACHE;
if(SIX.App.bDHTMLControl){
if(_828.bOTDF){
_82f+=";otdf=true";
}else{
var _830="";
if(_828.aClipRegion.length&&!map.inLayerClipRegion(_828)){
_830=_828.getClipRegionStr();
if(_830!=""){
_82f+=";imagetype=png;otdf=false;clipregion="+_830;
}
}
if(_828.sOTDFPath!=""){
_82f+=";otdfpath="+_828.sOTDFPath;
if(_830==""){
_82f+=";otdf=true";
}
}
}
}
_82e=map.addLayer("ecwjp2",_828.url,_828.uid,_82f);
if(_82e==-1){
_832(_828);
break;
}
_828.loaded=true;
map.uncacheEcwpLayer(_828);
map.setLayerClipRegion(_828);
}
}
}
}
}
if(_82e==-1){
var _836=_81f.GetLastErrorText();
var _837="Unable to open image layer\n "+_836;
if(_836.indexOf("licensed client limit has been reached")>-1){
_837="Due to unprecedented demand for image data from the "+"Department of Land's Spatial Information eXchange the "+"servers are overloaded and we are unable to fulfill "+"your image request at this time.\n\n Please try again "+"at a later time when the servers are less congested.";
}
_82d=new SIX.RequestResponse(_826.uid,_826.url,"","",0,0,0,0,0,SIXConfig.eRequestResponseStatus.FAILURE);
alert(_837);
this.service.layerVisibleNoUpdate(_826);
}else{
_82d=new SIX.RequestResponse(_826.uid,_826.url,"","",0,0,0,0,0,SIXConfig.eRequestResponseStatus.SUCCESS);
_826.loaded=true;
map.coordSys=_826.coordSys.clone(map.coordSys);
this.orderLayers(map);
}
this.service.statistics.addRequestResponse(_82d);
if(_824.console){
_824.console.updateHealth(this.service);
}
}
if(_826.loaded&&this.service.active){
_820++;
for(var _838 in this.service.colors){
if(this.service.colors.hasOwnProperty(_838)){
map.setLayerTransparency(_826.uid,_838,this.service.colors[_838].percent/100);
}
}
var host=_826.url.split("/");
_821+="<tr><td>"+_826.name+"</td><td>";
_821+="<img src='http://"+host[2]+"/ecwp/ecw_img.dll?thumbnail?ecw="+_826.url+"&sizex=64&sizey=64'>";
_821+="</td></tr>";
}
}
_821+="</table>";
this.service.setLegendUrl(_821);
var _83a=100*(_820>1?this.service.transparency:1);
this.service.setSliderPosition(_83a);
this.service.setTransparency(_83a);
if(this.checkECWJP2Exists(map)){
_829=true;
}
if(_829){
if((map.tlLatitude==0)||(map.tlLongitude==0)||(map.brLatitude==0)||(map.brLongitude==0)){
map.setExtentsAll();
}else{
map.setExtents(map.tly,map.tlx,map.bry,map.brx);
}
for(var i=0;i<map.catalog.services.length;i++){
var _83b=map.catalog.services[i];
if(_83b!=this.service){
_83b.access.updateMap(map);
}
}
}
if(map.bRoamClip){
map.initRoamClip();
}
map.bAllowExtentsUpdate=true;
if(!map.loaded){
var _83c=_81f.GetTopLeftWorldCoordinateX();
var _83d=_81f.GetTopLeftWorldCoordinateY();
var _83e=_81f.GetBottomRightWorldCoordinateX();
var _83f=_81f.GetBottomRightWorldCoordinateY();
_81f.SetExtents(_83c,_83d,_83e,_83f);
}else{
map.bAllowExtentsUpdate=false;
_81f.SetExtents(map.tlx,map.tly,map.brx,map.bry);
map.bAllowExtentsUpdate=true;
}
if(_824.console){
_824.console.updateHealth(this.service);
}
if(_81e){
map.hiddenLayers(this.service);
this.updateMap(map);
if(this.service.attachWin){
this.service.attachWin.build();
}
}
};
SIX.Access.ECWP.prototype.getBestScaleForLayer=function(map,_841){
var _842=document[map.uid];
var _843=0;
var _844=_842.GetLayerIndex(_841.uid);
if(_844>=0){
var _845=_842.GetLayerCellSizeX(_841.uid);
var _846=_842.GetLayerCellSizeY(_841.uid);
var _847=map.tlx+(map.brx-map.tlx)/2;
var _848=this.tly+(map.bry-map.tly)/2;
var tlx=_847-Math.abs(_845*map.width/2);
var brx=_847+Math.abs(_845*map.width/2);
var tly=_848+Math.abs(_846*map.height/2);
var bry=_848-Math.abs(_846*map.height/2);
_843=map.getScaleFromExtents(tlx,tly,brx,bry);
if(_843<_841.minScale){
_843=_841.minScale;
}
}
return _843;
};
SIX.Access.ECWP.prototype.getBestScale=function(map){
if(this.service.aServices.length){
var _84e=0;
for(var i=0;i<this.service.aServices.length;i++){
var _850=this.service.aServices[i].access.getBestScale(map);
if(_850>0&&(_84e==0||_850<_84e)){
_84e=_850;
}
}
return _84e;
}
var _84e=0;
for(var i=0;i<this.service.layers.length;i++){
var _851=this.service.layers[i];
if(_851.bInScale&&_851.bSelected){
var _852=this.getBestScaleForLayer(map,_851);
if(_852>0&&(_84e==0||_852<_84e)){
_84e=_852;
}
}
for(var j=0;j<_851.aLayers.length;j++){
var _854=_851.aLayers[j];
if(_854.bInScale&&_854.bSelected){
var _852=this.getBestScaleForLayer(map,_854);
if(_852>0&&(_84e==0||_852<_84e)){
_84e=_852;
}
}
}
}
return _84e;
};
SIX.Access.ECWP.prototype.checkECWJP2Exists=function(map){
var _856=document[map.uid];
var _857=false;
var _858=false;
var _859=_856.GetNumberLayers();
for(var i=0;i<_859;i++){
var _85b=_856.GetLayerName(i);
var _85c=_856.GetLayerType(_85b);
_85c=_85c.toLowerCase();
if((_85c=="ecw")||(_85c=="jp2")||(_85c=="ecwjp2")){
_857=true;
break;
}
}
if(!_857){
map.deleteAllLayers();
if(!map.bReconnecting){
for(var j=0;j<map.catalog.services.length;j++){
var svc=map.catalog.services[j];
if(svc!=this.service){
svc.loaded=false;
for(var k=0;k<svc.aServices.length;k++){
svc.aServices[k].loaded=false;
}
}
}
var _860=map.addLayer("ecwjp2",map.sDefaultECWJP2Url,map.sDefaultECWJP2LayerName,"freecache="+SIXConfig.FREECACHE+";visibility=FALSE;");
if(_860==-1){
var msg="Unable to open image layer:\n"+map.sDefaultECWJP2Url+" "+_856.GetLastErrorText();
}else{
map.setDefaultECWJP2CoordSys(map.datum(),map.projection());
var msg="Loaded default layer:\n"+map.sDefaultECWJP2Url;
map.coordSys=map.coordSysDefaultECWJP2.clone(map.coordSys);
if(_860){
map.moveLayer(_860,0);
}
_858=true;
}
this.service.deleteLayers(map);
}
}
return _858;
};
SIX.Access.ECWP.prototype.searchMap=function(map,_863){
if(_863.name!="Location"||_863.fields.length!=2){
return;
}
var _864=SIX.Util.stringToDegrees(_863.fields[0].value);
var _865=SIX.Util.stringToDegrees(_863.fields[1].value);
map.setCenter(_864,_865);
};
SIX.Util.addPoints=function(_866,dX1,dY1,dX2,dY2){
var _86b=new Object();
_86b.x=dX1;
_86b.y=dY1;
_866[_866.length]=_86b;
_86b=new Object();
_86b.x=dX2;
_86b.y=dY2;
_866[_866.length]=_86b;
};
SIX.Util.circleToPolyline=function(xc,yc,_86e,Sdeg,Edeg,_871,nAr){
var xRad=0;
var yRad=0;
var Srdn=0;
var Erdn=0;
var Rdn=0;
var xO=0;
var yO=0;
var x1=0;
var y1=0;
var X2=0;
var Y2=0;
var xA=0;
var yA=0;
var xB=0;
var yB=0;
var _882=new Array();
if(!_871){
_871=1;
}
xO=xc-_86e;
yO=yc-_86e;
x1=xc+_86e;
y1=yc+_86e;
if(_871<0){
xRad=Math.abs(_871)*_86e;
yRad=_86e;
}else{
xRad=_86e;
yRad=_871*_86e;
}
Srdn=Math.abs(Sdeg)*Math.PI/180;
Erdn=Math.abs(Edeg)*Math.PI/180;
if(Erdn>=Srdn){
Srdn=Srdn+Math.PI*2;
}
xO=-1;
yO=-1;
var dInc=(Srdn-Erdn)/nAr;
i=0;
Rdn=Srdn;
while(Rdn>Erdn){
x1=xRad*Math.cos(Rdn);
y1=yRad*Math.sin(Rdn);
if((x1!=xO)||(y1!=yO)){
i=i+1;
xO=x1;
yO=y1;
x1=xc+x1;
y1=yc-y1;
if(i%2){
xB=x1;
yB=y1;
if(i>1){
SIX.Util.addPoints(_882,xA,yA,xB,yB);
}
}else{
xA=x1;
yA=y1;
SIX.Util.addPoints(_882,xA,yA,xB,yB);
}
}
Rdn-=dInc;
}
i=i+1;
x1=xRad*Math.cos(Erdn);
y1=yRad*Math.sin(Erdn);
xO=x1;
yO=y1;
x1=xc+x1;
y1=yc-y1;
if(i%2){
xB=x1;
yB=y1;
if(i>1){
SIX.Util.addPoints(_882,xA,yA,xB,yB);
}
}else{
xA=x1;
yA=y1;
SIX.Util.addPoints(_882,xA,yA,xB,yB);
}
return _882;
};
SIX.Util.getNearestPoint=function(dX,dY,_886){
var _887=Number.MAX_VALUE;
var _888=-1;
for(var i=0;i<_886.length;i++){
var _88a=_886[i];
var _88b=_88a.x-dX;
var _88c=_88a.y-dY;
var _88d=Math.pow(_88b*_88b+_88c*_88c,0.5);
if(_88d<_887){
_887=_88d;
_888=i;
}
}
var _88e=null;
if(_888>=0){
_88e=new Array(_888,_887);
}
return _88e;
};
SIX.Util.getNearestLine=function(dX,dY,_891){
var _892=Number.MAX_VALUE;
var _893=-1;
var _894=_891.length;
for(var i=0;i<_891.length-1;i++){
var _896=_891[i];
var _897=_891[i+1];
var _898=_897.x-_896.x;
var _899=_897.y-_896.y;
var _89a=Math.pow(_898*_898+_899*_899,0.5);
var dU=(((dX-_896.x)*(_897.x-_896.x))+((dY-_896.y)*(_897.y-_896.y)))/(_89a*_89a);
if(dU>=0&&dU<=1){
var _89c=_896.x+dU*(_897.x-_896.x);
var _89d=_896.y+dU*(_897.y-_896.y);
_898=_89c-dX;
_899=_89d-dY;
var _89e=Math.pow(_898*_898+_899*_899,0.5);
if(_89e<_892){
_892=_89e;
_893=i;
}
}
}
var _89f=null;
if(_893>=0){
_89f=new Array(_893,_892);
}
return _89f;
};
SIX.CoordSys=function(_8a0,_8a1){
this.sDatum=(arguments.length<2?"":_8a0.toLowerCase());
this.sProjection=(arguments.length<2?"":_8a1.toLowerCase());
};
SIX.CoordSys.prototype.clone=function(_8a2){
if(_8a2){
_8a2.setDatum(this.sDatum);
_8a2.setProjection(this.sProjection);
}else{
var _8a2=new SIX.CoordSys(this.sDatum,this.sProjection);
}
return _8a2;
};
SIX.CoordSys.prototype.equals=function(_8a3){
var _8a4=false;
if((typeof _8a3=="object")&&(_8a3.constructor==SIX.CoordSys)&&(this.sDatum==_8a3.sDatum)&&(this.sProjection==_8a3.sProjection)){
_8a4=true;
}
return _8a4;
};
SIX.CoordSys.prototype.setDatum=function(_8a5){
this.sDatum=_8a5.toLowerCase();
};
SIX.CoordSys.prototype.setProjection=function(_8a6){
this.sProjection=_8a6.toLowerCase();
};
SIX.CoordSys.prototype.initialized=function(){
var _8a7=true;
if((this.sDatum=="")&&(this.sProjection=="")){
_8a7=false;
}
return _8a7;
};
SIX.MarkerSymbol=function(sId,_8a9,_8aa,_8ab,_8ac){
this.sId=sId;
this.sImage=_8a9;
this.sImageOn=_8aa;
this.imageOff=new Image();
this.imageOff.src=_8a9;
this.imageOn=new Image();
this.imageOn.src=_8aa;
this.nTiePointPixelX=_8ab;
this.nTiePointPixelY=_8ac;
};
SIX.Marker=function(_8ad,_8ae,_8af,x,y){
SIX.addRef(this);
this.uid=SIX.Uid.getUid("marker");
this.imageUid=SIX.Uid.getUid("markerImage");
this.listItemUid=SIX.Uid.getUid("markerListItem");
this.sTitle=_8ad;
this.sDescription=_8ae;
this.sSymbol=_8af;
this.x=x;
this.y=y;
};
SIX.MarkerCollection=function(map){
SIX.addRef(this);
this.map=map;
this.aMarkers=new Array();
this.nSelectedMarker=-1;
this.markerListUid=SIX.Uid.getUid("markerList");
this.markerListContainerUid=SIX.Uid.getUid("markerListContainer");
};
SIX.MarkerCollection.prototype.getEnvelope=function(){
var _8b3=Number.MAX_VALUE;
var _8b4=Number.MAX_VALUE;
var _8b5=-Number.MAX_VALUE;
var _8b6=-Number.MAX_VALUE;
for(var i=0;i<this.aMarkers.length;i++){
var _8b8=this.aMarkers[i];
if(_8b8.x<_8b3){
_8b3=_8b8.x;
}
if(_8b8.x>_8b5){
_8b5=_8b8.x;
}
if(_8b8.y<_8b4){
_8b4=_8b8.y;
}
if(_8b8.y>_8b6){
_8b6=_8b8.y;
}
}
var _8b9=null;
if(_8b3<Number.MAX_VALUE&&_8b5>-Number.MAX_VALUE&&_8b4<Number.MAX_VALUE&&_8b6>-Number.MAX_VALUE&&_8b3<_8b5&&_8b4<_8b6){
_8b9=new SIX.Envelope(_8b3,_8b4,_8b5,_8b6);
}
return _8b9;
};
SIX.MarkerCollection.prototype.deleteAllMarkers=function(){
for(var i=this.aMarkers.length-1;i>=0;i--){
this.deleteMarker(i);
}
this.nSelectedMarker=-1;
};
SIX.MarkerCollection.prototype.fromGeoJSONFeatureCollection=function(_8bb){
if(_8bb.type=="FeatureCollection"){
this.aMarkers=new Array();
for(var i=0;i<_8bb.features.length;i++){
var _8bd=_8bb.features[i];
if(_8bd.type=="Feature"){
var _8be=_8bd.geometry;
if(_8be.type=="Point"){
var _8bf=_8bd.properties;
var _8c0=this.addMarker(new SIX.Marker(_8bf.title,_8bf.description,_8bf.symbol,_8be.coordinates[0],_8be.coordinates[1]));
SIX.App.addMouseAction(_8c0.imageUid,this,0,true);
}
}
}
}
};
SIX.MarkerCollection.prototype.toGeoJSONFeatureCollection=function(){
var _8c1=new Object();
_8c1.type="FeatureCollection";
_8c1.features=new Array();
for(var i=0;i<this.aMarkers.length;i++){
var _8c3=this.aMarkers[i];
var _8c4=new Object();
_8c4.type="Feature";
var _8c5=new Object();
_8c5.type="Point";
_8c5.coordinates=new Array();
_8c5.coordinates[0]=_8c3.x;
_8c5.coordinates[1]=_8c3.y;
_8c4.geometry=_8c5;
var _8c6=new Object();
_8c6.title=_8c3.sTitle;
_8c6.description=_8c3.sDescription;
_8c6.symbol=_8c3.sSymbol;
_8c4.properties=_8c6;
_8c1.features[i]=_8c4;
}
return _8c1;
};
SIX.MarkerCollection.prototype.getMarkerIndex=function(_8c7){
var _8c8=-1;
for(var i=0;i<this.aMarkers.length;i++){
var _8ca=this.aMarkers[i];
if(_8ca.uid==_8c7){
_8c8=i;
break;
}
}
return _8c8;
};
SIX.MarkerCollection.prototype.getNearestMarkerIndex=function(dLon,dLat){
var _8cd=-1;
var _8ce=-1;
for(var i=0;i<this.aMarkers.length;i++){
var _8d0=this.aMarkers[i];
if(!_8cd){
_8cd=i;
}
var _8d1=this.map.getDistanceBetweenLLCoords(dLon,dLat,_8d0.x,_8d0.y);
if(_8d1!=-1){
if((_8ce==-1)||(_8d1<_8ce)){
_8ce=_8d1;
_8cd=i;
}
}
}
return _8cd;
};
SIX.MarkerCollection.prototype.addMarker=function(_8d2){
this.aMarkers[this.aMarkers.length]=_8d2;
return _8d2;
};
SIX.MarkerCollection.prototype.deleteMarker=function(_8d3){
if(_8d3<this.aMarkers.length){
var _8d4=document.getElementById(this.map.featureLayerUid);
if(_8d4){
var _8d5=this.aMarkers[_8d3];
var _8d6=document.getElementById(_8d5.uid);
if(_8d6){
_8d4.removeChild(_8d6);
}
}
this.aMarkers.splice(_8d3,1);
if(this.nSelectedMarker==_8d3){
this.nSelectedMarker=-1;
}
}
};
SIX.MarkerCollection.prototype.hideFeatures=function(){
var _8d7=document.getElementById(this.map.featureLayerUid);
if(_8d7){
_8d7.style.visibility="hidden";
}
};
SIX.MarkerCollection.prototype.showFeatures=function(){
var _8d8=document.getElementById(this.map.featureLayerUid);
if(_8d8){
_8d8.style.visibility="visible";
}
};
SIX.MarkerCollection.prototype.update=function(){
var _8d9=document.getElementById(this.map.featureLayerUid);
if(_8d9){
var _8da=document[this.map.uid];
var _8db=this;
var _8dc=_8da.GetViewWidth();
var _8dd=_8da.GetViewHeight();
for(var i=0;i<this.aMarkers.length;i++){
var _8df=this.aMarkers[i];
var _8e0=document.getElementById(_8df.uid);
if(_8e0==null){
_8e0=this.buildMarker(_8df);
_8d9.appendChild(_8e0);
}
var _8e1=this.map.getPixelFromLL(_8df.x,_8df.y);
if(_8e1){
_8e0.style.top=_8e1[1]+"px";
_8e0.style.left=_8e1[0]+"px";
_8e0.style.visibility="visible";
}else{
_8e0.style.visibility="hidden";
}
}
this.showFeatures();
}
};
SIX.MarkerCollection.prototype.buildMarker=function(_8e2){
var _8e3=this;
var _8e4=document.createElement("div");
_8e4.setAttribute("id",_8e2.uid);
_8e4.setAttribute("class","markerSymbolContainer");
_8e4.setAttribute("className","markerSymbolContainer");
_8e4.ondblclick=function(){
with(_8e3){
_8e3.onMouseDown(this.id);
}
};
var _8e5=this.buildMarkerImage(_8e2);
_8e4.appendChild(_8e5);
return _8e4;
};
SIX.MarkerCollection.prototype.buildMarkerImage=function(_8e6){
var _8e7=SIX.App.getCurrentChannel();
var _8e8=_8e7.getMarkerSymbol(_8e6.sSymbol);
var _8e9=document.createElement("img");
_8e9.setAttribute("id",_8e6.imageUid);
_8e9.setAttribute("class","markerSymbol");
_8e9.setAttribute("className","markerSymbol");
_8e9.setAttribute("alt",_8e6.sTitle);
_8e9.setAttribute("title",_8e6.sTitle);
_8e9.setAttribute("src",_8e8.sImage);
var _8ea=_8e8.sImage;
var _8eb=_8e8.sImageOn;
if(_8eb!=""){
_8e9.onmouseover=function(){
with({sMouseOverSrc:_8eb}){
this.src=_8eb;
}
};
_8e9.onmouseout=function(){
with({sMouseOutSrc:_8ea}){
this.src=_8ea;
}
};
}
_8e9.style.left=-_8e8.nTiePointPixelX+"px";
_8e9.style.top=-_8e8.nTiePointPixelY+"px";
return _8e9;
};
SIX.MarkerCollection.prototype.action=function(_8ec,_8ed,x,y){
this.moveMarker(SIX.App.mouseCurrentAction.uid,_8ed,x,y);
};
SIX.MarkerCollection.prototype.moveMarker=function(_8f0,_8f1,_8f2,_8f3){
var _8f4=document.getElementById(_8f0);
var _8f5=getParent(_8f4,"div");
if(_8f5){
var _8f6=_8f5.id;
if(_8f1){
var _8f7=_8f2+this.nPixelX;
var nTop=_8f3+this.nPixelY;
_8f5.style.left=_8f7+"px";
_8f5.style.top=nTop+"px";
var _8f9=this.getMarkerIndex(_8f6);
if(_8f9!=-1){
var _8fa=this.aMarkers[_8f9];
var _8fb=this.map.getLLFromPixel(_8f7,nTop);
if(_8fb){
_8fa.x=_8fb[0];
_8fa.y=_8fb[1];
}
}
}else{
var _8f7=parseInt(_8f5.style.left);
var nTop=parseInt(_8f5.style.top);
this.nPixelX=_8f7-_8f2;
this.nPixelY=nTop-_8f3;
}
}
};
SIX.MarkerCollection.prototype.onMouseDown=function(_8fc){
var _8fd=document.getElementById(_8fc);
if(_8fd){
var _8fe=this.getMarkerIndex(_8fc);
if(_8fe!=-1){
this.map.showMarkerForm(_8fe);
}
}
return false;
};
SIX.MarkerCollection.prototype.buildMarkerList=function(){
var _8ff=document.createElement("div");
_8ff.setAttribute("id",this.markerListContainerUid);
_8ff.style.display="none";
var _900=document.createElement("div");
_900.setAttribute("class","markerListTitle");
_900.setAttribute("className","markerListTitle");
var _901=this.buildExpandCollapseMarkerListButton();
_900.appendChild(_901);
var _902=document.createTextNode("Place Markers");
_900.appendChild(_902);
_8ff.appendChild(_900);
var _903=document.createElement("ul");
_903.setAttribute("id",this.markerListUid);
_903.setAttribute("class","markerList");
_903.setAttribute("className","markerList");
_903.style.display="none";
_8ff.appendChild(_903);
return _8ff;
};
SIX.MarkerCollection.prototype.updateMarkerList=function(){
var _904=document.getElementById(this.markerListContainerUid);
if(_904){
if(this.aMarkers.length){
_904.style.display="block";
}else{
_904.style.display="none";
}
}
var _905=document.getElementById(this.markerListUid);
if(_905){
_905.innerHTML="";
for(var i=0;i<this.aMarkers.length;i++){
var _907=this.aMarkers[i];
var _908=document.createElement("li");
_908.setAttribute("id",_907.listItemUid);
_908.setAttribute("class","markerListItem");
_908.setAttribute("className","markerListItem");
var _909=this.buildMarkerListItemSymbol(_907);
_908.appendChild(_909);
var _90a=document.createElement("div");
_90a.setAttribute("class","markerListItemText");
_90a.setAttribute("className","markerListItemText");
var _90b=document.createTextNode(_907.sTitle);
_90a.appendChild(_90b);
_908.appendChild(_90a);
var _90c=this.buildMarkerListItemDeleteButton(_907);
_908.appendChild(_90c);
_905.appendChild(_908);
}
}
};
SIX.MarkerCollection.prototype.buildExpandCollapseMarkerListButton=function(){
var _90d=document.createElement("img");
_90d.setAttribute("class","markerListExpandCollapseButton");
_90d.setAttribute("className","markerListExpandCollapseButton");
_90d.setAttribute("alt","Show/hide markers");
_90d.setAttribute("title","Show/hide markers");
_90d.setAttribute("src","images/expandPlus.gif");
var _90e=this;
_90d.onclick=function(){
with({markerCollection:_90e}){
var _90f=document.getElementById(_90e.markerListUid);
if(_90f){
if(_90f.style.display=="none"){
_90f.style.display="block";
this.src="images/collapseMinus.gif";
}else{
_90f.style.display="none";
this.src="images/expandPlus.gif";
}
}
}
};
return _90d;
};
SIX.MarkerCollection.prototype.buildMarkerListItemSymbol=function(_910){
var _911=document.createElement("div");
_911.setAttribute("class","markerListItemSymbolButtonContainer");
_911.setAttribute("className","markerListItemSymbolButtonContainer");
var _912=SIX.App.getCurrentChannel();
var _913=_912.getMarkerSymbol(_910.sSymbol);
var _914=_913.sImage;
var _915=document.createElement("img");
_915.setAttribute("class","markerListItemSymbolButton");
_915.setAttribute("className","markerListItemSymbolButton");
_915.setAttribute("alt","");
_915.setAttribute("title","");
_915.setAttribute("src",_914);
_911.appendChild(_915);
return _911;
};
SIX.MarkerCollection.prototype.buildMarkerListItemDeleteButton=function(_916){
var _917=document.createElement("img");
_917.setAttribute("class","markerListItemDeleteButton");
_917.setAttribute("className","markerListItemDeleteButton");
_917.setAttribute("alt","Delete marker");
_917.setAttribute("title","Delete marker");
_917.setAttribute("src","images/delete.gif");
var _918=this;
_917.onclick=function(){
with({markerCollection:_918,marker:_916}){
if(!confirm("Are you sure you want to delete this marker?")){
return;
}
var _919=_918.getMarkerIndex(_916.uid);
if(_919>=0){
_918.deleteMarker(_919);
_918.updateMarkerList();
}
}
};
return _917;
};
SIX.eValidContextExtents={MINX:150,MAXX:151,MINY:-35,MAXY:-34};
SIX.ContextCollection=function(sId,_91b,_91c,_91d){
this.uid=SIX.Uid.getUid("ContextCollection");
this.containerUid=SIX.Uid.getUid("ContextCollectionContainer");
this.allUid=SIX.Uid.getUid("ContextCollection");
this.sId=sId;
this.sTitle=_91b;
this.sDescription=_91c;
this.aContextIds=new Array();
this.aContextListItemUids=new Array();
this.parameters=new SIX.Parameters(_91d?_91d:"");
this.bCanDelete=this.parameters.getParameter("delete","boolean",false);
this.bCanCopy=this.parameters.getParameter("copy","boolean",false);
this.bCanEmail=this.parameters.getParameter("email","boolean",true);
this.bAllMaps=this.parameters.getParameter("allmaps","boolean",false);
this.nContextCollectionCookieExpiryDays=365*100;
};
SIX.ContextCollection.prototype.getContext=function(_91e){
var _91f=this;
var _920=function(data){
with({contextCollection:_91f,sContextId:_91e}){
if(data){
var _922=data.geoJSON;
var _923=new SIX.Context(_91e,"","");
_923.fromGeoJSONObject(JSON.parse(_922));
var _924=_91f.buildContextListItem(_923);
if(_924){
var _925=document.createElement("span");
_925.setAttribute("class","contextButtonGroup");
_925.setAttribute("className","contextButtonGroup");
_924.appendChild(_925);
if(_91f.bCanCopy){
var _926=_91f.buildCopyContextButton(_923);
_925.appendChild(_926);
}
if(_91f.bCanEmail){
var _927=_91f.buildEmailContextButton(_923);
_925.appendChild(_927);
}
if(_91f.bCanDelete){
var _928=_91f.buildDeleteContextButton(_923);
_925.appendChild(_928);
}
var _929=_91f.buildExpandCollapseContextDetailButton(_923);
_924.appendChild(_929);
var _92a=_91f.buildContextUrlLink(_923);
_924.appendChild(_92a);
var _92b=_91f.buildContextDetail(_923);
_924.appendChild(_92b);
}
}
}
};
MapContextWS.getMapContext(_91e,_920);
};
SIX.ContextCollection.prototype.buildExpandCollapseContextListButton=function(_92c){
var _92d=document.createElement("img");
_92d.setAttribute("class","contextListExpandCollapseButton");
_92d.setAttribute("className","contextListExpandCollapseButton");
var _92e="Show/hide "+this.sTitle;
_92d.setAttribute("alt",_92e);
_92d.setAttribute("title",_92e);
_92d.setAttribute("src",(_92c?"images/collapseMinus.gif":"images/expandPlus.gif"));
var _92f=this;
_92d.onclick=function(){
with({contextCollection:_92f}){
var _930=document.getElementById(_92f.uid);
if(_930){
if(_930.style.display=="none"){
_930.style.display="block";
this.src="images/collapseMinus.gif";
}else{
_930.style.display="none";
this.src="images/expandPlus.gif";
}
}
}
};
return _92d;
};
SIX.ContextCollection.prototype.buildContextListItem=function(_931){
var _932=null;
var _933=document.getElementById(this.uid);
if(_933){
var _934=null;
var _935=-1;
for(var i=0;i<this.aContextIds.length;i++){
if(_935>=0){
var _937=document.getElementById(this.aContextListItemUids[i]);
if(_937){
_934=_937;
break;
}
}else{
if(this.aContextIds[i]==_931.sId){
_935=i;
}
}
}
_932=document.createElement("li");
if(_935>=0&&_935<this.aContextListItemUids.length){
_932.setAttribute("id",this.aContextListItemUids[_935]);
}
_932.setAttribute("class","contextListItem");
_932.setAttribute("className","contextListItem");
if(_934){
_933.insertBefore(_932,_934);
}else{
_933.appendChild(_932);
}
}
return _932;
};
SIX.ContextCollection.prototype.buildContextDetail=function(_938){
var _939=document.createElement("ul");
_939.setAttribute("class","contextChildList");
_939.setAttribute("className","contextChildList");
_939.style.display="none";
var _93a=document.createElement("li");
var _93b=SIX.Util.timeStampToDate(_938.sTimeStamp,"dd/mm/yy hh:mm:ss");
var _93c=document.createTextNode("Created: "+_93b);
_93a.appendChild(_93c);
_939.appendChild(_93a);
var _93d=document.createElement("li");
var _93e=document.createTextNode(_938.sDescription);
_93d.appendChild(_93e);
_939.appendChild(_93d);
return _939;
};
SIX.ContextCollection.prototype.buildContextUrlLink=function(_93f){
var sUrl=this.buildContextUrl(_93f);
var _941=document.createElement("a");
_941.setAttribute("class","contextTitle");
_941.setAttribute("className","contextTitle");
_941.setAttribute("href",sUrl);
_941.setAttribute("target","_blank");
var _942=SIX.Util.timeStampToDate(_93f.sTimeStamp,"dd/mm/yy hh:mm:ss");
var _943="Created: "+_942+(_93f.sDescription==""?"":", "+_93f.sDescription);
_941.setAttribute("alt",_943);
_941.setAttribute("title",_943);
var _944=document.createTextNode(_93f.sTitle);
_941.appendChild(_944);
return _941;
};
SIX.ContextCollection.prototype.buildExpandCollapseContextDetailButton=function(_945){
var _946=document.createElement("img");
_946.setAttribute("class","contextExpandCollapseButton");
_946.setAttribute("className","contextExpandCollapseButton");
_946.setAttribute("alt","Show/hide map details");
_946.setAttribute("title","Show/hide map details");
_946.setAttribute("src","images/expandPlus.gif");
_946.onclick=function(){
listItem=getParent(this,"li");
for(var i=0;i<listItem.childNodes.length;i++){
var _948=listItem.childNodes[i];
if(_948.tagName&&_948.tagName.toLowerCase()=="ul"){
if(_948.style.display=="none"){
_948.style.display="block";
this.src="images/collapseMinus.gif";
}else{
_948.style.display="none";
this.src="images/expandPlus.gif";
}
}
}
};
return _946;
};
SIX.ContextCollection.prototype.buildDeleteContextButton=function(_949){
var _94a=document.createElement("img");
_94a.setAttribute("class","contextButton");
_94a.setAttribute("className","contextButton");
_94a.setAttribute("alt","Delete map");
_94a.setAttribute("title","Delete map");
_94a.setAttribute("src","images/delete.gif");
var _94b=this;
_94a.onclick=function(){
with({contextCollection:_94b,context:_949}){
if(!confirm("Are you sure you want to delete this map?")){
return;
}
_94b.deleteContext(_949.sId);
}
};
return _94a;
};
SIX.ContextCollection.prototype.buildCopyContextButton=function(_94c){
var _94d=document.createElement("img");
_94d.setAttribute("class","contextButton");
_94d.setAttribute("className","contextButton");
_94d.setAttribute("alt","Copy to My Saved Maps");
_94d.setAttribute("title","Copy to My Saved Maps");
_94d.setAttribute("src","images/copy.gif");
var _94e=this;
var _94f=_94c.sId;
_94d.onclick=function(){
with({contextCollection:_94e,sContextId:_94f}){
if(!SIX.App.account.bLoggedIn){
var _950=function(){
with({contextCollection:_94e,sContextId:_94f}){
var _951=function(){
with({contextCollection:_94e,sContextId:_94f}){
_94e.copyContext(_94f);
}
};
SIX.App.getMySavedMaps(_951);
}
};
SIX.App.account.fnLoginCallback=_950;
SIX.App.account.showLogin();
}else{
_94e.copyContext(_94f);
}
}
};
return _94d;
};
SIX.ContextCollection.prototype.copyContext=function(_952){
var _953=this;
var _954=function(data){
with({contextCollection:_953,sContextId:_952}){
if(data){
var _956=data.geoJSON;
var _957=new SIX.Context(_952,"","");
_957.fromGeoJSONObject(JSON.parse(_956));
if(SIX.App.aContextCollections.length){
var _958=SIX.App.aContextCollections[0];
if(_953!=_958){
_958.saveContext(_957);
}
}
}
}
};
MapContextWS.getMapContext(_952,_954);
};
SIX.ContextCollection.prototype.buildEmailContextButton=function(_959){
var sUrl=this.buildContextUrl(_959);
var _95b=SIX.Util.timeStampToDate(_959.sTimeStamp,"dd/mm/yy hh:mm:ss");
var _95c="SIX Viewer Map: "+_959.sTitle;
var _95d="Title: "+_959.sTitle+"%0A%0A"+"Created: "+_95b+"%0A%0A"+"Description: "+_959.sDescription+"%0A%0A"+encodeURIComponent(sUrl);
var _95e=document.createElement("a");
_95e.setAttribute("class","contextButton");
_95e.setAttribute("className","contextButton");
_95e.setAttribute("href","mailto:?subject="+_95c+"&body="+_95d);
_95e.style.border=0;
var _95f=document.createElement("img");
_95f.setAttribute("alt","Email map");
_95f.setAttribute("title","Email map");
_95f.setAttribute("src","images/email.gif");
_95f.style.border=0;
_95e.appendChild(_95f);
return _95e;
};
SIX.ContextCollection.prototype.buildContextUrl=function(_960){
var _961=decodeURIComponent(_960.sSrcUrl);
var _962=_961.indexOf("?");
var _963="context="+_960.sId;
var _964="";
if(_962==-1){
_964=_961;
}else{
_964=_961.substring(0,_962);
var _965=_961.substring(_962+1,_961.length);
var _966=_965.split("&");
for(var i=0;i<_966.length;i++){
if(_966[i].indexOf("=")!=-1){
var _968=_966[i].split("=");
if((_968[0].toLowerCase()=="context")||(_968[0].toLowerCase()=="contextcollection")){
continue;
}
_963+="&"+_968[0]+"="+_968[1];
}
}
}
var sUrl=_964+"?"+_963;
sUrl=sUrl.replace("#","");
return sUrl;
};
SIX.ContextCollection.prototype.saveContext=function(_96a){
var _96a=_96a.toGeoJSONObject();
var _96b=JSON.stringify(_96a);
var _96c=this;
var _96d=function(data){
with({contextCollection:_96c}){
_96c.addContext(data);
}
};
MapContextWS.addMapContext(_96b,SIX.eValidContextExtents.MINX,SIX.eValidContextExtents.MAXX,SIX.eValidContextExtents.MINY,SIX.eValidContextExtents.MAXY,_96d);
};
SIX.ContextCollection.prototype.deleteContext=function(_96f){
var _970=this;
var _971=function(data){
with({contextCollection:_970,sContextId:_96f}){
if(data){
var _973=data.geoJSON;
var _974=new Array();
var _975=function(data){
with({contextCollection:_970}){
_970.updateContextList();
}
};
_974=JSON.parse(_973);
for(var i=0;i<_974.length;i++){
if(_974[i]==_96f){
_974.splice(i,1);
break;
}
}
var _978=JSON.stringify(_974);
MapContextWS.updateMapContextCollection(_970.sId,_978,SIX.eValidContextExtents.MINX,SIX.eValidContextExtents.MAXX,SIX.eValidContextExtents.MINY,SIX.eValidContextExtents.MAXY,_975);
}
}
};
if(this.sId!=""){
MapContextWS.getMapContextCollection(this.sId,_971);
}
};
SIX.ContextCollection.prototype.updateContextList=function(){
var _979=this;
var _97a=function(){
with({contextCollection:_979}){
_979.aContextListItemUids=new Array();
for(var i=0;i<_979.aContextIds.length;i++){
_979.aContextListItemUids[i]=SIX.Uid.getUid("SavedMapListItem");
}
var _97c=document.getElementById(_979.uid);
if(_97c){
_97c.innerHTML="";
}
for(var i=0;i<_979.aContextIds.length;i++){
_979.getContext(_979.aContextIds[i]);
}
var _97d=document.getElementById(_979.containerUid);
var _97e=document.getElementById(_979.allUid);
if(_97d){
if(_979.aContextIds.length&&_979.bAllMaps){
if(!_97e){
_97e=_979.buildContextCollectionUrlLink();
if(_97e){
_97d.appendChild(_97e);
}
}
}else{
if(_97e){
_97d.removeChild(_97e);
}
}
}
}
};
var _97f=function(data){
with({contextCollection:_979,fnUpdateContextList:_97a}){
if(data){
var _981=data.geoJSON;
_979.aContextIds=JSON.parse(_981);
_97a();
}
}
};
if(this.sId!=""){
MapContextWS.getMapContextCollection(this.sId,_97f);
}else{
_97a();
}
};
SIX.ContextCollection.prototype.buildContextCollectionUrlLink=function(){
var _982=document.createElement("div");
_982.setAttribute("id",this.allUid);
_982.setAttribute("class","allMaps");
_982.setAttribute("className","allMaps");
if(this.sId!=""){
var _983=decodeURI(window.location.href);
_983=_983.replace("#","");
var _984=_983.indexOf("?");
var _985="contextcollection="+this.sId;
var _986="";
if(_984==-1){
_986=_983;
}else{
_986=_983.substring(0,_984);
var _987=_983.substring(_984+1,_983.length);
var _988=_987.split("&");
for(var i=0;i<_988.length;i++){
if(_988[i].indexOf("=")!=-1){
var _98a=_988[i].split("=");
if((_98a[0].toLowerCase()=="context")||(_98a[0].toLowerCase()=="contextcollection")){
continue;
}
_985+="&"+_98a[0]+"="+_98a[1];
}
}
}
var sUrl=_986+"?"+_985;
var _98c="All Saved Maps";
var _98d=sUrl;
var _98e=document.createTextNode("Email All Maps");
_982.appendChild(_98e);
var _98f=document.createElement("a");
_98f.setAttribute("class","allMapsButton");
_98f.setAttribute("className","allMapsButton");
_98f.setAttribute("href","mailto:?subject="+_98c+"&body="+_98d);
_98f.style.border=0;
var _990=document.createElement("img");
_990.setAttribute("alt","Email All Maps");
_990.setAttribute("title","Email All Maps");
_990.setAttribute("src","images/email.gif");
_990.style.border=0;
_98f.appendChild(_990);
_982.appendChild(_98f);
}
return _982;
};
SIX.ContextCollection.prototype.addContext=function(_991){
var _992=this;
var _993=function(data){
with({contextCollection:_992,sContextId:_991}){
if(data){
var _995=data;
for(var i=0;i<SIX.App.aContextCollections.length;i++){
if(SIX.App.aContextCollections[i]==_992&&_992.sId==""){
_992.sId=_995;
}
}
_992.updateContextList();
}
}
};
var _997=function(data){
with({contextCollection:_992,sContextId:_991}){
if(data){
var _999=data.geoJSON;
var _99a=new Array();
var _99b=function(data){
with({contextCollection:_992}){
_992.updateContextList();
}
};
_99a=JSON.parse(_999);
_99a[_99a.length]=_991;
var _99d=JSON.stringify(_99a);
MapContextWS.updateMapContextCollection(_992.sId,_99d,SIX.eValidContextExtents.MINX,SIX.eValidContextExtents.MAXX,SIX.eValidContextExtents.MINY,SIX.eValidContextExtents.MAXY,_99b);
}
}
};
if(this.sId!=""){
MapContextWS.getMapContextCollection(this.sId,_997);
}else{
var _99e=new Array();
_99e[_99e.length]=_991;
var _99f=JSON.stringify(_99e);
MapContextWS.addMapContextCollection(_99f,SIX.eValidContextExtents.MINX,SIX.eValidContextExtents.MAXX,SIX.eValidContextExtents.MINY,SIX.eValidContextExtents.MAXY,_993);
}
};
SIX.Context=function(sId,_9a1,_9a2){
this.sTimeStamp=""+(new Date()).getTime();
this.sId=sId;
this.sVersion="1.0.0";
this.sTitle=_9a1;
this.sDescription=_9a2;
var _9a3=SIX.App.getCurrentChannel();
this.sChannelId=_9a3.sId;
var _9a4=encodeURIComponent(decodeURI(window.location.href));
this.sSrcUrl=_9a4.replace("#","");
this.featureCollection=null;
this.tlLat=0;
this.tlLon=0;
this.brLat=0;
this.brLon=0;
};
SIX.Context.prototype.setExtents=function(_9a5,_9a6,_9a7,_9a8){
this.tlLat=_9a5;
this.tlLon=_9a6;
this.brLat=_9a7;
this.brLon=_9a8;
};
SIX.Context.prototype.toGeoJSONObject=function(){
var _9a9=new Object();
_9a9.timestamp=this.sTimeStamp;
_9a9.version=this.sVersion;
_9a9.title=this.sTitle;
_9a9.description=this.sDescription;
_9a9.srcurl=this.sSrcUrl;
_9a9.channel=this.sChannelId;
_9a9.bbox=new Array();
_9a9.bbox[0]=this.tlLon;
_9a9.bbox[1]=this.brLat;
_9a9.bbox[2]=this.brLon;
_9a9.bbox[3]=this.tlLat;
_9a9.featureCollection=this.featureCollection;
return _9a9;
};
SIX.Context.prototype.fromGeoJSONObject=function(_9aa){
this.sTimeStamp=_9aa.timestamp;
this.sVersion=_9aa.version;
this.sTitle=_9aa.title;
this.sDescription=_9aa.description;
this.sSrcUrl=_9aa.srcurl;
this.sChannelId=_9aa.channel;
this.tlLon=_9aa.bbox[0];
this.brLat=_9aa.bbox[1];
this.brLon=_9aa.bbox[2];
this.tlLat=_9aa.bbox[3];
this.featureCollection=_9aa.featureCollection;
};
SIX.QueryPolygonCollection=function(){
this.aPolygons=new Object();
this.aPolygonsSelectionState=new Object();
this.aPolygonsMetadata=new Object();
};
SIX.eMapCallbacks={ONMOUSEDOWN:1,ONMOUSEUP:2,ONMOUSEMOVE:3,ONEXTENTCHANGE:4,ONLOAD:5};
SIX.Map=function(win){
SIX.addRef(this);
for(var i=0;i<SIX.App.channels.length;i++){
var _9ad=SIX.App.channels[i];
_9ad.maps[_9ad.maps.length]=this;
}
this.name="Map";
this.win=win;
this.loaded=false;
this.width=100;
this.height=100;
this.width1K=this.width;
this.height1K=this.height;
this.aHistory=new Array();
this.bHistoryMove=false;
this.nHistoryIndex=0;
this.nOldHistoryIndex=0;
this.uid=SIX.Uid.getUid("map");
this.mapDivUid=SIX.Uid.getUid("mapDiv");
this.featureLayerUid=SIX.Uid.getUid("featureLayer");
this.containerUid=SIX.Uid.getUid("container");
this.crosshairsUid=SIX.Uid.getUid("crosshairs");
this.markerFormContainerUid=SIX.Uid.getUid("markerFormContainer");
this.markerFormUid=SIX.Uid.getUid("markerForm");
this.markerFormSymbolUid=SIX.Uid.getUid("markerFormSymbol");
this.markerSymbolsContainerUid=SIX.Uid.getUid("markerSymbolsContainer");
this.markerSymbolsUid=SIX.Uid.getUid("markerSymbols");
this.markerFormDescriptionUid=SIX.Uid.getUid("markerFormDescription");
this.markerFormDescriptionRichTextUid=SIX.Uid.getUid("markerFormDescription");
this.sMarkerDescription="";
this.saveMapFormContainerUid=SIX.Uid.getUid("saveMapFormContainer");
this.saveMapFormUid=SIX.Uid.getUid("saveMapForm");
this.saveMapFormDescriptionUid=SIX.Uid.getUid("saveMapFormDescription");
this.saveMapFormDescriptionRichTextUid=SIX.Uid.getUid("saveMapFormDescription");
this.sMapDescription="";
this.savedMapsUid=SIX.Uid.getUid("savedMaps");
this.savedMapsContainerUid=SIX.Uid.getUid("savedMapsContainer");
this.savedMapsTitleBarUid=SIX.Uid.getUid("savedMapsTitleBar");
this.savedMapsBackgroundUid=SIX.Uid.getUid("savedMapsBackground");
this.catalog=0;
this.status=0;
this.markerCollection=new SIX.MarkerCollection(this);
this.sDefaultECWJP2Url="";
this.sDefaultECWJP2LayerName=SIX.Uid.getUid("default");
this.coordSysDefaultECWJP2=new SIX.CoordSys();
this.coordSys=new SIX.CoordSys();
this.nECWProgressPercent=0;
this.nGISOverlayProgressPercent=0;
this.tGISOverlayProgress=null;
this.tlx=0;
this.tly=0;
this.brx=0;
this.bry=0;
this.envelope=new SIX.Envelope(this.tlx,this.bry,this.brx,this.tly);
this.hLayersToUpdate=new SIX.Hash();
this.MAX_LAYERS_TO_UPDATE=20;
this.tlLatitude=90;
this.tlLongitude=-180;
this.brLatitude=-90;
this.brLongitude=180;
this.bGeodeticExtentsUpdated=false;
this.tlMaxLat=0;
this.tlMaxLon=0;
this.brMaxLat=0;
this.brMaxLon=0;
this.tlMaxX=0;
this.tlMaxY=0;
this.brMaxX=0;
this.brMaxY=0;
this.bMaxWorldExtentsUpdated=false;
this.dInitialTopLeftLat=0;
this.dInitialTopLeftLon=0;
this.dInitialBottomRightLat=0;
this.dInitialBottomRightLon=0;
this.tlMaxOverlayLat=0;
this.tlMaxOverlayLon=0;
this.brMaxOverlayLat=0;
this.brMaxOverlayLon=0;
this.bDisplayBest=false;
this.tlMaxDisplayBestLat=0;
this.tlMaxDisplayBestLon=0;
this.brMaxDisplayBestLat=0;
this.brMaxDisplayBestLon=0;
this.dMaxOverlayScaleChangeFactor=2;
this.scale=0;
this.dBestScale=0;
this.nMouseMask=null;
this.dMouseScreenX=null;
this.dMouseScreenY=null;
this.dMouseWorldX=null;
this.dMouseWorldY=null;
this.mouseDown=false;
this.redrawTimer=null;
this.nQueryType=SIX.eQueryTypes.NONE;
this.queryPoints=new Array();
this.pointQueryZonesCenter=null;
this.bQueryZonesVisible=true;
this.sQueryZonesDistanceDisplayUnits="m";
this.dQueryZonesEndDistance=1000;
this.dQueryZonesIntervalDistance=100;
this.nMaxQueryZones=50;
this.aQueryZonesBoundaryColors=["#FF0000","#0000FF","#FFFF00","#00FF00"];
this.aQueryZones=new Array();
this.editLayer=false;
this.editLayerName=SIX.Uid.getUid("VectorEditLayer");
this.realtimeRoam=true;
this.bAllowExtentsUpdate=true;
this.bRoamClip=false;
this.nRoamSize=250;
this.nNumReconnectAttempts=0;
this.tReconnect=null;
this.bReconnecting=false;
this.aQueryPolygonCollections=new Object();
this.bChangingChannel=false;
this.aLayerParams=new Object();
this.childMap=null;
this.parentMap=null;
this.opacity=1;
this.tCancelSetExtentsTimeout=null;
this.tSetExtentsInterval=null;
this.bDoubleClick=false;
this.tMouseDown=(new Date()).getTime();
this.coordsCache=new SIX.Hash();
this.MAX_COORDS_CACHE_SIZE=1000;
this.tStatusUpdate=null;
this.hCallbackManagers=new SIX.Hash();
this.aAttachedItems=new Array();
this.sBackgroundColor="#ffffff";
this.aTransparentColors=new Object();
};
SIX.Map.prototype.executeCallbacks=function(_9ae){
if(this.hCallbackManagers.hasItem(_9ae)){
var _9af=this.hCallbackManagers.getItem(_9ae);
var _9b0=arguments.length>1?Array.prototype.slice.call(arguments,1,arguments.length):new Array();
_9af.executeCallbacks.apply(_9af,_9b0);
}
};
SIX.Map.prototype.addCallback=function(_9b1,_9b2,data){
var _9b4=this.hCallbackManagers.hasItem(_9b1)?this.hCallbackManagers.getItem(_9b1):new SIX.CallbackManager();
_9b4.addCallback(new SIX.Callback(this,_9b2,(arguments.length>=3?data:null)));
this.hCallbackManagers.setItem(_9b1,_9b4);
};
SIX.Map.prototype.getTopLeftMaxX=function(){
if(!this.bMaxWorldExtentsUpdated){
this.getMaxWorldExtents();
}
return this.tlMaxX;
};
SIX.Map.prototype.getTopLeftMaxY=function(){
if(!this.bMaxWorldExtentsUpdated){
this.getMaxWorldExtents();
}
return this.tlMaxY;
};
SIX.Map.prototype.getBottomRightMaxX=function(){
if(!this.bMaxWorldExtentsUpdated){
this.getMaxWorldExtents();
}
return this.brMaxX;
};
SIX.Map.prototype.getBottomRightMaxY=function(){
if(!this.bMaxWorldExtentsUpdated){
this.getMaxWorldExtents();
}
return this.brMaxY;
};
SIX.Map.prototype.getMaxWorldExtents=function(){
var _9b5=[[this.tlMaxLon,this.tlMaxLat],[this.brMaxLon,this.brMaxLat]];
var _9b6=this.convertCoords(this.datum(),"GEODETIC",_9b5,this.datum(),this.projection());
if(_9b6){
this.tlMaxX=_9b6[0][0];
this.tlMaxY=_9b6[0][1];
this.brMaxX=_9b6[1][0];
this.brMaxY=_9b6[1][1];
}
this.bMaxWorldExtentsUpdated=true;
};
SIX.Map.prototype.getGeodeticExtents=function(){
var _9b7=[[this.tlx,this.tly],[this.brx,this.tly],[this.brx,this.bry],[this.tlx,this.bry]];
var _9b8=this.convertCoords(this.datum(),this.projection(),_9b7,this.datum(),"GEODETIC");
if(_9b8){
this.tlLatitude=_9b8[0][1];
this.tlLongitude=_9b8[0][0];
this.trLatitude=_9b8[1][1];
this.trLongitude=_9b8[1][0];
this.brLatitude=_9b8[2][1];
this.brLongitude=_9b8[2][0];
this.blLatitude=_9b8[3][1];
this.blLongitude=_9b8[3][0];
}
this.bGeodeticExtentsUpdated=true;
};
SIX.Map.prototype.getTopLeftLatitude=function(){
if(!this.bGeodeticExtentsUpdated){
this.getGeodeticExtents();
}
return this.tlLatitude;
};
SIX.Map.prototype.getTopLeftLongitude=function(){
if(!this.bGeodeticExtentsUpdated){
this.getGeodeticExtents();
}
return this.tlLongitude;
};
SIX.Map.prototype.getTopRightLatitude=function(){
if(!this.bGeodeticExtentsUpdated){
this.getGeodeticExtents();
}
return this.trLatitude;
};
SIX.Map.prototype.getTopRightLongitude=function(){
if(!this.bGeodeticExtentsUpdated){
this.getGeodeticExtents();
}
return this.trLongitude;
};
SIX.Map.prototype.getBottomLeftLatitude=function(){
if(!this.bGeodeticExtentsUpdated){
this.getGeodeticExtents();
}
return this.blLatitude;
};
SIX.Map.prototype.getBottomLeftLongitude=function(){
if(!this.bGeodeticExtentsUpdated){
this.getGeodeticExtents();
}
return this.blLongitude;
};
SIX.Map.prototype.getBottomRightLatitude=function(){
if(!this.bGeodeticExtentsUpdated){
this.getGeodeticExtents();
}
return this.brLatitude;
};
SIX.Map.prototype.getBottomRightLongitude=function(){
if(!this.bGeodeticExtentsUpdated){
this.getGeodeticExtents();
}
return this.brLongitude;
};
SIX.Map.prototype.updateStatus=function(){
if(this.status){
this.status.update();
}
};
SIX.Map.prototype.onMouseMove=function(mask,_9ba,_9bb,_9bc,_9bd){
if(isNaN(_9ba)||isNaN(_9bb)||isNaN(_9bc)||isNaN(_9bd)){
return;
}
this.nMouseMask=mask;
this.dMouseScreenX=_9ba;
this.dMouseScreenY=_9bb;
this.dMouseWorldX=_9bc;
this.dMouseWorldY=_9bd;
this.updateStatus();
var _9be=this.getBottomMap();
_9be.roamClip(mask,_9ba,_9bb,_9bc,_9bd);
var _9bf=SIX.App.getCurrentChannel();
_9bf.executeToolGroupCallbacks(SIX.eToolCallbacks.ONMAPMOUSEMOVE,this);
this.executeCallbacks(SIX.eMapCallbacks.ONMOUSEMOVE);
};
SIX.Map.prototype.onMouseDown=function(mask,_9c1,_9c2,_9c3,_9c4){
if(isNaN(_9c1)||isNaN(_9c2)||isNaN(_9c3)||isNaN(_9c4)){
return;
}
var _9c5=(new Date()).getTime();
this.bDoubleClick=(_9c5-this.tMouseDown)<500?true:false;
this.tMouseDown=_9c5;
var _9c6=document[this.uid];
var _9c7=this.getBottomMap();
_9c7.roamClip(mask,_9c1,_9c2,_9c3,_9c4);
this.mouseDown=true;
this.nMouseMask=mask;
this.dMouseScreenX=_9c1;
this.dMouseScreenY=_9c2;
this.dMouseWorldX=_9c3;
this.dMouseWorldY=_9c4;
this.updateStatus();
var _9c8=SIX.App.getCurrentChannel();
_9c8.executeToolGroupCallbacks(SIX.eToolCallbacks.ONMAPMOUSEDOWN,this);
this.executeCallbacks(SIX.eMapCallbacks.ONMOUSEDOWN);
};
SIX.Map.prototype.onMouseUp=function(mask,_9ca,_9cb,_9cc,_9cd){
SIX.App.mouseCurrentAction=0;
if(SIX.App.nPreMouseActionPointerMode!=-1){
this.setPointerMode(SIX.App.nPreMouseActionPointerMode);
SIX.App.nPreMouseActionPointerMode=-1;
}
if(isNaN(_9ca)||isNaN(_9cb)||isNaN(_9cc)||isNaN(_9cd)){
return;
}
var _9ce=document[this.uid];
this.mouseDown=false;
this.nMouseMask=mask;
this.dMouseScreenX=_9ca;
this.dMouseScreenY=_9cb;
this.dMouseWorldX=_9cc;
this.dMouseWorldY=_9cd;
this.updateStatus();
var _9cf=SIX.App.getCurrentChannel();
_9cf.executeToolGroupCallbacks(SIX.eToolCallbacks.ONMAPMOUSEUP,this);
this.executeCallbacks(SIX.eMapCallbacks.ONMOUSEUP);
};
SIX.Map.prototype.saveLayerParams=function(_9d0,_9d1){
var _9d2=this.aLayerParams[_9d0];
var _9d3=_9d1.split(";");
for(var i=0;i<_9d3.length;i++){
var _9d5=_9d3[i].indexOf("=");
_9d2[_9d3[i].substr(0,_9d5).toLowerCase()]=_9d3[i].substr(_9d5+1);
}
};
SIX.Map.prototype.setLayerParameter=function(_9d6,_9d7){
var _9d8=document[this.uid];
var _9d9=false;
var _9da=_9d8.GetLayerIndex(_9d6);
if(_9da!=-1){
_9d9=_9d8.SetLayerParameter(_9d6,_9d7);
var _9db=_9d8.GetLayerType(_9d6);
_9db=_9db.toLowerCase();
if(_9db=="simplevector"){
this.saveLayerParams(_9d6,_9d7);
}
}
return _9d9;
};
SIX.Map.prototype.setLayerTransparency=function(_9dc,_9dd,_9de){
var _9df=document[this.uid];
var _9e0=_9df.GetLayerTransparency(_9dc,_9dd);
if(_9e0!=_9de){
_9df.SetLayerTransparency(_9dc,_9dd,_9de);
}
this.aTransparentColors[_9dd]=true;
};
SIX.Map.prototype.deleteLayer=function(_9e1){
var _9e2=document[this.uid];
var _9e3=this.bAllowExtentsUpdate;
this.bAllowExtentsUpdate=false;
var _9e4=_9e2.DeleteLayer(_9e1);
if(_9e4&&this.aLayerParams[_9e1]){
delete this.aLayerParams[_9e1];
this.aLayerParams[_9e1]=null;
}
this.bAllowExtentsUpdate=_9e3;
return _9e4;
};
SIX.Map.prototype.addLayer=function(_9e5,sUrl,_9e7,_9e8){
var _9e9=document[this.uid];
_9e5=((SIX.App.bDHTMLControl&&_9e5.toLowerCase()=="ecwjp2")?"ECW":_9e5);
var _9ea=this.bAllowExtentsUpdate;
this.bAllowExtentsUpdate=false;
var _9eb=_9e9.AddLayer(_9e5,sUrl,_9e7,_9e8);
this.bAllowExtentsUpdate=_9ea;
if(_9eb!=-1&&_9e5.toLowerCase()=="simplevector"){
if(!this.aLayerParams[_9e7]){
this.aLayerParams[_9e7]=new Object();
}
this.saveLayerParams(_9e7,_9e8);
}
return _9eb;
};
SIX.Map.prototype.moveLayer=function(_9ec,_9ed){
var _9ee=document[this.uid];
var _9ef=this.bAllowExtentsUpdate;
this.bAllowExtentsUpdate=false;
var _9f0=_9ee.MoveLayer(_9ec,_9ed);
this.bAllowExtentsUpdate=_9ef;
return _9f0;
};
SIX.Map.prototype.deleteAllLayers=function(){
var _9f1=document[this.uid];
var _9f2=this.bAllowExtentsUpdate;
this.bAllowExtentsUpdate=false;
_9f1.DeleteAllLayers();
if(this.aLayerParams){
delete this.aLayerParams;
this.aLayerParams=new Object();
}
this.bAllowExtentsUpdate=_9f2;
};
SIX.Map.prototype.cacheEcwpLayer=function(_9f3){
if(SIX.App.bDHTMLControl){
return;
}
var _9f4=document[this.uid];
var _9f5=-1;
for(var i=0;i<SIX.App.aCachedEcwpLayers.length;i++){
if(_9f3==SIX.App.aCachedEcwpLayers[i]){
_9f5=i;
SIX.App.aCachedEcwpLayers.splice(_9f5,1,_9f3);
break;
}
}
if(_9f5==-1){
SIX.App.aCachedEcwpLayers[SIX.App.aCachedEcwpLayers.length]=_9f3;
}
if(SIX.App.aCachedEcwpLayers.length>=SIXConfig.MAX_CACHED_ECWP_CONNECTIONS){
var _9f7=SIX.App.aCachedEcwpLayers.shift();
if((SIXConfig.FREECACHE!="TRUE")&&!(_9f7.bInScale&&_9f7.bSelected)){
this.deleteLayer(_9f7.uid);
var _9f5=this.addLayer("ecwjp2",_9f7.url,_9f7.uid,"freecache=TRUE;transparency=0.0");
if(_9f5>=0){
this.deleteLayer(_9f7.uid);
}
}
}
};
SIX.Map.prototype.uncacheEcwpLayer=function(_9f8){
if(SIX.App.bDHTMLControl){
return;
}
var _9f9=document[this.uid];
for(var i=0;i<SIX.App.aCachedEcwpLayers.length;i++){
if(_9f8==SIX.App.aCachedEcwpLayers[i]){
SIX.App.aCachedEcwpLayers.splice(i,1);
break;
}
}
};
SIX.Map.prototype.getDistanceBetweenCoords=function(dX1,dY1,dX2,dY2){
var _9ff=(Math.sqrt(Math.pow(dX2-dX1,2)+Math.pow(dY2-dY1,2)));
return _9ff;
};
SIX.Map.prototype.getDistanceBetweenLLCoords=function(dX1,dY1,dX2,dY2){
var _a04=-1;
var _a05=this.datum();
var _a06=this.projection();
var _a07=this.getENPoint(dX1,dY1,_a05,_a06);
var _a08=this.getENPoint(dX2,dY2,_a05,_a06);
if(_a07&&_a07.length>=2&&_a08&&_a08.length>=2){
_a04=(Math.sqrt(Math.pow(_a08[0]-_a07[0],2)+Math.pow(_a08[1]-_a07[1],2)));
}
return _a04;
};
SIX.Map.prototype.checkVectorLayerExists=function(){
if(!SIX.App.bDHTMLControl){
var _a09=document[this.uid];
if(_a09.GetLayerIndex(this.editLayerName)==-1){
var bAdd=this.addLayer("SIMPLEVECTOR","",this.editLayerName,"visibility=true;color=#ff0000;fillcolor=#00FF00;linewidth=1");
this.setLayerTransparency(this.editLayerName,"#00ff00",0.3);
}
}
};
SIX.Map.prototype.addQueryPoint=function(_a0b,_a0c,_a0d,_a0e){
var _a0f=new Object;
_a0f.worldX=_a0b;
_a0f.worldY=_a0c;
_a0f.screenX=_a0d;
_a0f.screenY=_a0e;
this.queryPoints[this.queryPoints.length]=_a0f;
return _a0f;
};
SIX.Map.prototype.cancelOnEscape=function(){
if(document.captureEvents){
if(Event.KEYUP){
document.captureEvents(Event.KEYUP);
}
}
document.onkeyup=this.keyPressed;
};
SIX.Map.prototype.keyPressed=function(e){
if(!e){
if(window.event){
e=window.event;
}else{
return;
}
}
if(typeof (e.which)=="number"){
e=e.which;
}else{
if(typeof (e.keyCode)=="number"){
e=e.keyCode;
}else{
if(typeof (e.charCode)=="number"){
e=e.charCode;
}else{
return;
}
}
}
if(e==27){
var _a11=SIX.App.getCurrentChannel();
_a11.maps[0].clearDrawingObjects();
_a11.maps[0].queryPoints.length=0;
document.onkeyup=null;
}
};
SIX.Map.prototype.drawQuery=function(_a12,_a13,_a14,_a15){
if(this.nQueryType!=SIX.eQueryTypes.NONE){
var _a16=document[this.uid];
var edit="";
this.cancelOnEscape();
switch(this.nQueryType){
case SIX.eQueryTypes.RECTANGLE:
case SIX.eQueryTypes.POINT_OR_RECTANGLE:
if(this.queryPoints.length==1){
var _a18=this.queryPoints[0];
if(Math.abs(_a14-_a18.screenX)>6||Math.abs(_a15-_a18.screenY)>6){
edit="filledpolygon1="+_a18.worldX+","+_a18.worldY+"|"+_a18.worldX+","+_a13+"|"+_a12+","+_a13+"|"+_a12+","+_a18.worldY;
if(SIX.App.bDHTMLControl){
var _a19=document.getElementById(this.editLayerName);
if(_a19){
_a19.style.display="block";
var _a1a=Math.abs(Math.round(_a14)-Math.round(_a18.screenX));
var _a1b=Math.abs(Math.round(_a15)-Math.round(_a18.screenY));
var _a1c=Math.min(Math.round(_a14),Math.round(_a18.screenX));
var nTop=Math.min(Math.round(_a15),Math.round(_a18.screenY));
_a19.style.top=nTop+"px";
_a19.style.left=_a1c+"px";
_a19.style.width=_a1a+"px";
_a19.style.height=_a1b+"px";
_a19.style.visibility="visible";
}
}
}
}
break;
default:
break;
}
if(edit!=""&&this.editLayer){
this.setLayerParameter(this.editLayerName,edit);
}
}
};
SIX.Map.prototype.initQuery=function(tool){
var _a1f=tool.getAttachedServices();
if(_a1f){
var _a20=SIX.App.getCurrentChannel();
for(var i=0;i<_a1f.length;i++){
var _a22=_a1f[i];
if(_a22.attachWin&&_a22.queries){
_a20.setActiveQueryWindow(_a22.attachWin);
_a22.attachWin.showWin();
for(var j=0;j<_a22.queries.aQueries.length;j++){
var _a24=_a22.queries.aQueries[j];
var _a25=_a24.mapService;
if(_a25&&(_a25.attachWin||(_a25.parentService&&_a25.parentService.attachWin))){
for(var k=0;k<_a25.layers.length;k++){
var _a27=_a25.layers[k];
if((_a24.sMapServiceLayer==_a27.id)&&!_a27.bSelected&&_a24.bAlwaysOn){
_a25.layerVisibleNoUpdate(_a27);
_a25.access.updateMap(this);
this.hiddenLayers(_a25);
_a25.update();
break;
}
}
}
}
}
}
SIX.App.onWindowResize();
}
};
SIX.Map.prototype.clearDrawingObjects=function(){
var _a28=document[this.uid];
this.setLayerParameter(this.editLayerName,"filledpolygon1=;filledcircle1=;polyline2=");
var _a29=document.getElementById(this.editLayerName);
if(_a29){
_a29.style.visibility="hidden";
_a29.style.display="none";
}
};
SIX.Map.prototype.cancelSetExtentsTimeout=function(){
if(this.tCancelSetExtentsTimeout){
clearTimeout(this.tCancelSetExtentsTimeout);
this.tCancelSetExtentsTimeout=null;
}
if(this.tSetExtentsInterval){
clearInterval(this.tSetExtentsInterval);
this.tSetExtentsInterval=null;
}
};
SIX.Map.prototype.setExtentsFromMap=function(map){
var _a2b=document[this.uid];
_a2b.SetExtents(map.tlx,map.tly,map.brx,map.bry);
};
SIX.Map.prototype.onExtentChange=function(tlx,tly,brx,bry){
if(isNaN(tlx)||isNaN(tly)||isNaN(brx)||isNaN(bry)||!this.bAllowExtentsUpdate){
return;
}
if(this.parentMap){
document[this.parentMap.uid].SetExtents(tlx,tly,brx,bry);
}
var _a30=this.getPointerMode();
this.markerCollection.hideFeatures();
if(this.aHistory.length){
var _a31=this.aHistory[this.bHistoryMove?this.nOldHistoryIndex:this.nHistoryIndex];
var _a32=Math.abs(_a31[3]-_a31[1]);
var _a33=Math.abs(brx-tlx);
var _a34=((_a33*this.dMaxOverlayScaleChangeFactor<_a32)||(_a32*this.dMaxOverlayScaleChangeFactor<_a33));
if(_a34){
for(var i=0;i<this.catalog.services.length;i++){
var svc=this.catalog.services[i];
if(!svc.bFeatureServer){
this.setLayerParameter(svc.uid,"visibility=FALSE");
for(var j=0;j<svc.aServices.length;j++){
this.setLayerParameter(svc.aServices[j].uid,"visibility=FALSE");
}
}
}
}
}
var _a38=0.00001;
if(!this.bHistoryMove&&!this.bChangingChannel&&Math.abs(tlx-this.tlx)<_a38&&Math.abs(tly-this.tly)<_a38&&Math.abs(brx-this.brx)<_a38&&Math.abs(bry-this.bry)<_a38){
return;
}
if(!this.parentMap&&!this.bChangingChannel){
this.setECWProgress(0);
this.setGISOverlayProgress(0);
this.bLoading=true;
}
this.tlx=tlx;
this.tly=tly;
this.brx=brx;
this.bry=bry;
this.envelope.setMinX(this.tlx);
this.envelope.setMinY(this.bry);
this.envelope.setMaxX(this.brx);
this.envelope.setMaxY(this.tly);
this.bGeodeticExtentsUpdated=false;
if(this.loaded){
this.dMouseWorldX=this.tlx+(this.brx-this.tlx)/2;
this.dMouseWorldY=this.tly+(this.bry-this.tly)/2;
this.scale=this.getScaleFromExtents(this.tlx,this.tly,this.brx,this.bry);
var _a39=SIX.App.getCurrentChannel();
_a39.executeToolGroupCallbacks(SIX.eToolCallbacks.ONMAPEXTENTCHANGE,this);
this.executeCallbacks(SIX.eMapCallbacks.ONEXTENTCHANGE);
}
for(var i=0;i<this.catalog.services.length;i++){
var svc=this.catalog.services[i];
if(svc.access instanceof SIX.Access.ECWP){
for(var j=0;j<svc.layers.length;j++){
var _a3a=svc.layers[j];
this.setLayerClipRegion(_a3a);
for(var k=0;k<_a3a.aLayers.length;k++){
var _a3c=_a3a.aLayers[k];
this.setLayerClipRegion(_a3c);
}
}
}
}
if(this.redrawTimer!=null){
clearTimeout(this.redrawTimer);
this.redrawTimer=null;
}
if(this.loaded){
if(!this.childMap){
this.redrawTimer=setTimeout(this.myself+".loadMapEx()",750);
}
}else{
this.loadMap();
if((this.dInitialTopLeftLat==0)&&(this.dInitialTopLeftLon==0)&&(this.dInitialBottomRightLat==0)&&(this.dInitialBottomRightLon==0)){
this.setExtentsAll();
}else{
this.setExtents(this.dInitialTopLeftLat,this.dInitialTopLeftLon,this.dInitialBottomRightLat,this.dInitialBottomRightLon);
}
var _a3d=this.catalog;
if(_a3d.currentSearchService&&(_a3d.currentSearchService.currentSearch>-1)){
var _a3e=_a3d.currentSearchService.searches[_a3d.currentSearchService.currentSearch];
setTimeout(_a3d.currentSearchService.myself+".initializeCurrentSearch()",0);
}
}
};
SIX.Map.prototype.setLayerClipRegion=function(_a3f){
if(!SIX.App.bDHTMLControl){
this.setLayerColorMask(_a3f);
}else{
if(_a3f.aClipRegion.length&&!_a3f.bOTDF){
var _a40=document[this.uid];
if(_a40.GetLayerIndex(_a3f.uid)==-1){
return;
}
if(this.inLayerClipRegion(_a3f)){
_a40.SetLayerParameter(_a3f.uid,"imagetype=jpg;otdf="+(_a3f.sOTDFPath!=""?"true":"false")+";clipregion=");
}else{
var _a41=_a3f.getClipRegionStr();
if(_a41!=""){
_a40.SetLayerParameter(_a3f.uid,"imagetype=png;otdf=false;clipregion="+_a41);
}
}
}
}
};
SIX.Map.prototype.inLayerClipRegion=function(_a42){
var _a43=false;
if(SIX.App.bDHTMLControl){
var _a44=document[this.uid];
if(_a44.GetLayerIndex(_a42.uid)==-1){
return false;
}
if(_a42.aClipRegion.length){
var _a45=new Array();
var _a46=_a44.GetLayerTileWorldExtents(_a42.uid,this.tlx,this.tly,this.brx,this.bry);
_a45[_a45.length]=new SIX.Point(_a46[0],_a46[1]);
_a45[_a45.length]=new SIX.Point(_a46[2],_a46[1]);
_a45[_a45.length]=new SIX.Point(_a46[2],_a46[3]);
_a45[_a45.length]=new SIX.Point(_a46[0],_a46[3]);
var _a43=_a42.clipRegionEnvelope.containsPoints(_a45);
if(_a43){
_a43=SIX.Util.pointsInRegion(_a42.aClipRegion,_a45);
}
}
}
return _a43;
};
SIX.Map.prototype.setLayerColorMask=function(_a47){
var _a48=document[this.uid];
if(_a48.GetLayerIndex(_a47.uid)==-1){
return;
}
if(_a47.aColorsToMask.length&&(_a47.sColorMask!="")){
var _a49=new SIX.Point(this.getTopLeftLongitude(),this.getTopLeftLatitude());
var _a4a=new SIX.Point(this.getTopRightLongitude(),this.getTopRightLatitude());
var _a4b=new SIX.Point(this.getBottomRightLongitude(),this.getBottomRightLatitude());
var _a4c=new SIX.Point(this.getBottomLeftLongitude(),this.getBottomLeftLatitude());
var _a4d=new Array();
_a4d[_a4d.length]=_a49;
_a4d[_a4d.length]=_a4a;
_a4d[_a4d.length]=_a4b;
_a4d[_a4d.length]=_a4c;
if(_a47.containsPoints(_a4d)){
this.setLayerParameter(_a47.uid,"transmask=");
for(var i=0;i<_a47.aColorsToMask.length;i++){
this.setLayerTransparency(_a47.uid,_a47.aColorsToMask[i],1);
}
}else{
this.setLayerParameter(_a47.uid,"transmask="+_a47.sColorMask);
for(var i=0;i<_a47.aColorsToMask.length;i++){
this.setLayerTransparency(_a47.uid,_a47.aColorsToMask[i],(SIX.App.isIE?0:0.001));
}
}
}
};
SIX.Map.prototype.loadMapEx=function(){
if(SIX.App.bDHTMLControl){
if(this.AJAXGetLLExtents){
this.AJAXGetLLExtents.Cancel();
}
var _a4f=function(map,_a51){
if(_a51){
map.tlLatitude=_a51[0][1];
map.tlLongitude=_a51[0][0];
map.trLatitude=_a51[1][1];
map.trLongitude=_a51[1][0];
map.brLatitude=_a51[2][1];
map.brLongitude=_a51[2][0];
map.blLatitude=_a51[3][1];
map.blLongitude=_a51[3][0];
}
map.bGeodeticExtentsUpdated=true;
map.loadMap();
};
var _a52=[[this.tlx,this.tly],[this.brx,this.tly],[this.brx,this.bry],[this.tlx,this.bry]];
this.AJAXGetLLExtents=this.convertCoordsAsync(this.datum(),this.projection(),_a52,this.datum(),"GEODETIC",_a4f,this);
}else{
if(!this.childMap){
var _a53=this;
while(_a53){
_a53.resetGISOverlayMapsLoadState();
_a53=_a53.parentMap;
}
}
if(this.parentMap){
this.parentMap.loadMapEx();
}
this.loadMap();
}
};
SIX.Map.prototype.loadMap=function(){
this.bLoading=true;
var _a54=document[this.uid];
this.bChangingChannel=false;
this.width=this.width1K=_a54.GetViewWidth();
this.height=this.height1K=_a54.GetViewHeight();
if((this.width<=0)||(this.height<=0)){
return;
}
if(this.width1K>1023){
this.height1K=Math.floor(this.height1K*(1023/this.width1K));
this.width1K=1023;
}
if(this.height1K>1023){
this.width1K=Math.floor(this.width1K*(1023/this.height1K));
this.height1K=1023;
}
this.loaded=true;
this.dMouseWorldX=this.tlx+(this.brx-this.tlx)/2;
this.dMouseWorldY=this.tly+(this.bry-this.tly)/2;
this.scale=this.getScaleFromExtents(this.tlx,this.tly,this.brx,this.bry);
this.resetGISOverlayMapsLoadState();
if(!this.catalog){
return;
}
if((this.nHistoryIndex<(this.aHistory.length-1))&&(this.nHistoryIndex>=0)&&!this.bHistoryMove){
this.clearForwardHistory();
}
if(!this.bHistoryMove){
var _a55=true;
if(this.aHistory.length){
var _a56=this.aHistory[this.aHistory.length-1];
if((_a56[0]==this.tly)&&(_a56[1]==this.tlx)&&(_a56[2]==this.bry)&&(_a56[3]==this.brx)){
_a55=false;
}
}
if(_a55){
this.aHistory[this.aHistory.length]=new Array(this.tly,this.tlx,this.bry,this.brx);
this.nOldHistoryIndex=this.nHistoryIndex;
this.nHistoryIndex=(this.aHistory.length-1);
}
}else{
this.bHistoryMove=false;
}
var _a57=0;
for(var i=0;i<this.catalog.services.length;i++){
var _a59=this.catalog.services[i];
if(_a59.bFeatureServer){
_a59.updateMap(this);
}else{
if(!_a59.attachWin&&!(_a59.access instanceof SIX.Access.ECWP)){
if(!_a59.layers.length){
if(_a59.nLayersLoadState!=SIX.eLayersLoadState.LOADING){
_a59.nLayersLoadState=SIX.eLayersLoadState.NOT_LOADED;
_a59.updateMap(this);
_a59.build();
}
}else{
if(this.hiddenLayers(_a59)||(_a59.loaded==false)){
_a59.updateMap(this);
_a59.build();
}else{
_a59.loadMap(this);
}
}
}else{
if(!_a59.layers.length){
if(_a59.nLayersLoadState!=SIX.eLayersLoadState.LOADING){
_a59.nLayersLoadState=SIX.eLayersLoadState.NOT_LOADED;
_a59.updateMap(this);
if(_a59.attachWin&&_a59.currentTab==0){
_a59.attachWin.build();
}
}
}else{
if(this.hiddenLayers(_a59)||(_a59.loaded==false)){
_a59.updateMap(this);
if(_a59.attachWin&&_a59.currentTab==0){
_a59.attachWin.build();
}
}else{
_a59.loadMap(this);
}
}
}
var _a5a=_a59.getBestScale(this);
if(_a5a>0&&(_a57==0||_a5a<_a57)){
_a57=_a5a;
}
}
}
this.setBestScale(_a57);
this.updateStatus();
this.markerCollection.update();
var _a5b=SIX.App.getCurrentChannel();
_a5b.executeToolGroupCallbacks(SIX.eToolCallbacks.ONMAPLOAD,this);
this.executeCallbacks(SIX.eMapCallbacks.ONLOAD);
this.bLoading=false;
};
SIX.Map.prototype.layerInScale=function(_a5c){
var _a5d=true;
var _a5e=_a5c.service.getScale(this);
if(_a5c.minScale||_a5c.maxScale){
if((_a5c.minScale&&_a5e<_a5c.minScale)||(_a5c.maxScale&&_a5e>_a5c.maxScale)){
_a5d=false;
}
}else{
for(var i=0;i<_a5c.aLayers.length;i++){
_a5d=false;
if(this.layerInScale(_a5c.aLayers[i])){
_a5d=true;
break;
}
}
}
return _a5d;
};
SIX.Map.prototype.updateLayerWorldExtents=function(){
var map=this;
var _a61=function(_a62,_a63){
with({map:map}){
var _a64=_a62.aLayerUidsSubset;
if(_a63&&_a64&&(_a63.length==2*_a64.length)){
for(var i=0;i<_a64.length;i++){
var _a66=map.hLayersToUpdate.getItem(_a64[i]);
if(_a66){
var _a67=i*2;
_a66.envelope=new SIX.Envelope(_a63[_a67][0],_a63[_a67+1][1],_a63[_a67+1][0],_a63[_a67][1]);
map.hLayersToUpdate.removeItem(_a64[i]);
}
}
}
if(_a62.nEnd<_a62.aLayerUids.length){
_a62.nEnd=(_a62.nStart+map.MAX_LAYERS_TO_UPDATE<=_a62.aLayerUids.length?_a62.nStart+map.MAX_LAYERS_TO_UPDATE:_a62.aLayerUids.length);
if(_a62.nStart<_a62.nEnd){
_a62.aLayerUidsSubset=_a62.aLayerUids.slice(_a62.nStart,_a62.nEnd);
var _a68=_a62.aGeoCoords.slice(2*_a62.nStart,2*_a62.nEnd);
_a62.nStart=_a62.nEnd;
map.convertCoordsAsync(map.coordSys.sDatum,"geodetic",_a68,map.coordSys.sDatum,map.coordSys.sProjection,_a61,_a62);
}
}
}
};
var _a69=new Array();
var _a6a=new Array();
for(var i in this.hLayersToUpdate.items){
if(this.hLayersToUpdate.items.hasOwnProperty(i)){
var _a6c=this.hLayersToUpdate.items[i];
var _a6d=false;
if(!_a6c.envelope&&(_a6c.tlLatitude||_a6c.tlLongitude||_a6c.brLatitude||_a6c.brLongitude)){
if(this.coordSys){
var _a6e=null;
if(_a6c.coordSys&&_a6c.coordSys.initialized()){
_a6e=_a6c.coordSys;
}else{
if(_a6c.parentLayer&&_a6c.parentLayer.coordSys&&_a6c.parentLayer.coordSys.initialized()){
_a6e=_a6c.parentLayer.coordSys;
}
}
if(_a6e&&_a6e.equals(this.coordSys)){
_a69[_a69.length]=new Array(_a6c.tlLongitude,_a6c.tlLatitude);
_a69[_a69.length]=new Array(_a6c.brLongitude,_a6c.brLatitude);
_a6a[_a6a.length]=_a6c.uid;
_a6d=true;
}
}
}
if(!_a6d){
this.hLayersToUpdate.removeItem(i);
}
}
}
var _a6f=0;
var nEnd=0;
if(nEnd<_a6a.length){
nEnd=(_a6f+this.MAX_LAYERS_TO_UPDATE<=_a6a.length?_a6f+this.MAX_LAYERS_TO_UPDATE:_a6a.length);
if(_a6f<nEnd){
var _a71={nStart:_a6f,nEnd:nEnd,aLayerUids:_a6a,aGeoCoords:_a69,aLayerUidsSubset:null};
_a71.aLayerUidsSubset=_a6a.slice(_a6f,nEnd);
var _a72=_a69.slice(2*_a6f,2*nEnd);
_a71.nStart=_a71.nEnd;
this.convertCoordsAsync(this.coordSys.sDatum,"geodetic",_a72,this.coordSys.sDatum,this.coordSys.sProjection,_a61,_a71);
}
}
};
SIX.Map.prototype.layerInExtents=function(_a73){
var _a74=true;
if(_a73.tlLatitude||_a73.tlLongitude||_a73.brLatitude||_a73.brLongitude){
if(!_a73.envelope){
if(SIX.App.bDHTMLControl){
if(!this.hLayersToUpdate.getItem(_a73.uid)&&_a73.service.access instanceof SIX.Access.ECWP){
this.hLayersToUpdate.setItem(_a73.uid,_a73);
if(this.tUpdateLayerWorldExtents){
clearTimeout(this.tUpdateLayerWorldExtents);
}
this.tUpdateLayerWorldExtents=setTimeout(this.myself+".updateLayerWorldExtents()",1000);
}
}
var _a75=0.5*(_a73.brLongitude-_a73.tlLongitude);
var _a76=0.5*(_a73.tlLatitude-_a73.brLatitude);
var _a77=_a73.tlLongitude-_a75;
var _a78=_a73.tlLatitude+_a76;
var _a79=_a73.brLongitude+_a75;
var _a7a=_a73.brLatitude-_a76;
if(!((((_a77<=this.getTopLeftLongitude())&&(_a79>=this.getTopLeftLongitude()))||((_a77>=this.getTopLeftLongitude())&&(_a77<=this.getBottomRightLongitude())))&&(((_a78>=this.getTopLeftLatitude())&&(_a7a<=this.getTopLeftLatitude()))||((_a78<=this.getTopLeftLatitude())&&(_a78>=this.getBottomRightLatitude()))))){
_a74=false;
}else{
if(this.coordSys){
var _a7b=null;
if(_a73.coordSys&&_a73.coordSys.initialized()){
_a7b=_a73.coordSys;
}else{
if(_a73.parentLayer&&_a73.parentLayer.coordSys&&_a73.parentLayer.coordSys.initialized()){
_a7b=_a73.parentLayer.coordSys;
}
}
if(_a7b&&_a7b.equals(this.coordSys)){
var _a7c=[[_a73.tlLongitude,_a73.tlLatitude],[_a73.brLongitude,_a73.brLatitude]];
var _a7d=this.convertCoords(_a7b.sDatum,"GEODETIC",_a7c,_a7b.sDatum,_a7b.sProjection);
var _a7e=(_a7d&&_a7d.length==2?_a7d[0]:null);
var _a7f=(_a7d&&_a7d.length==2?_a7d[1]:null);
if(_a7e&&_a7e.length>=2&&_a7f&&_a7f.length>=2){
_a73.envelope=new SIX.Envelope(_a7e[0],_a7f[1],_a7f[0],_a7e[1]);
}
}
}
}
}
if(_a73.envelope&&!_a73.envelope.intersects(this.envelope)){
_a74=false;
}
}else{
for(var i=0;i<_a73.aLayers.length;i++){
_a74=false;
if(this.layerInExtents(_a73.aLayers[i])){
_a74=true;
break;
}
}
}
return _a74;
};
SIX.Map.prototype.setChildLayersInScale=function(_a81){
var _a82=false;
for(var j=0;j<_a81.aLayers.length;j++){
var _a84=_a81.aLayers[j];
var _a85=_a84.bInScale;
_a84.bInScale=(_a84.hasScale()?true:_a81.bInScale);
if(!_a81.service.bLayersOutOfScaleEnabled&&_a84.bInScale){
_a84.bInScale=this.layerInScale(_a84);
}
if(!_a81.service.bLayersOutsideExtentsEnabled&&_a84.bInScale){
_a84.bInScale=this.layerInExtents(_a84);
}
if((_a85!=_a84.bInScale)||this.setChildLayersInScale(_a84)){
_a82=true;
_a84.executeCallbacks(SIX.eLayerCallbacks.ONCHANGEISINSCALE);
}
}
return _a82;
};
SIX.Map.prototype.hiddenLayers=function(_a86,_a87){
var _a88=false;
if(_a86.layers.length){
for(var i=0;i<_a86.layers.length;i++){
var _a8a=_a86.layers[i];
var _a8b=true;
if(this.scale&&(_a86.loaded||_a86.access instanceof SIX.Access.ECWP)&&this.loaded){
if(!_a86.bLayersOutOfScaleEnabled){
_a8b=this.layerInScale(_a8a);
}
if(!_a86.bLayersOutsideExtentsEnabled&&_a8b){
_a8b=this.layerInExtents(_a8a);
}
}
if(_a8b!=_a8a.bInScale){
_a88=true;
_a8a.bInScale=_a8b;
_a8a.executeCallbacks(SIX.eLayerCallbacks.ONCHANGEISINSCALE);
}
if(this.scale&&(_a86.loaded||_a86.access instanceof SIX.Access.ECWP)&&this.loaded){
_a88=this.setChildLayersInScale(_a8a);
}
}
if(_a86.bDisplayBest&&_a86.sortLayersInBestOrder(this)){
_a88=true;
}
for(var i=0;i<_a86.allLayers.length;i++){
var _a8a=_a86.allLayers[i];
var _a8c=true;
if(_a86.bShowUnselectedLayers||_a8a.bSelected||_a8a.bSelectedDisabled){
_a8a.bHidden=false;
}else{
if(!_a8a.bSelected&&_a87){
_a8a.bHidden=true;
}
}
if(_a8a.bHidden){
_a8c=false;
}else{
if(_a86.bHideOutOfScaleLayers){
_a8c=_a8a.bInScale;
}
}
if(_a8c!=_a8a.bInList){
_a88=true;
_a8a.bInList=_a8c;
}
}
if(!_a88){
var _a8d=new SIX.CoordSys();
for(var i=0;i<_a86.layers.length;i++){
var _a8a=_a86.layers[i];
if(_a8a.bInScale&&_a8a.bSelected){
if(!_a8d.initialized()){
_a8d=_a8a.coordSys;
}else{
if(!_a8d.equals(_a8a.coordSys)){
_a88=true;
break;
}
}
}
}
}
}
return _a88;
};
SIX.Map.prototype.onError=function(_a8e,nNum,_a90,_a91){
if(this.bReconnecting){
return;
}
var _a92=SIX.App.getCurrentChannel();
if(_a8e&&(_a8e!="")){
if(nNum==ERROR_CONNECTION_LOST){
var _a93;
var _a94=document[this.uid];
var _a95=_a94.GetLayerType(_a8e);
_a95=_a95.toLowerCase();
if((_a95=="ecw")||(_a95=="jp2")){
for(var i=0;i<this.catalog.services.length;i++){
var _a97=this.catalog.services[i];
if(_a97.access instanceof SIX.Access.ECWP){
for(var j=0;j<_a97.layers.length;j++){
var _a99=_a97.layers[j];
if(_a99.uid==_a8e){
_a93=_a99;
var _a9a=new SIX.RequestResponse(_a99.uid,_a99.url,"","",0,0,0,0,0,SIXConfig.eRequestResponseStatus.FAILURE);
_a97.statistics.addRequestResponse(_a9a);
if(_a92.console){
_a92.console.updateHealth(_a97);
}
if(this.tReconnect){
clearTimeout(this.tReconnect);
}
this.bReconnecting=true;
this.tReconnect=setTimeout(this.myself+".reconnectEcwpLayers();",SIXConfig.ECWP_RECONNECTION_INITIAL_TIMEOUT);
break;
}
}
}
if(_a93){
break;
}
}
}
}else{
}
}else{
}
};
SIX.Map.prototype.reconnectEcwpLayers=function(){
if(this.nNumReconnectAttempts==SIXConfig.ECWP_RECONNECTION_MAX_ATTEMPTS){
this.bReconnecting=false;
this.nNumReconnectAttempts=0;
alert("The connection to Image Web Server has been lost.\nPlease check your Internet connection and then reload the page.");
return;
}
this.nNumReconnectAttempts++;
var _a9b=document[this.uid];
var _a9c=SIX.App.getCurrentChannel();
for(var i=0;i<this.catalog.services.length;i++){
var _a9e=this.catalog.services[i];
if(_a9e.access instanceof SIX.Access.ECWP){
var _a9f=null;
for(var j=0;j<_a9e.layers.length;j++){
var _aa1=_a9e.layers[_a9e.layersOrder[j]];
if(_aa1.bSelected){
_a9f=_aa1;
break;
}
}
for(var j=_a9e.layers.length-1;j>=0;j--){
var _aa1=_a9e.layers[_a9e.layersOrder[j]];
var _aa2=_aa1.uid;
var _aa3=_aa1.url;
if(_aa1.bSelected&&_aa3!=""&&_aa2!=""){
var _aa4=SIXConfig.FREECACHE;
var _aa5=(_aa1==_a9f)?_a9e.transparency:"1.0";
this.deleteLayer(_aa2);
var _aa6="freecache=TRUE;transparency="+_aa5+(_aa1.bOTDF?";otdf=true":"");
var _aa7=this.addLayer("ecwjp2",_aa3,_aa2,_aa6);
if((_aa7>=0)&&(_aa4!="TRUE")){
_aa6="freecache="+_aa4+";transparency="+_aa5+(_aa1.bOTDF?";otdf=true":"");
this.deleteLayer(_aa2);
_aa7=this.addLayer("ecwjp2",_aa3,_aa2,_aa6);
}
var _aa8=new SIX.RequestResponse(_aa2,_aa3,"","",0,0,0,0,0,(_aa7>=0?SIXConfig.eRequestResponseStatus.SUCCESS:SIXConfig.eRequestResponseStatus.FAILURE));
_a9e.statistics.addRequestResponse(_aa8);
if(_a9c.console){
_a9c.console.updateHealth(_a9e);
}
if(_aa7==-1){
if(this.tReconnect){
clearTimeout(this.tReconnect);
}
this.bReconnecting=true;
this.tReconnect=setTimeout(this.myself+".reconnectEcwpLayers()",SIXConfig.ECWP_RECONNECTION_REPEAT_TIMEOUT);
return;
}
}
}
this.bReconnecting=false;
this.nNumReconnectAttempts=0;
_a9e.access.orderLayers(this);
this.update();
}
}
};
SIX.Map.prototype.onLayerResponse=function(_aa9,url,body,_aac,tlx,tly,brx,bry,_ab1){
if(!this.catalog||isNaN(tlx)||isNaN(tly)||isNaN(brx)||isNaN(bry)){
return;
}
var _ab2=SIX.App.getCurrentChannel();
for(var i=0;i<this.catalog.services.length;i++){
var _ab4=this.catalog.services[i];
var _ab5=false;
if(_ab4.queries){
for(var j=0;j<_ab4.queries.aQueries.length;j++){
if(_ab4.queries.aQueries[j].uid==_aa9){
_ab5=true;
break;
}
}
}
var _ab7=_ab4;
for(var j=0;j<_ab4.aServices.length;j++){
if(_ab4.aServices[j].uid==_aa9){
_ab7=_ab4.aServices[j];
break;
}
}
if((_ab7.uid==_aa9)||_ab5){
if(_ab1.substr(0,("NCS_OVERLAY_FAILURE").length)=="NCS_OVERLAY_FAILURE"){
var _ab8=false;
if(_ab7.nLayersLoadState==SIX.eLayersLoadState.LOADING){
if(_ab1.toLowerCase().indexOf("could not connect to host")!=-1){
if(!_ab7.nNumConsecutiveLoadLayersFailed){
_ab7.tLoadLayers=setTimeout(""+_ab7.myself+".clearLoadLayersTimer()",SIXConfig.LOAD_LAYERS_TIMEOUT);
}
if(_ab7.tLoadLayers){
_ab7.nNumConsecutiveLoadLayersFailed++;
_ab7.loadLayers(this);
_ab8=true;
}else{
_ab7.nNumConsecutiveLoadLayersFailed=0;
}
}
}
if(!_ab8){
SIX.App.popupAlert(_ab7.name+" ("+_ab7.access.name+") Error.","The map server reported an error.","Overlay Error\nURL: "+url+"\nBody: "+body+"\nResponse: "+_ab1);
_ab7.nMapLoadState=SIX.eMapLoadState.LOAD_ERROR;
}
var _ab9=new SIX.RequestResponse(_aa9,url,body,_aac,tlx,tly,brx,bry,_ab1,SIXConfig.eRequestResponseStatus.FAILURE);
_ab7.statistics.addRequestResponse(_ab9);
if(_ab2.console){
_ab2.console.addMessage(_ab9.getConsoleMessage());
_ab2.console.updateHealth(_ab7);
}
return;
}
if(_ab7.nLayersLoadState==SIX.eLayersLoadState.LOADING){
_ab7.nNumConsecutiveLoadLayersFailed=0;
_ab7.clearLoadLayersTimer();
}
var _aba=SIXConfig.eRequestResponseStatus.SUCCESS;
var _abb=_ab7.access.responseMap(this,_aa9,url,body,_aac,tlx,tly,brx,bry,_ab1);
if(!_abb){
_aba=_ab7.getRequestResponseStatus(_ab1);
}
var _ab9=new SIX.RequestResponse(_aa9,url,body,_aac,tlx,tly,brx,bry,_ab1,_aba);
_ab7.statistics.addRequestResponse(_ab9);
if(_ab2.console){
if(_aba!=SIXConfig.eRequestResponseStatus.SUCCESS){
_ab2.console.addMessage(_ab9.getConsoleMessage());
}
_ab2.console.updateHealth(_ab7);
}
if(!_ab7.bFeatureServer){
var _abc=Math.abs(this.brx-this.tlx);
var _abd=Math.abs(brx-tlx);
if((_abc*this.dMaxOverlayScaleChangeFactor<_abd)||(_abd*this.dMaxOverlayScaleChangeFactor<_abc)){
return;
}
if(_ab7.attachWin){
_ab7.attachWin.build();
}else{
if(_ab7.parentService){
_ab7.parentService.build();
}
}
if(_ab1=="NCS_OVERLAY_SUCCESS"){
var _abe=document[this.uid];
var _abf=this.getLayerParameter(_ab7.uid,"visibility");
if(_abf.toLowerCase()=="false"){
var _ac0=this.getLayerParameter(_ab7.uid,"url");
var _ac1=this.getLayerParameter(_ab7.uid,"transparency");
var _ac2=this.getLayerParameter(_ab7.uid,"bands");
var _ac3=this.getLayerParameter(_ab7.uid,"mode");
var _ac4=this.getLayerParameter(_ab7.uid,"body");
var _ac5=this.getLayerParameter(_ab7.uid,"action");
var _ac6=this.getLayerParameter(_ab7.uid,"worldtlx");
var _ac7=this.getLayerParameter(_ab7.uid,"worldtly");
var _ac8=this.getLayerParameter(_ab7.uid,"worldbrx");
var _ac9=this.getLayerParameter(_ab7.uid,"worldbry");
var _aca="mode="+_ac3+";"+"body="+_ac4+";"+"action="+_ac5+";"+"worldTLX="+_ac6+";"+"worldTLY="+_ac7+";"+"worldBRX="+_ac8+";"+"worldBRY="+_ac9+";"+"url="+_ac0+";"+"transparency="+_ac1+";"+"bands="+_ac2+";";
var _acb=_abe.GetLayerIndex(_ab7.uid);
if(this.deleteLayer(_ab7.uid)){
var _acc=this.addLayer("GISOverlay","",_ab7.uid,_aca);
if(_acc!=-1){
if(_acb!=-1){
this.moveLayer(_acc,_acb);
}
this.setLayerTransparency(_ab7.uid,"#",_ab7.transparency);
if(_ab7.colorMask){
var mask="transmask=#"+_ab7.colorMask.toString(16);
this.setLayerParameter(_ab7.uid,mask);
}
var _ace;
for(_ace in _ab7.colors){
if(_ab7.colors.hasOwnProperty(_ace)){
this.setLayerTransparency(_ab7.uid,_ace,_ab7.colors[_ace].percent/100);
}
}
break;
}
}
}
_ab7.nMapLoadState=SIX.eMapLoadState.LOADED;
var _acf=this.getBottomMap();
var _ad0=_acf.getGISOverlayMapsLoadStats(true);
var _ad1=Math.round(100*_ad0.nNumGISOverlayMapsLoaded/_ad0.nNumGISOverlayMapsRequested);
if(_acf.tGISOverlayProgress!=null){
clearTimeout(_acf.tGISOverlayProgress);
}
_acf.tGISOverlayProgress=setTimeout(""+_acf.myself+".setGISOverlayProgress("+_ad1+")",500);
}
}
break;
}
}
};
SIX.Map.prototype.getGISOverlayMapsLoadStats=function(_ad2){
var _ad3=new Object();
_ad3.nNumGISOverlayMapsLoaded=0;
_ad3.nNumGISOverlayMapsLoading=0;
_ad3.nNumGISOverlayMapsErrorLoading=0;
_ad3.nNumGISOverlayMapsRequested=0;
for(var i=0;i<this.catalog.services.length;i++){
var svc=this.catalog.services[i];
if(!svc.bFeatureServer&&!svc.hidden){
if(svc.aServices.length){
for(var j=0;j<svc.aServices.length;j++){
if(svc.aServices[j].nMapLoadState==SIX.eMapLoadState.LOADED){
_ad3.nNumGISOverlayMapsLoaded++;
}
if(svc.aServices[j].nMapLoadState==SIX.eMapLoadState.LOADING){
_ad3.nNumGISOverlayMapsLoading++;
}
if(svc.aServices[j].nMapLoadState==SIX.eMapLoadState.LOAD_ERROR){
_ad3.nNumGISOverlayMapsErrorLoading++;
}
}
}else{
if(svc.nMapLoadState==SIX.eMapLoadState.LOADED){
_ad3.nNumGISOverlayMapsLoaded++;
}
if(svc.nMapLoadState==SIX.eMapLoadState.LOADING){
_ad3.nNumGISOverlayMapsLoading++;
}
if(svc.nMapLoadState==SIX.eMapLoadState.LOAD_ERROR){
_ad3.nNumGISOverlayMapsErrorLoading++;
}
}
}
}
if(this.childMap&&_ad2){
var _ad7=this.childMap.getGISOverlayMapsLoadStats(_ad2);
_ad3.nNumGISOverlayMapsLoaded+=_ad7.nNumGISOverlayMapsLoaded;
_ad3.nNumGISOverlayMapsLoading+=_ad7.nNumGISOverlayMapsLoading;
_ad3.nNumGISOverlayMapsErrorLoading+=_ad7.nNumGISOverlayMapsErrorLoading;
}
_ad3.nNumGISOverlayMapsRequested=_ad3.nNumGISOverlayMapsLoaded+_ad3.nNumGISOverlayMapsLoading+_ad3.nNumGISOverlayMapsErrorLoading;
return _ad3;
};
SIX.Map.prototype.resetGISOverlayMapsLoadState=function(){
for(var i=0;i<this.catalog.services.length;i++){
var svc=this.catalog.services[i];
if(!svc.bFeatureServer&&!svc.hidden){
if(svc.aServices.length){
for(var j=0;j<svc.aServices.length;j++){
svc.aServices[j].nMapLoadState=SIX.eMapLoadState.NOT_LOADED;
}
}else{
svc.nMapLoadState=SIX.eMapLoadState.NOT_LOADED;
}
}
}
};
SIX.Map.prototype.onPercentComplete=function(_adb){
if(this.nECWProgressPercent!=_adb){
if(!this.parentMap&&!this.bLoading){
this.setECWProgress(_adb);
}
}
};
SIX.Map.prototype.init=function(){
var txt="";
var _add=new Array();
_add[0]=this.uid;
_add[1]="100%";
_add[2]="100%";
_add[3]=PARAM_VIEW_ONMOUSEDOWN;
_add[4]=SIX.App.bDHTMLControl?"onMouseDownHook()":this.myself+".onMouseDown()";
_add[5]=PARAM_VIEW_ONMOUSEMOVE;
_add[6]=SIX.App.bDHTMLControl?"onMouseMoveHook()":this.myself+".onMouseMove()";
_add[7]=PARAM_VIEW_ONMOUSEUP;
_add[8]=SIX.App.bDHTMLControl?"onMouseUpHook()":this.myself+".onMouseUp()";
_add[9]=PARAM_VIEW_ONEXTENTCHANGE;
_add[10]=SIX.App.bDHTMLControl?"onExtentChangeHook()":this.myself+".onExtentChange()";
_add[11]=PARAM_VIEW_ONLAYERRESPONSE;
_add[12]=SIX.App.bDHTMLControl?"onLayerResponseHook()":this.myself+".onLayerResponse()";
_add[13]=PARAM_VIEW_ONPERCENTCOMPLETE;
_add[14]=SIX.App.bDHTMLControl?"onPercentCompleteHook()":this.myself+".onPercentComplete()";
_add[15]=PARAM_VIEW_ONERROR;
_add[16]=SIX.App.bDHTMLControl?"onErrorHook()":this.myself+".onError()";
var txt="";
if(this.parentMap){
var _ade="";
if(this.opacity<1){
var _adf=this.opacity;
_adf=_adf>0.99?0.99:_adf;
_adf=_adf<0?0:_adf;
_ade=";opacity:"+_adf+";filter:alpha(opacity="+_adf*100+")";
}
txt+="<div style='background-color:"+this.sBackgroundColor+";position:absolute;left:0px;top:0px;width:100%;height:100%"+_ade+"' id='"+this.mapDivUid+"'>";
}
txt+=NCSCreateViewReturnString(_add);
if(this.parentMap){
txt+="</div>";
}
txt+="<div id='"+this.editLayerName+"' style='position:absolute;left:0px;top:0px;width:1px;height:1px;display:none;visibility:hidden;background-color:#00ff00;filter:alpha(opacity=30);-moz-opacity:.30;opacity:.30;border:1px red solid'> </div>";
txt+="<div class='featureLayerContainer'>";
txt+="<div id='"+this.featureLayerUid+"' class='featureLayer'> </div>";
txt+="</div>";
txt+="<div id='"+this.savedMapsBackgroundUid+"' class='savedMapsBackground'> </div>"+"<div id='"+this.savedMapsContainerUid+"' class='savedMapsContainer'>"+"<div id='"+this.savedMapsTitleBarUid+"' class='savedMapsTitleBar'> </div>"+"<div id='"+this.savedMapsUid+"' class='savedMaps'> </div>"+"</div>";
txt+="<div class='featureLayerContainer'>";
txt+="<div id='"+this.markerFormContainerUid+"' class='markerFormContainer'>"+"<form class='markerForm' id='"+this.markerFormUid+"' name='"+this.markerFormUid+"' onsubmit='"+this.myself+".onSubmitMarkerForm();return false;'>"+"<img  class='markerFormSymbol' alt='Click to change marker symbol' title='Click to change marker symbol' id='"+this.markerFormSymbolUid+"' "+SIX.App.imageSrc("images/pin1")+" onclick='"+this.myself+".showMarkerSymbols()' border='0'>"+"<div class='markerFormRow'><span>Name:</span>&nbsp;&nbsp;<input type='text' name='Name'>"+"</div>"+"<div class='markerFormRow'><span>Description:</span></div>"+"<div class='markerFormRow'>"+"<div class='markerFormDescription' id='"+this.markerFormDescriptionUid+"'>"+"<div class='richTextArea' id='"+this.markerFormDescriptionRichTextUid+"'> &nbsp; </div>"+"<textarea wrap='hard' name='Description' class='richTextArea' rows='1'"+" onkeypress='"+this.myself+".onChangeMarkerFormDescription()'"+" onkeyup='"+this.myself+".onChangeMarkerFormDescription()'"+" onchange='"+this.myself+".onChangeMarkerFormDescription()'"+"></textarea>"+"</div>"+"</div>"+"<div class='markerFormRow'>"+"<div class='markerFormOK'><input class='markerFormButton' type='button' value='OK' onclick='"+this.myself+".onSubmitMarkerForm();'></div>"+"<div class='markerFormCancel'><input class='markerFormButton' type='button' value='Delete' onclick='"+this.myself+".onCancelMarkerForm();'></div>"+"</div>"+"</form>"+"<div id='"+this.markerSymbolsContainerUid+"' class='markerSymbolsContainer'>"+"<img class='markerSymbolsCloseButton' "+SIX.App.imageSrc("images/close")+" border='0' onclick='"+this.myself+".hideMarkerSymbols();'>"+"<div id='"+this.markerSymbolsUid+"' class='markerSymbols'> </div>"+"</div>"+"</div>"+"</div>";
txt+="<div id='"+this.saveMapFormContainerUid+"' class='saveMapFormContainer'>"+"<form class='saveMapForm' id='"+this.saveMapFormUid+"' name='"+this.saveMapFormUid+"' onsubmit='"+this.myself+".onSubmitSaveMapForm();return false;'>"+"<div class='saveMapFormTitleRow'>Save Map</div>"+"<div class='saveMapFormRow'><span>Name:</span>&nbsp;&nbsp;<input type='text' name='Name'></div>"+"<div class='saveMapFormRow'><span>Description:</span></div>"+"<div class='saveMapFormRow'>"+"<div class='saveMapFormDescription' id='"+this.saveMapFormDescriptionUid+"'>"+"<div class='richTextArea' id='"+this.saveMapFormDescriptionRichTextUid+"'> &nbsp; </div>"+"<textarea wrap='hard' name='Description' class='richTextArea' rows='1'"+" onkeypress='"+this.myself+".onChangeSaveMapFormDescription()'"+" onkeyup='"+this.myself+".onChangeSaveMapFormDescription()'"+" onchange='"+this.myself+".onChangeSaveMapFormDescription()'"+"></textarea>"+"</div>"+"</div>"+"<div class='saveMapFormRow'><span>Extents:</span>"+"<select name='Extents'>"+"<option value='VIEW' selected>Current view"+"<option value='MARKERS'>Marker collection"+"</select>"+"</div>"+"<div class='saveMapFormRow'>"+"<div class='saveMapFormOK'><input class='saveMapFormButton' type='button' value='OK' onclick='"+this.myself+".onSubmitSaveMapForm();'></div>"+"<div class='saveMapFormCancel'><input class='saveMapFormButton' type='button' value='Cancel' onclick='"+this.myself+".onCancelSaveMapForm();'></div>"+"</div>"+"</form>"+"</div>";
if(!this.childMap){
txt+="<div id='"+this.containerUid+"'>";
txt+="<div class='crosshairsContainer' id='"+this.crosshairsUid+"'>"+"<div class='verticalCrosshairBackground'></div>"+"<div class='horizontalCrosshairBackground'></div>"+"<div class='verticalCrosshairForeground'></div>"+"<div class='horizontalCrosshairForeground'></div>"+"</div>";
for(var i=0;i<this.aAttachedItems.length;i++){
var item=this.aAttachedItems[i];
if(item.init){
txt+=item.init();
}
}
for(var i=0;i<SIX.App.channels.length;i++){
txt+=SIX.App.channels[i].initMapItems(this);
}
if(this.parentMap){
for(var i=0;i<this.parentMap.aAttachedItems.length;i++){
var item=this.parentMap.aAttachedItems[i];
if(item.init){
txt+=item.init();
}
}
for(var i=0;i<SIX.App.channels.length;i++){
txt+=SIX.App.channels[i].initMapItems(this.parentMap);
}
}
txt+="</div>";
}
return txt;
};
function getCallbackMap(_ae2){
var _ae3;
if(SIX.App!=null){
for(var i=0;i<SIX.App.channels[SIX.App.nCurrentChannel].maps.length;i++){
var map=SIX.App.channels[SIX.App.nCurrentChannel].maps[i];
var _ae6=document[map.uid];
if(_ae6.nViewID==_ae2.nViewID){
_ae3=map;
break;
}
}
}
return _ae3;
};
function onMouseDownHook(mask,_ae8,_ae9,_aea,_aeb){
var map=getCallbackMap(this);
if(map){
map.onMouseDown(mask,_ae8,_ae9,_aea,_aeb);
}
};
function onMouseMoveHook(mask,_aee,_aef,_af0,_af1){
var map=getCallbackMap(this);
if(map){
map.onMouseMove(mask,_aee,_aef,_af0,_af1);
}
};
function onMouseUpHook(mask,_af4,_af5,_af6,_af7){
var map=getCallbackMap(this);
if(map){
map.onMouseUp(mask,_af4,_af5,_af6,_af7);
}
};
function onExtentChangeHook(tlx,tly,brx,bry){
var map=getCallbackMap(this);
if(map){
map.onExtentChange(tlx,tly,brx,bry);
}
};
function onLayerResponseHook(_afe,url,body,_b01,tlx,tly,brx,bry,_b06){
var map=getCallbackMap(this);
if(map){
map.onLayerResponse(_afe,url,body,_b01,tlx,tly,brx,bry,_b06);
}
};
function onPercentCompleteHook(_b08){
var map=getCallbackMap(this);
if(map){
map.onPercentComplete(_b08);
}
};
function onErrorHook(_b0a,num,code,desc){
var map=getCallbackMap(this);
if(map){
map.onError(_b0a,num,code,desc);
}
};
SIX.eToolCallbacks={ONACTIVATE:1,ONDEACTIVATE:2,ONENABLE:3,ONDISABLE:4,ONMAPMOUSEDOWN:5,ONMAPMOUSEUP:6,ONMAPMOUSEMOVE:7,ONMAPEXTENTCHANGE:8,ONMAPLOAD:9};
SIX.ToolGroup=function(_b0f){
this.bToolsVisibleByDefault=true;
this.aTools=new Array();
};
SIX.ToolGroup.prototype.init=function(){
var _b10="";
for(var i=0;i<this.aTools.length;i++){
_b10+=this.aTools[i].init();
}
return _b10;
};
SIX.ToolGroup.prototype.addTool=function(tool){
this.aTools[this.aTools.length]=tool;
return tool;
};
SIX.ToolGroup.prototype.removeTool=function(tool){
for(var i=0;i<this.aTools.length;i++){
if(this.aTools[i]==tool){
this.aTools.splice(i,1);
break;
}
}
};
SIX.ToolGroup.prototype.clearActiveTools=function(_b15){
var _b16=arguments.length>=1;
for(var i=0;i<this.aTools.length;i++){
var tool=this.aTools[i];
if(tool.bActive&&(!_b16||(tool.nType==_b15))){
tool.deactivate();
}
}
};
SIX.ToolGroup.prototype.executeCallbacks=function(_b19){
for(var i=0;i<this.aTools.length;i++){
var tool=this.aTools[i];
if(tool.bActive){
tool.executeCallbacks.apply(tool,arguments);
}
}
};
SIX.ToolGroup.prototype.setToolsVisibleByDefault=function(_b1c){
this.bToolsVisibleByDefault=_b1c;
};
SIX.Callback=function(_b1d,_b1e,data){
this.object=_b1d;
this.method=_b1e;
this.data=data;
};
SIX.Callback.prototype.execute=function(){
var _b20=Array.prototype.slice.call(arguments);
_b20[_b20.length]=this.data;
this.method.apply(this.object,_b20);
};
SIX.CallbackManager=function(){
this.aCallbacks=new Array();
};
SIX.CallbackManager.prototype.addCallback=function(_b21){
this.aCallbacks[this.aCallbacks.length]=_b21;
};
SIX.CallbackManager.prototype.removeCallback=function(_b22){
for(var i=0;i<this.aCallbacks.length;i++){
if(this.aCallback[i]==_b22){
this.aCallbacks.splice(i,1);
break;
}
}
};
SIX.CallbackManager.prototype.executeCallbacks=function(){
for(var i=0;i<this.aCallbacks.length;i++){
var _b25=this.aCallbacks[i];
_b25.execute.apply(_b25,arguments);
}
};
SIX.Tool=function(_b26,_b27,_b28,_b29,_b2a){
if(arguments.length<5){
var _b2a=null;
}
SIX.addRef(this);
var _b2b=_b26 instanceof SIX.Toolbar?_b26.toolGroup:_b26;
this.containerUid=SIX.Uid.getUid("toolContainer");
this.uid=SIX.Uid.getUid("tool");
this.toolGroup=_b2b;
this.nType=_b27;
this.sImage=_b28;
this.imageOff=new Image();
this.imageOff.src=((_b28!="")?SIX.App.imageUrl("images/"+_b28):"");
this.imageOn=new Image();
this.imageOn.src=((_b28!="")?SIX.App.imageUrl("images/"+_b28+"_on"):"");
this.bEnabled=SIX.Util.getParameter(_b2a,"enabled",true);
this.bVisible=SIX.Util.getParameter(_b2a,"visible",this.toolGroup.bToolsVisibleByDefault);
this.bActive=false;
if(this.bEnabled&&this.bVisible&&this.nType!=SIX.eToolTypes.NONE){
this.bActive=SIX.Util.getParameter(_b2a,"active",false);
}
this.imageDisabled=null;
if(!this.bEnabled){
this.imageDisabled=new Image();
this.imageDisabled.src=((_b28!="")?SIX.App.imageUrl("images/"+_b28+"_disabled"):"");
}
this.sToolTip=_b29;
this.sActivationPrompt="";
this.sClass="tool";
this.hCallbackManagers=new SIX.Hash();
};
SIX.Tool.prototype.executeCallbacks=function(_b2c){
if(this.hCallbackManagers.hasItem(_b2c)){
var _b2d=this.hCallbackManagers.getItem(_b2c);
var _b2e=arguments.length>1?Array.prototype.slice.call(arguments,1,arguments.length):new Array();
_b2d.executeCallbacks.apply(_b2d,_b2e);
}
};
SIX.Tool.prototype.addCallback=function(_b2f,_b30,data){
var _b32=this.hCallbackManagers.hasItem(_b2f)?this.hCallbackManagers.getItem(_b2f):new SIX.CallbackManager();
_b32.addCallback(new SIX.Callback(this,_b30,(arguments.length>=3?data:null)));
this.hCallbackManagers.setItem(_b2f,_b32);
};
SIX.Tool.prototype.setVisible=function(_b33){
this.bVisible=_b33;
var _b34=document.getElementById(this.containerUid);
if(_b34){
_b34.style.display=_b33?"block":"none";
}
};
SIX.Tool.prototype.setEnabled=function(_b35){
this.bEnabled=_b35;
if(!this.imageDisabled&&!this.bEnabled){
this.imageDisabled=new Image();
this.imageDisabled.src=((this.sImage!="")?SIX.App.imageUrl("images/"+this.sImage+"_disabled"):"");
}
var _b36=document.getElementById(this.uid);
if(_b36){
_b36.src=(this.bEnabled?this.imageOff.src:this.imageDisabled.src);
_b36.alt=_b36.title=this.sToolTip;
this.imageOn.alt=this.imageOn.title=this.sToolTip;
}
};
SIX.Tool.prototype.onClick=function(){
if(!this.bEnabled){
return;
}
this.activate();
};
SIX.Tool.prototype.deactivate=function(){
this.bActive=false;
this.setActiveImage(false);
var map=this._rMap;
this._rMap=null;
this.executeCallbacks(SIX.eToolCallbacks.ONDEACTIVATE,map);
};
SIX.Tool.prototype.activate=function(){
if(this.sActivationPrompt!=""&&!confirm(this.sActivationPrompt)){
return;
}
var _b38=SIX.App.getCurrentChannel();
var map=_b38.getFocusedMap();
switch(this.nType){
case SIX.eToolTypes.EXCLUSIVE:
if(this.bActive){
this.bActive=false;
this.setActiveImage(false);
this.deactivate();
map.setPointerMode(PM_POINTER);
}else{
for(var i=0;i<_b38.toolGroups.length;i++){
if(this.toolGroup!=_b38.toolGroups[i]){
_b38.toolGroups[i].clearActiveTools(SIX.eToolTypes.EXCLUSIVE);
}
}
this.bActive=true;
this.setActiveImage(true);
for(var i=0;i<this.toolGroup.aTools.length;i++){
var _b3b=this.toolGroup.aTools[i];
if(_b3b!=this&&_b3b.nType==SIX.eToolTypes.EXCLUSIVE&&_b3b.bActive){
_b3b.deactivate();
}
}
this._rMap=map;
this.executeCallbacks(SIX.eToolCallbacks.ONACTIVATE,map);
}
break;
case SIX.eToolTypes.TOGGLE:
this.bActive=!this.bActive;
this.setActiveImage(this.bActive);
if(this.bActive){
this._rMap=map;
this.executeCallbacks(SIX.eToolCallbacks.ONACTIVATE,map);
}else{
this.deactivate();
}
break;
case SIX.eToolTypes.NONE:
this.executeCallbacks(SIX.eToolCallbacks.ONACTIVATE,map);
break;
default:
break;
}
};
SIX.Tool.prototype.setActiveImage=function(_b3c){
var _b3d=document.getElementById(this.uid);
if(_b3d){
if(this.bEnabled){
_b3d.src=(_b3c?this.imageOn.src:this.imageOff.src);
}else{
_b3d.src=this.imageDisabled.src;
}
}
};
SIX.Tool.prototype.setImage=function(_b3e){
this.sImage=_b3e;
this.imageOff.src=((_b3e!="")?SIX.App.imageUrl("images/"+_b3e):"");
this.imageOn.src=((_b3e!="")?SIX.App.imageUrl("images/"+_b3e+"_on"):"");
this.imageDisabled=null;
if(!this.bEnabled){
this.imageDisabled=new Image();
this.imageDisabled.src=((_b3e!="")?SIX.App.imageUrl("images/"+_b3e+"_disabled"):"");
}
var _b3f=document.getElementById(this.uid);
if(_b3f){
if(this.bEnabled){
_b3f.src=this.bActive?this.imageOn.src:this.imageOff.src;
}else{
_b3f.src=this.imageDisabled.src;
}
}
};
SIX.Tool.prototype.setActivationPrompt=function(_b40){
this.sActivationPrompt=_b40;
};
SIX.Tool.prototype.setToolTip=function(_b41){
this.sToolTip=_b41;
var _b42=document.getElementById(this.uid);
if(_b42){
_b42.alt=_b42.title=_b41;
}
};
SIX.Tool.prototype.onMouseOver=function(){
if(this.bEnabled){
this.setActiveImage(true);
}
};
SIX.Tool.prototype.onMouseOut=function(){
if(!this.bActive&&this.bEnabled){
this.setActiveImage(false);
}
};
SIX.Tool.prototype.initElement=function(){
var elem=document.createElement("div");
elem.setAttribute("id",this.containerUid);
elem.setAttribute("class",this.sClass);
elem.setAttribute("className",this.sClass);
if(!this.bVisible){
elem.style.display="none";
}
elem.innerHTML=this._initContents();
return elem;
};
SIX.Tool.prototype.init=function(){
var _b44="<div id='"+this.containerUid+"' class='"+this.sClass+"' "+(this.bVisible?"":"style='display:none'")+">"+this._initContents()+"</div>";
return _b44;
};
SIX.Tool.prototype._initContents=function(){
var _b45="<img id='"+this.uid+"' src='"+(this.bEnabled?this.imageOff.src:this.imageDisabled.src)+"' border='0' title='"+this.sToolTip+"' alt='"+this.sToolTip+"'"+" onclick='"+this.myself+".onClick()' onmouseover='"+this.myself+".onMouseOver()' onmouseout='"+this.myself+".onMouseOut()'/>";
return _b45;
};
SIX.Tool.prototype.setClass=function(_b46){
this.sClass=_b46;
};
SIX.Tool.prototype.attachService=function(_b47){
var _b48=_b47.catalog.channel;
_b48.attachServiceToTool(this,_b47);
};
SIX.Tool.prototype.getAttachedServices=function(){
var _b49=SIX.App.getCurrentChannel();
var _b4a=_b49.getServicesAttachedToTool(this);
return _b4a;
};
SIX.Map.prototype.build=function(){
var _b4b=document[this.uid];
if(_b4b){
if(this.sBackgroundColor!=""&&this.sBackgroundColor.toLowerCase()!="tranparent"){
_b4b.SetBackGroundColor(this.sBackgroundColor);
}
if(SIX.App.bDHTMLControl&&SIXConfig.ECWP_SERVER_ALIASES.length){
_b4b.SetEcwServerAliases(SIXConfig.ECWP_SERVER,SIXConfig.ECWP_SERVER_ALIASES);
}
}
var _b4c=this.childMap;
while(_b4c){
var _b4d=document[_b4c.uid];
if(_b4d&&_b4c.sBackgroundColor!=""&&_b4c.sBackgroundColor.toLowerCase()!="tranparent"){
_b4d.SetBackGroundColor(_b4c.sBackgroundColor);
}
_b4c=_b4c.childMap;
}
return null;
};
SIX.Map.prototype.update=function(){
if(!this.catalog){
return;
}
var _b4e=document[this.uid];
for(var i=0;i<this.catalog.services.length;i++){
var _b50=this.catalog.services[i];
if((this.loaded&&(this.hiddenLayers(_b50)||(_b50.loaded==false)))||(_b50.access instanceof SIX.Access.ECWP)){
_b50.updateMap(this);
}
}
if(!this.editLayer){
if(this.addLayer("SIMPLEVECTOR","",this.editLayerName,"visibility=true;color=#ff0000;fillcolor=#00FF00;linewidth=1")>=0){
this.editLayer=true;
this.setLayerTransparency(this.editLayerName,"#00ff00",0.3);
}
}
};
SIX.Map.prototype.attach=function(item,_b52){
if(item.constructor==SIX.Status){
this.status=item;
item.map=this;
}else{
if(item.constructor==SIX.Map){
this.childMap=item;
item.parentMap=this;
}else{
if(_b52){
_b52.addMapItem(this,item);
}else{
this.aAttachedItems[this.aAttachedItems.length]=item;
}
}
}
};
SIX.Map.prototype.setDefaultECWJP2Url=function(sUrl){
this.sDefaultECWJP2Url=sUrl;
};
SIX.Map.prototype.setDefaultECWJP2CoordSys=function(_b54,_b55){
if(this.coordSysDefaultECWJP2){
this.coordSysDefaultECWJP2.setDatum(_b54);
this.coordSysDefaultECWJP2.setProjection(_b55);
}else{
this.coordSysDefaultECWJP2=new SIX.CoordSys(_b54,_b55);
}
};
SIX.Map.prototype.setMaxOverlayExtents=function(_b56,_b57,_b58,_b59){
this.tlMaxOverlayLat=_b56;
this.tlMaxOverlayLon=_b57;
this.brMaxOverlayLat=_b58;
this.brMaxOverlayLon=_b59;
};
SIX.Map.prototype.setMaxDisplayBestExtents=function(_b5a,_b5b,_b5c,_b5d){
this.tlMaxDisplayBestLat=_b5a;
this.tlMaxDisplayBestLon=_b5b;
this.brMaxDisplayBestLat=_b5c;
this.brMaxDisplayBestLon=_b5d;
};
SIX.Map.prototype.setMaxExtents=function(_b5e,_b5f,_b60,_b61){
this.tlMaxLat=_b5e;
this.tlMaxLon=_b5f;
this.brMaxLat=_b60;
this.brMaxLon=_b61;
this.bMaxWorldExtentsUpdated=false;
};
SIX.Map.prototype.setInitialExtents=function(_b62,_b63,_b64,_b65){
this.dInitialTopLeftLat=_b62;
this.dInitialTopLeftLon=_b63;
this.dInitialBottomRightLat=_b64;
this.dInitialBottomRightLon=_b65;
};
SIX.Map.prototype.setExtents=function(tly,tlx,bry,brx,_b6a,proj){
if(isNaN(tlx)||isNaN(tly)||isNaN(brx)||isNaN(bry)){
return;
}
if(tlx==brx||tly==bry){
return;
}
var _b6c=document[this.uid];
var _b6d=this.datum();
var _b6e=this.projection();
var _b6f=(_b6a?_b6a:"");
var _b70=(proj?proj:"");
var _b71=this.isGeodetic();
var _b72=true;
if(tly>180||tlx>360){
_b72=false;
}
var _b73=[[tlx,tly],[brx,bry]];
if(_b6f!=""&&_b70!=""&&(_b6f!=_b6d||_b70!=_b6e)){
_b73=this.convertCoords(_b6f,_b70,[[tlx,tly],[brx,bry]],_b6d,_b6e);
}else{
if(_b71&&!_b72){
_b73=this.convertCoords(_b6d,_b6e,[[tlx,tly],[brx,bry]],_b6d,"geodetic");
}else{
if(!_b71&&_b72){
_b73=this.convertCoords(_b6d,"geodetic",[[tlx,tly],[brx,bry]],_b6d,_b6e);
}
}
}
if(!_b73||!_b73[0]||!_b73[1]||((_b73[0][0]==_b73[1][0])&&(_b73[0][1]==_b73[1][1]))){
return;
}
_b6c.SetExtents(_b73[0][0],_b73[0][1],_b73[1][0],_b73[1][1]);
};
SIX.Map.prototype.setLayerExtents=function(_b74){
var _b75=document[this.uid];
var _b76=_b75.GetLayerImageTopLeftWorldCoordinateX(_b74.uid);
var _b77=_b75.GetLayerImageTopLeftWorldCoordinateY(_b74.uid);
var _b78=_b75.GetLayerImageBottomRightWorldCoordinateX(_b74.uid);
var _b79=_b75.GetLayerImageBottomRightWorldCoordinateY(_b74.uid);
if(this.projection()=="GEODETIC"){
_b74.setExtents(_b77,_b76,_b79,_b78);
}else{
var _b7a=[[_b76,_b77],[_b76,_b79],[_b78,_b79],[_b78,_b77]];
var _b7b=this.convertCoords(this.datum(),this.projection(),_b7a,this.datum(),"GEODETIC");
if(_b7b){
var _b7c=_b7b[0][1];
var _b7d=_b7b[0][0];
var _b7e=_b7b[1][1];
var _b7f=_b7b[1][0];
var _b80=_b7b[2][1];
var _b81=_b7b[2][0];
var _b82=_b7b[3][1];
var _b83=_b7b[3][0];
var _b84=[_b7c,_b7e,_b80,_b82];
var _b85=[_b7d,_b7f,_b81,_b83];
_b84.sort(function(x,y){
return x-y;
});
_b85.sort(function(x,y){
return x-y;
});
dLayerTopLeftLat=_b84[_b84.length-1];
dLayerTopLeftLon=_b85[0];
dLayerBottomRightLat=_b84[0];
dLayerBottomRightLon=_b85[_b85.length-1];
_b74.setExtents(dLayerTopLeftLat,dLayerTopLeftLon,dLayerBottomRightLat,dLayerBottomRightLon);
}
}
};
SIX.Map.prototype.isGeodetic=function(){
var _b8a=false;
var _b8b=document[this.uid];
var _b8c=_b8b.GetLayerName(0);
var _b8d=_b8b.GetLayerProjection(_b8c);
if(_b8d.indexOf("GEODETIC")>=0){
_b8a=true;
}
return _b8a;
};
SIX.Map.prototype.getTopEcw=function(){
var _b8e=document[this.uid];
var _b8f="";
var _b90=_b8e.GetNumberLayers();
for(var i=_b90-1;i>=0;i--){
var _b92=_b8e.GetLayerName(i);
var _b93=_b8e.GetLayerFileName(_b92);
if(_b93.indexOf(".ecw")>=0||_b93.indexOf(".jp2")>=0){
var _b94=this.getLayerParameter(_b92,"visibility");
_b94=_b94.toUpperCase();
if(_b94=="TRUE"){
_b8e.SetLayerClip(_b92,false);
_b8f=_b92;
break;
}
}
}
return _b8f;
};
SIX.Map.prototype.getTopEcwFileName=function(){
var _b95=document[this.uid];
var _b96="";
var _b97=this.getTopEcw();
if(_b97!=""){
_b96=_b95.GetLayerFileName(_b97);
}
return _b96;
};
SIX.Map.prototype.clearForwardHistory=function(){
this.aHistory.length=this.nHistoryIndex+1;
};
SIX.Map.prototype.moveBackHistory=function(){
if(this.nHistoryIndex==0){
alert("There is no backwards history");
return;
}
if(this.nHistoryIndex>0){
this.bHistoryMove=true;
this.nOldHistoryIndex=this.nHistoryIndex;
this.nHistoryIndex--;
var _b98=this.aHistory[this.nHistoryIndex];
this.setExtents(_b98[0],_b98[1],_b98[2],_b98[3]);
}
};
SIX.Map.prototype.moveForwardHistory=function(){
if(this.nHistoryIndex<(this.aHistory.length-1)){
this.bHistoryMove=true;
this.nOldHistoryIndex=this.nHistoryIndex;
this.nHistoryIndex++;
var _b99=this.aHistory[this.nHistoryIndex];
this.setExtents(_b99[0],_b99[1],_b99[2],_b99[3]);
}else{
alert("There is no forward history");
}
};
SIX.Map.prototype.setCenter=function(_b9a,_b9b){
var tlx=_b9b;
var tly=_b9a;
if(tly>90||tly<-90||tlx>180||tlx<-180){
var _b9e=this.getGeoPoint(tlx,tly);
tlx=_b9e[0];
tly=_b9e[1];
}
var _b9f=parseFloat((this.getTopLeftLatitude()-this.getBottomRightLatitude())/2);
var _ba0=parseFloat((this.getTopLeftLongitude()-this.getBottomRightLongitude())/2);
this.setExtents((parseFloat(tly)+_b9f),(parseFloat(tlx)+_ba0),(tly-_b9f),(tlx-_ba0));
};
SIX.Map.prototype.setCenterCoord=function(_ba1,_ba2,_ba3,_ba4){
var _ba5=document[this.uid];
var _ba6=_ba5.GetTopLeftWorldCoordinateX();
var _ba7=_ba5.GetTopLeftWorldCoordinateY();
var _ba8=_ba5.GetBottomRightWorldCoordinateX();
var _ba9=_ba5.GetBottomRightWorldCoordinateY();
var _baa=(_ba8-_ba6)/2;
var _bab=(_ba9-_ba7)/2;
var _bac=_ba1;
var _bad=_ba2;
var _bae=this.projection();
if(_ba4!=_bae){
if(_ba4!="GEODETIC"){
var _baf=this.getGeoPoint(_ba1,_ba2,_ba3,_ba4);
_bac=parseFloat(_baf[0]);
_bad=parseFloat(_baf[1]);
}
if(_bae!="GEODETIC"){
var _baf=this.getENPoint(_bac,_bad,_ba3,_bae);
_bac=parseFloat(_baf[0]);
_bad=parseFloat(_baf[1]);
}
}
this.setExtents(_bad-_bab,_bac-_baa,_bad+_bab,_bac+_baa);
};
SIX.Map.prototype.promptCenterCoord=function(tool){
var _bb1=SIX.App.getCurrentChannel();
var _bb2="<form name='PromptCenterCoordForm' >";
_bb2+="<strong>Enter coordinates to pan to:</strong><br><br>";
_bb2+="<strong><span style='width:80px;text-align:right;' id='CenterCoordXLabel'>Lon (dd/dms):</span>&nbsp;&nbsp;</strong><input type='text' name='CenterCoordX'><br>";
_bb2+="<strong><span style='width:80px;text-align:right;' id='CenterCoordYLabel'>Lat (dd/dms):</span>&nbsp;&nbsp;</strong><input type='text' name='CenterCoordY'><br><br>";
_bb2+="<div class='popupRow'>";
_bb2+="<select class='popupElement' style='float:none' name='CenterCoordType' id='CenterCoordType'"+" onChange='javascript:document.getElementById(\"CenterCoordXLabel\").innerHTML = ((this[this.selectedIndex].value == \"GEODETIC\") ? \"Lon (dd/dms):\" : \"Eastings:\");"+"document.getElementById(\"CenterCoordYLabel\").innerHTML = ((this[this.selectedIndex].value == \"GEODETIC\") ? \"Lat (dd/dms):\" : \"Northings:\");'>"+"<option value='GEODETIC' selected>Geodetic (DD or DMS)"+"<option value='NSWLAM94'>LAMBERT"+"<option value='MGA54'>MGA54"+"<option value='MGA55'>MGA55"+"<option value='MGA56'>MGA56"+"</select><br><br>";
_bb2+="</div>";
_bb2+="<input type='button' value='Go' onclick='";
_bb2+=this.myself+".promptCenterCoordSubmit();'><br>";
_bb2+="</form>";
SIX.App.popupWinPanToCenter.offsetX=10;
SIX.App.popupWinPanToCenter.offsetY=10;
SIX.App.popupWinPanToCenter.autoHide();
SIX.App.hideToolbarPopups();
SIX.App.popupWinPanToCenter.populate(_bb2);
SIX.App.popupWinPanToCenter.showPopup(tool.containerUid);
SIX.App.popupWinPanToCenter.setOnHideCallback(function(){
if(tool.bActive){
tool.deactivate();
}
SIX.App.popupWinPanToCenter.clearOnHideCallback();
},tool.containerUid);
};
SIX.Map.prototype.promptCenterCoordSubmit=function(){
var _bb3=self;
if(_bb3.document.PromptCenterCoordForm&&_bb3.document.PromptCenterCoordForm.CenterCoordX&&_bb3.document.PromptCenterCoordForm.CenterCoordY){
if((_bb3.document.PromptCenterCoordForm.CenterCoordX.value!="")&&(_bb3.document.PromptCenterCoordForm.CenterCoordY.value!="")){
var _bb4=0;
var _bb5=0;
var _bb6=this.datum();
var _bb7=_bb3.document.PromptCenterCoordForm.CenterCoordType[_bb3.document.PromptCenterCoordForm.CenterCoordType.selectedIndex].value;
if(_bb7=="GEODETIC"){
_bb4=SIX.Util.stringToDegrees(_bb3.document.PromptCenterCoordForm.CenterCoordX.value);
_bb5=SIX.Util.stringToDegrees(_bb3.document.PromptCenterCoordForm.CenterCoordY.value);
if(_bb5>0){
_bb5*=-1;
}
}else{
_bb4=parseFloat(_bb3.document.PromptCenterCoordForm.CenterCoordX.value);
_bb5=parseFloat(_bb3.document.PromptCenterCoordForm.CenterCoordY.value);
}
this.setCenterCoord(_bb4,_bb5,_bb6,_bb7);
}else{
alert("Invalid coordinates specified");
}
}
};
SIX.Map.prototype.promptQueryZonesParams=function(tool){
var map=this;
var _bba=(this.sQueryZonesDistanceDisplayUnits=="m"?1:0.001);
var _bbb=this.dQueryZonesEndDistance*_bba;
var _bbc=this.dQueryZonesIntervalDistance*_bba;
var _bbd="<form name='PromptQueryZonesForm'>"+"<div class='popupRow'>Enter hot spot parameters:</div>"+"<div class='popupRow'>"+"<span class='popupLabel'>End distance:</span>"+"<input name='QueryZonesEndDistance' type='text' value='"+_bbb+"' class='popupInputTextElement'>"+"</div>"+"<div class='popupRow'>"+"<span class='popupLabel'>Interval distance:</span>"+"<input name='QueryZonesIntervalDistance' type='text' value='"+_bbc+"' class='popupInputTextElement'>"+"</div>"+"<div class='popupRow'>"+"<span class='popupLabel'>Units:</span>"+"<select name='QueryZonesUnits' class='popupElement'>"+"<option value='m' "+(this.sQueryZonesDistanceDisplayUnits=="m"?"selected":"")+">METRES</option>"+"<option value='km' "+(this.sQueryZonesDistanceDisplayUnits=="km"?"selected":"")+">KILOMETRES</option>"+"</select>"+"</div>"+"<div class='popupRow'>Show hot spot zones on map"+"<input name='QueryZonesShowHideHotSpotZones' type='checkbox' border='0' "+(this.bQueryZonesVisible?"checked":"")+" onclick='"+this.myself+".toggleQueryZonesVisibility()'>"+"</div>"+"<div class='popupRow'>"+"NOTE: Hot Spot results will be approximate."+"</div>"+"<div class='popupRow'>"+"<input type='button' border='0' value='Submit' onclick='"+this.myself+".promptQueryZonesSubmit("+tool.myself+")'>"+"<input type='button' border='0' value='Close' onclick='SIX.App.popupWinQueryZones.hidePopup()'>"+"</div>"+"</form>";
SIX.App.popupWinQueryZones.offsetX=10;
SIX.App.popupWinQueryZones.offsetY=10;
SIX.App.popupWinQueryZones.autoHide();
SIX.App.hideToolbarPopups();
SIX.App.popupWinQueryZones.populate(_bbd);
SIX.App.popupWinQueryZones.showPopup(tool.uid);
};
SIX.Map.prototype.promptQueryZonesSubmit=function(tool){
var _bbf=self;
var _bc0=_bbf.document.PromptQueryZonesForm;
if(_bc0&&_bc0.QueryZonesUnits&&_bc0.QueryZonesEndDistance&&_bc0.QueryZonesIntervalDistance&&(_bc0.QueryZonesEndDistance.value!="")&&(_bc0.QueryZonesIntervalDistance.value!="")){
var _bc1=this.sQueryZonesDistanceDisplayUnits;
var _bc2=this.dQueryZonesEndDistance;
var _bc3=this.dQueryZonesIntervalDistance;
if(_bc0.QueryZonesUnits.selectedIndex>-1){
_bc1=_bc0.QueryZonesUnits[_bc0.QueryZonesUnits.selectedIndex].value;
}
var _bc4=(_bc1=="m"?1:0.001);
_bc2=parseFloat(_bc0.QueryZonesEndDistance.value)/_bc4;
_bc3=parseFloat(_bc0.QueryZonesIntervalDistance.value)/_bc4;
var _bc5="";
if((_bc2<=0)||(_bc3<=0)){
_bc5+="End distance and interval distance must be greater than zero.\n";
}else{
if(_bc2<_bc3){
_bc5+="End distance must be greater than or equal to interval distance.\n";
}else{
if((_bc2/_bc3)>this.nMaxQueryZones){
_bc5+="Number of zones must not be greater than "+this.nMaxQueryZones+".";
}
}
}
if(_bc5!=""){
alert(_bc5);
this.promptQueryZonesParams(tool);
return;
}
this.sQueryZonesDistanceDisplayUnits=_bc1;
this.dQueryZonesEndDistance=_bc2;
this.dQueryZonesIntervalDistance=_bc3;
var _bc6=Math.ceil(this.dQueryZonesEndDistance/this.dQueryZonesIntervalDistance);
var _bc7=SIX.Util.interpolateHexColorsArray(this.aQueryZonesBoundaryColors,_bc6);
this.resetQueryZonesLayers();
this.aQueryZones.length=0;
for(var i=0;i<_bc6;i++){
var _bc9=new Object();
_bc9.sBorderLayerName="QueryZoneBorder"+i;
_bc9.sFillLayerName="QueryZoneFill"+i;
_bc9.sColor=_bc7[i];
_bc9.dInnerRadius=i*this.dQueryZonesIntervalDistance;
if(i<(_bc6-1)){
_bc9.dOuterRadius=(i+1)*this.dQueryZonesIntervalDistance;
}else{
_bc9.dOuterRadius=this.dQueryZonesEndDistance;
}
_bc9.aOuterBoundaryResults=new Object();
this.aQueryZones[i]=_bc9;
}
var _bca=tool.getAttachedServices();
if(_bca.length){
var _bcb=_bca[0].queries;
if(_bcb){
_bcb.nCurrentQueryZone=0;
this.initializeQueryZoneSelector(_bcb);
}
}
this.initQuery(tool);
}
SIX.App.popupWinQueryZones.hidePopup();
};
SIX.Map.prototype.initializeQueryZoneSelector=function(_bcc){
var _bcd=document.getElementById(_bcc.zoneSelectUid);
if(_bcd){
if(_bcd.options){
_bcd.options.length=0;
}
if(this.aQueryZones.length<=1){
_bcd.style.visibility="hidden";
}else{
_bcd.style.visibility="visible";
for(var i=0;i<this.aQueryZones.length;i++){
var _bcf=new Option("Zone "+(i+1));
_bcf.style.color=this.aQueryZones[i].sColor;
_bcf.style.fontWeight="bold";
_bcd.options[i]=_bcf;
}
}
}
};
SIX.Map.prototype.resetQueryZonesLayers=function(){
var _bd0=document[this.uid];
for(var i=this.aQueryZones.length-1;i>=0;i--){
var _bd2=_bd0.GetLayerIndex(this.aQueryZones[i].sFillLayerName);
if(_bd2==-1){
_bd2=this.addLayer("SIMPLEVECTOR","",this.aQueryZones[i].sFillLayerName,"visibility="+(this.bQueryZonesVisible?"true":"false")+";color=;linewidth=1");
}else{
this.setLayerParameter(this.aQueryZones[i].sFillLayerName,"visibility="+(this.bQueryZonesVisible?"true":"false")+";ellipse1=");
}
}
for(var i=this.aQueryZones.length-1;i>=0;i--){
var _bd2=_bd0.GetLayerIndex(this.aQueryZones[i].sBorderLayerName);
if(_bd2==-1){
_bd2=this.addLayer("SIMPLEVECTOR","",this.aQueryZones[i].sBorderLayerName,"visibility="+(this.bQueryZonesVisible?"true":"false")+";color=;linewidth=1");
}else{
this.setLayerParameter(this.aQueryZones[i].sBorderLayerName,"visibility="+(this.bQueryZonesVisible?"true":"false")+";ellipse1=");
}
}
};
SIX.Map.prototype.toggleQueryZonesVisibility=function(){
this.bQueryZonesVisible=!this.bQueryZonesVisible;
var _bd3=document[this.uid];
var _bd4="visibility="+(this.bQueryZonesVisible?"true":"false");
for(var i=0;i<this.aQueryZones.length;i++){
var _bd6=_bd3.GetLayerIndex(this.aQueryZones[i].sFillLayerName);
if(_bd6!=-1){
this.setLayerParameter(this.aQueryZones[i].sFillLayerName,_bd4);
}
var _bd6=_bd3.GetLayerIndex(this.aQueryZones[i].sBorderLayerName);
if(_bd6!=-1){
this.setLayerParameter(this.aQueryZones[i].sBorderLayerName,_bd4);
}
}
};
SIX.Map.prototype.drawQueryZones=function(){
if(!this.pointQueryZonesCenter){
return;
}
var _bd7=document[this.uid];
this.resetQueryZonesLayers();
var _bd8=Math.ceil(this.width*this.dQueryZonesIntervalDistance/(this.brx-this.tlx));
for(var i=0;i<this.aQueryZones.length;i++){
var _bda=this.aQueryZones[i].dInnerRadius+(this.aQueryZones[i].dOuterRadius-this.aQueryZones[i].dInnerRadius)/2;
var _bdb=this.pointQueryZonesCenter.worldX-_bda;
var _bdc=this.pointQueryZonesCenter.worldY+_bda;
var _bdd=this.pointQueryZonesCenter.worldX+_bda;
var _bde=this.pointQueryZonesCenter.worldY-_bda;
var _bdf="linewidth="+_bd8+";color="+this.aQueryZones[i].sColor+";";
var _be0="ellipse1="+_bdb+","+_bdc+"|"+_bdd+","+_bde+";";
this.setLayerParameter(this.aQueryZones[i].sFillLayerName,_bdf+_be0);
this.setLayerTransparency(this.aQueryZones[i].sFillLayerName,"#",0.25);
var _be1=this.pointQueryZonesCenter.worldX-this.aQueryZones[i].dOuterRadius;
var _be2=this.pointQueryZonesCenter.worldY+this.aQueryZones[i].dOuterRadius;
var _be3=this.pointQueryZonesCenter.worldX+this.aQueryZones[i].dOuterRadius;
var _be4=this.pointQueryZonesCenter.worldY-this.aQueryZones[i].dOuterRadius;
var _be5="linewidth=2;color="+this.aQueryZones[i].sColor+";";
var _be6="ellipse1="+_be1+","+_be2+"|"+_be3+","+_be4+";";
this.setLayerParameter(this.aQueryZones[i].sBorderLayerName,_be5+_be6);
}
};
SIX.Map.prototype.setCenterWithScale=function(x,y,_be9,_bea,proj){
var _bec=this.datum();
var _bed=this.projection();
var _bee=(_bea?_bea:"");
var _bef=(proj?proj:"");
if(_bee!=""&&_bef!=""&&(_bee!=_bec||_bef!=_bed)){
var aEN=this.convertCoord(_bee,_bef,x,y,_bec,_bed);
x=aEN[0];
y=aEN[1];
}else{
if(x<=180&&y<=90){
var aEN=this.convertCoord(_bec,"GEODETIC",x,y,_bec,_bed);
x=aEN[0];
y=aEN[1];
}
}
this.zoom(_be9);
this.setCenterCoord(x,y,_bec,_bed);
};
SIX.Map.prototype.getCoordsCacheKey=function(_bf1,_bf2,_bf3,_bf4,_bf5){
var sKey=_bf1.toLowerCase()+"_"+_bf2.toLowerCase()+"_"+_bf3[0]+"_"+_bf3[1]+"_"+_bf4.toLowerCase()+"_"+_bf5.toLowerCase();
sKey=sKey.replace(/-/g,"neg");
sKey=sKey.replace(/\./g,"pt");
return sKey;
};
SIX.Map.prototype.getCachedCoord=function(_bf7,_bf8,_bf9,_bfa,_bfb){
var _bfc=null;
if(_bf9){
var sKey=this.getCoordsCacheKey(_bf7,_bf8,_bf9,_bfa,_bfb);
if(this.coordsCache.hasItem(sKey)){
_bfc=this.coordsCache.getItem(sKey);
}
}
return _bfc;
};
SIX.Map.prototype.cacheCoord=function(_bfe,_bff,_c00,_c01,_c02,_c03){
if(!this.getCachedCoord(_bfe,_bff,_c00,_c01,_c02)){
if(this.coordsCache.length>=this.MAX_COORDS_CACHE_SIZE){
for(var i in this.coordsCache.items){
if(this.coordsCache.items.hasOwnProperty(i)){
this.coordsCache.removeItem(i);
break;
}
}
}
var sKey=this.getCoordsCacheKey(_bfe,_bff,_c00,_c01,_c02);
this.coordsCache.setItem(sKey,_c03);
}
};
SIX.Map.prototype.convertCoords=function(_c06,_c07,_c08,_c09,_c0a){
if(_c06==_c09&&_c07==_c0a){
return _c08;
}
var _c0b=null;
if(SIX.App.bDHTMLControl&&!this.hasProj4jsConversion(_c06,_c07,_c09,_c0a)){
var _c0c=document[this.uid];
var _c0d=new Array();
for(var i=0;i<_c08.length;i++){
var _c0f=this.getCachedCoord(_c06,_c07,_c08[i],_c09,_c0a);
if(!_c0f){
break;
}
_c0d[i]=_c0f;
}
if(_c0d.length==_c08.length){
_c0b=_c0d;
return _c0b;
}
if(_c0c.bHaveProxy){
var _c10="";
for(var i=0;i<_c08.length;i++){
_c10+=(i>0?"|":"")+_c08[i][0]+","+_c08[i][1];
}
_c0c._SetWaitCursor();
var AJAX=new NCSAJAX();
var dom=AJAX.GetXML((map.bSSLProxy?"https://":"http://")+SIXConfig.JSVIEWPROXY_PATH+"?xCMD=CVT&xSD="+_c06+"&xSP="+_c07+"&xDD="+_c09+"&xDP="+_c0a+"&xSl="+_c10,null,"GET");
_c0c._SetCursor(false);
if(dom!=null){
try{
var _c13=dom.getElementText("CVT");
if(_c13!=""){
var _c14=_c13.split("|");
_c0b=new Array();
for(var i=0;i<_c14.length;i++){
_c0b[i]=null;
var _c15=_c14[i].split(",");
if(_c15.length>=2){
var dX=parseFloat(_c15[0]);
var dY=parseFloat(_c15[1]);
if(!isNaN(dX)&&!isNaN(dY)){
_c0b[i]=[dX,dY];
this.cacheCoord(_c06,_c07,_c08[i],_c09,_c0a,_c0b[i]);
}
}
}
}
}
catch(ex){
_c0b=null;
}
}
}
}else{
_c0b=new Array();
for(var i=0;i<_c08.length;i++){
var _c18=this.convertCoord(_c06,_c07,_c08[i][0],_c08[i][1],_c09,_c0a);
_c0b[i]=_c18;
}
}
return _c0b;
};
SIX.Map.prototype.convertCoordsAsync=function(_c19,_c1a,_c1b,_c1c,_c1d,_c1e,data){
var AJAX=null;
if(_c19==_c1c&&_c1a==_c1d){
_c1e(data,_c1b);
return null;
}
var map=this;
var _c22=null;
if(SIX.App.bDHTMLControl){
var _c23=document[this.uid];
var _c24=new Array();
for(var i=0;i<_c1b.length;i++){
var _c26=this.getCachedCoord(_c19,_c1a,_c1b[i],_c1c,_c1d);
if(!_c26){
break;
}
_c24[i]=_c26;
}
if(_c24.length==_c1b.length){
_c22=_c24;
_c1e(data,_c22);
return null;
}
if(this.hasProj4jsConversion(_c19,_c1a,_c1c,_c1d)){
_c22=this.convertCoords(_c19,_c1a,_c1b,_c1c,_c1d);
_c1e(data,_c22);
return null;
}
if(_c23.bHaveProxy){
var _c27="";
for(var i=0;i<_c1b.length;i++){
_c27+=(i>0?"|":"")+_c1b[i][0]+","+_c1b[i][1];
}
AJAX=new NCSAJAX();
var _c28=function(dom,data){
with({fnCallback:_c1e,map:map}){
if(dom!=null){
try{
var _c2b=dom.getElementText("CVT");
if(_c2b!=""){
var _c2c=_c2b.split("|");
_c22=new Array();
for(var i=0;i<_c2c.length;i++){
_c22[i]=null;
var _c2e=_c2c[i].split(",");
if(_c2e.length>=2){
var dX=parseFloat(_c2e[0]);
var dY=parseFloat(_c2e[1]);
if(!isNaN(dX)&&!isNaN(dY)){
_c22[i]=[dX,dY];
map.cacheCoord(_c19,_c1a,_c1b[i],_c1c,_c1d,_c22[i]);
}
}
}
}
}
catch(ex){
_c22=null;
}
_c1e(data,_c22);
}
}
};
var dom=AJAX.PostEx((map.bSSLProxy?"https://":"http://")+SIXConfig.JSVIEWPROXY_PATH+"?xCMD=CVT&xSD="+_c19+"&xSP="+_c1a+"&xDD="+_c1c+"&xDP="+_c1d+"&xSl="+_c27,null,"GET",_c28,data,true);
}
}
return AJAX;
};
SIX.Map.prototype.getProj4jsDef=function(_c32,_c33){
var def=null;
var _c35=GDTEPSGMappings.getEPSGCode(_c32,_c33);
if(_c35&&Proj4js&&Proj4js.defs["EPSG:"+_c35]){
def="EPSG:"+_c35;
}
return def;
};
SIX.Map.prototype.hasProj4jsConversion=function(_c36,_c37,_c38,_c39){
return (this.getProj4jsDef(_c36,_c37)&&this.getProj4jsDef(_c38,_c39));
};
SIX.Map.prototype.convertCoord=function(_c3a,_c3b,dX,dY,_c3e,_c3f){
var _c40=document[this.uid];
var _c41=this.getCachedCoord(_c3a,_c3b,[dX,dY],_c3e,_c3f);
if(!_c41){
if(SIX.App.bDHTMLControl){
if(this.hasProj4jsConversion(_c3a,_c3b,_c3e,_c3f)){
var p=new Proj4js.Point(dX,dY);
var _c43=new Proj4js.Proj(this.getProj4jsDef(_c3a,_c3b));
var _c44=new Proj4js.Proj(this.getProj4jsDef(_c3e,_c3f));
Proj4js.transform(_c43,_c44,p);
_c41=new Array();
_c41[0]=p.x;
_c41[1]=p.y;
}else{
_c41=_c40._ConvertCoords(_c3a,_c3b,[dX,dY],_c3e,_c3f);
}
}else{
if(_c3f.toLowerCase()=="geodetic"){
var _c45=_c40.GetParameter("GDTConvertToLL("+_c3a+" "+_c3b+" "+dX+" "+dY+")");
}else{
if(_c3b.toLowerCase()=="geodetic"){
var _c45=_c40.GetParameter("GDTConvertToEN("+_c3e+" "+_c3f+" "+dX+" "+dY+")");
}else{
var _c46=_c40.GetParameter("GDTConvertToLL("+_c3a+" "+_c3b+" "+dX+" "+dY+")");
var _c46=_c46.replace(","," ");
var _c45=_c40.GetParameter("GDTConvertToEN("+_c3e+" "+_c3f+" "+_c46+")");
}
}
var _c47=_c45.split(",");
if(_c47.length>=2){
_c41=new Array();
_c41[0]=parseFloat(_c47[0]);
_c41[1]=parseFloat(_c47[1]);
}
}
this.cacheCoord(_c3a,_c3b,[dX,dY],_c3e,_c3f,_c41);
}
return _c41;
};
SIX.Map.prototype.getMouseLatitude=function(){
var _c48=null;
if(this.dMouseWorldX!=null&&this.dMouseWorldY!=null){
var _c49=this.datum();
var _c4a=this.projection();
var _c4b=this.convertCoord(_c49,_c4a,this.dMouseWorldX,this.dMouseWorldY,_c49,"geodetic");
if(_c4b&&_c4b.length>=2){
_c48=_c4b[1];
}
}
return _c48;
};
SIX.Map.prototype.getMouseLongitude=function(){
var _c4c=null;
if(this.dMouseWorldX!=null&&this.dMouseWorldY!=null){
var _c4d=this.datum();
var _c4e=this.projection();
var _c4f=this.convertCoord(_c4d,_c4e,this.dMouseWorldX,this.dMouseWorldY,_c4d,"geodetic");
if(_c4f&&_c4f.length>=2){
_c4c=_c4f[0];
}
}
return _c4c;
};
SIX.Map.prototype.getGeoPoint=function(dX,dY,_c52,_c53){
var _c54=document[this.uid];
if(arguments.length<3){
var _c52=this.datum();
}
if(arguments.length<4){
var _c53=this.projection();
}
var _c55=new Array();
if((_c52!="")&&(_c53!="")){
if(SIX.App.bDHTMLControl){
_c55=this.convertCoord(_c52,_c53,dX,dY,_c52,"GEODETIC");
}else{
var _c56=_c54.GetParameter("GDTConvertToLL("+_c52+" "+_c53+" "+dX+" "+dY+")");
var _c57=_c56.split(",");
if(_c57.length>=2){
_c55[0]=parseFloat(_c57[0]);
_c55[1]=parseFloat(_c57[1]);
}
}
}
return _c55;
};
SIX.Map.prototype.getENPoint=function(dX,dY,_c5a,_c5b){
var _c5c=document[this.uid];
var _c5d=new Array();
if(arguments.length<3){
var _c5a=this.datum();
}
if(arguments.length<4){
var _c5b="geodetic";
}
if((_c5a!="")&&(_c5b!="")&&(_c5b.toLowerCase()!="geodetic")){
if(SIX.App.bDHTMLControl){
_c5d=this.convertCoord(_c5a,"GEODETIC",dX,dY,_c5a,_c5b);
}else{
var _c5e=_c5c.GetParameter("GDTConvertToEN("+_c5a+" "+_c5b+" "+dX+" "+dY+")");
var _c5f=_c5e.split(",");
if(_c5f.length>=2){
_c5d[0]=parseFloat(_c5f[0]);
_c5d[1]=parseFloat(_c5f[1]);
}
}
}
return _c5d;
};
SIX.Map.prototype.getPointerMode=function(){
var _c60=document[this.uid];
var _c61=_c60.GetPointerMode();
return _c61;
};
SIX.Map.prototype.setPointerMode=function(mode){
var _c63=document[this.uid];
_c63.SetPointerMode(mode);
var _c64=this.parentMap;
if(_c64){
_c64.setPointerMode(mode);
}
};
SIX.Map.prototype.projection=function(){
var _c65=document[this.uid];
var _c66=_c65.GetLayerName(0);
var _c67=_c65.GetLayerProjection(_c66);
return _c67;
};
SIX.Map.prototype.datum=function(){
var _c68=document[this.uid];
var _c69=_c68.GetLayerName(0);
var _c6a=_c68.GetLayerDatum(_c69);
return _c6a;
};
SIX.Map.prototype.setExtentsAll=function(){
var _c6b=document[this.uid];
var _c6c=SIX.App.getCurrentChannel();
if(_c6c.tlMaxLat!=_c6c.brMaxLat&&_c6c.tlMaxLon!=_c6c.brMaxLon){
this.setExtents(_c6c.tlMaxLat,_c6c.tlMaxLon,_c6c.brMaxLat,_c6c.brMaxLon);
}else{
var _c6d=false;
var _c6e=_c6b.GetNumberLayers();
for(var i=0;i<_c6e;i++){
var _c70=_c6b.GetLayerName(i);
var _c71=_c6b.GetLayerType(_c70);
_c71=_c71.toLowerCase();
if((_c71=="ecw")||(_c71=="jp2")){
var sVis=this.getLayerParameter(_c70,"visibility");
sVis=sVis.toUpperCase();
if(sVis=="TRUE"){
_c6d=true;
break;
}
}
}
if(_c6d){
if(this.catalog.bDisplayBest&&!((this.tlMaxDisplayBestLat==0)&&(this.tlMaxDisplayBestLon==0)&&(this.brMaxDisplayBestLat==0)&&(this.brMaxDisplayBestLon==0))){
this.setExtents(this.tlMaxDisplayBestLat,this.tlMaxDisplayBestLon,this.brMaxDisplayBestLat,this.brMaxDisplayBestLon);
}else{
if((this.tlMaxLat==0)&&(this.tlMaxLon==0)&&(this.brMaxLat==0)&&(this.brMaxLon==0)){
_c6b.SetExtentsAll();
}else{
this.setExtents(this.tlMaxLat,this.tlMaxLon,this.brMaxLat,this.brMaxLon);
}
}
}else{
if(!((this.tlMaxOverlayLat==0)&&(this.tlMaxOverlayLon==0)&&(this.brMaxOverlayLat==0)&&(this.brMaxOverlayLon==0))){
this.setExtents(this.tlMaxOverlayLat,this.tlMaxOverlayLon,this.brMaxOverlayLat,this.brMaxOverlayLon);
}
}
}
};
SIX.Map.prototype.zoom=function(_c73){
var nDPI=SIX.Util.getScreenXDPI();
var _c75=(0.0254/nDPI);
var _c76=_c75*_c73*this.width;
if(this.isGeodetic()){
var _c77=this.getMouseLatitude();
var _c78=this.getMouseLongitude();
var _c79=Math.PI*_c77/180;
var _c7a=Math.PI*_c78/180;
var _c7b=6378137;
var _c7c=2*_c7b*(Math.acos(Math.sin(_c79)*Math.sin(_c79)-Math.cos(_c79)*Math.cos(_c79)));
var tlx=this.getTopLeftLongitude();
var tly=this.getTopLeftLatitude();
var brx=this.getBottomRightLongitude();
var bry=this.getBottomRightLatitude();
var _c81=Math.abs(brx-tlx)*_c7c/360;
var _c82=_c76*360/_c7c;
}else{
var _c81=Math.abs(this.brx-this.tlx);
var _c82=_c76;
var tlx=this.tlx;
var tly=this.tly;
var brx=this.brx;
var bry=this.bry;
}
var _c83=(brx-tlx)/(tly-bry);
var _c84=_c82/_c83;
var _c85=this.getCentrePoint(tlx,tly,brx,bry);
this.setExtents(_c85[1]+_c84/2,_c85[0]-_c82/2,_c85[1]-_c84/2,_c85[0]+_c82/2);
};
SIX.Map.prototype.pan=function(_c86,_c87){
var _c88=_c86*(this.brx-this.tlx)/100;
var _c89=_c87*(this.tly-this.bry)/100;
var dTLX=this.tlx+_c88;
var dBRX=this.brx+_c88;
var dTLY=this.tly+_c89;
var dBRY=this.bry+_c89;
this.setExtents(dTLY,dTLX,dBRY,dBRX);
};
SIX.Map.prototype.getCentrePoint=function(tlx,tly,brx,bry){
var _c92=new Array(2);
_c92[0]=tlx+(brx-tlx)/2;
_c92[1]=bry+(tly-bry)/2;
return _c92;
};
SIX.Map.prototype.getScaleFromExtents=function(tlx,tly,brx,bry){
var _c97=tlx+(brx-tlx)/2;
var _c98=tly+(bry-tly)/2;
if(this.isGeodetic()){
var _c99=Math.PI*_c98/180;
var _c9a=Math.PI*_c97/180;
var _c9b=6378137;
var _c9c=2*_c9b*(Math.acos(Math.sin(_c99)*Math.sin(_c99)-Math.cos(_c99)*Math.cos(_c99)));
var _c9d=Math.abs(brx-tlx)*_c9c/360;
}else{
var _c9d=Math.abs(brx-tlx);
}
var _c9e=this.width;
var _c9f=_c9d/_c9e;
var nDPI=SIX.Util.getScreenXDPI();
var _ca1=(0.0254/nDPI);
var _ca2=_c9f/_ca1;
return _ca2;
};
SIX.Map.prototype.getExtentsFromScale=function(dX,dY,_ca5){
var _ca6=new Array(4);
var nDPI=SIX.Util.getScreenXDPI();
var _ca8=(0.0254/nDPI);
if(_ca5>0){
var _ca9=6378137;
var _caa=Math.PI*dY/180;
var _cab=Math.PI*dX/180;
var _cac=2*_ca9*(Math.acos(Math.sin(_caa)*Math.sin(_caa)-Math.cos(_caa)*Math.cos(_caa)));
var _cad=_ca8*_ca5*this.width;
var _cae=_cad*360/_cac;
var _caf=(this.getBottomRightLongitude()-this.getTopLeftLongitude())/(this.getTopLeftLatitude()-this.getBottomRightLatitude());
var _cb0=_cae/_caf;
_ca6[0]=dX-_cae/2;
_ca6[1]=dY+_cb0/2;
_ca6[2]=dX+_cae/2;
_ca6[3]=dY-_cb0/2;
}
return _ca6;
};
SIX.Map.prototype.getView=function(){
var _cb1=document[this.uid];
var _cb2=_cb1.CaptureView(".png");
var _cb3="<script>"+"var bImageLoaded = false;"+"function hideError()"+"{var elemError = document.getElementById(\"error\");"+"if (elemError) elemError.style.display = \"none\";}"+"function showError()"+"{var elemError = document.getElementById(\"error\");"+"if (elemError) elemError.style.display = \"block\";}"+"</script>";
var oWin=window.open();
oWin.document.writeln("<html><head>");
oWin.document.writeln(_cb3);
oWin.document.writeln("</head><body onload='setTimeout(\"if (!bImageLoaded) showError();\",1000)'>");
oWin.document.writeln("<img onload='bImageLoaded=true;hideError();' src='file:///"+_cb2+"'>");
oWin.document.writeln("<div id='error' style='display:none'><p>");
oWin.document.writeln("<b>NOTE:</b> Your browser settings have prevented the map print preview from being displayed.");
oWin.document.writeln("To display the print preview, copy and paste the below filename into your browser's address bar:<br><br>");
oWin.document.writeln(_cb2);
oWin.document.writeln("</p></div>");
oWin.document.writeln("<div id='copyright'>");
oWin.document.writeln("Source - NSW Department of Lands SIX Viewer &copy;");
oWin.document.writeln("<a href=http://six.maps.nsw.gov.au target='_blank'>six.maps.nsw.gov.au</a>");
oWin.document.writeln("<ul style='list-style-type:circle;list-style-position:inside;margin-top:10px;margin-left:20px;'>");
for(var i=0;i<this.catalog.services.length;i++){
var _cb6=this.catalog.services[this.catalog.servicesOrder[i]];
if(_cb6.access instanceof SIX.Access.ECWP){
for(var j=0;j<_cb6.layers.length;j++){
var _cb8=_cb6.layers[_cb6.layersOrder[j]];
if(_cb8.bSelected){
oWin.document.writeln("<li>"+_cb8.name+"</li>");
}
}
}
}
oWin.document.writeln("</ul></div>");
if(this.childMap){
childMap=document[this.childMap.uid];
filenameChild=childMap.CaptureView(".png");
oWin.document.writeln("<div id='childImg' style='position:absolute; top:0px; left:0px; opacity:"+this.childMap.opacity+"; filter:alpha(opacity="+this.childMap.opacity*100+");'>");
oWin.document.writeln("<img src='file:///"+filenameChild+"'></div>");
}
oWin.document.writeln("</body></html>");
oWin.document.close();
};
SIX.Map.prototype.printPreview=function(){
var map=this.getBottomMap();
var oWin=window.open("PrintPreview.htm?map="+encodeURIComponent(map.myself));
};
SIX.Map.prototype.onSubmitPrintPreviewPageSetup=function(){
var map=this.getBottomMap();
var _cbc=SIX.Util.trim(document.forms["PrintPreviewPageSetupForm"].Title.value);
var _cbd=SIX.Util.trim(document.forms["PrintPreviewPageSetupForm"].Orientation[document.forms["PrintPreviewPageSetupForm"].Orientation.selectedIndex].value);
var _cbe=SIX.Util.trim(document.forms["PrintPreviewPageSetupForm"].Size[document.forms["PrintPreviewPageSetupForm"].Size.selectedIndex].value);
var oWin=window.open("PrintPreview.htm?map="+encodeURIComponent(map.myself)+"&showscale=true&title="+encodeURIComponent(_cbc)+"&orientation="+encodeURIComponent(_cbd)+"&size="+encodeURIComponent(_cbe));
SIX.App.printPreviewPageSetupPopupWin.hidePopup();
};
SIX.Map.prototype.printPreviewPageSetup=function(tool){
var _cc1="<form name='PrintPreviewPageSetupForm' onsubmit='"+this.myself+".onSubmitPrintPreviewPageSetup();return false;' action=''>"+"<div class='printPreviewPageSetupTitle'>"+"<img class='printPreviewPageSetupLogo' src='images/SIXLogoSmall.gif'>"+"<div class='printPreviewPageSetupHeading'>Print Page Setup</div>"+"</div>"+"<div class='printPreviewPageSetupRow'>"+"<div class='printPreviewPageSetupLabel'>Title:</div>"+"<div class='printPreviewPageSetupField'><input type='text' name='Title' size='30' value=''></div>"+"</div>"+"<div class='printPreviewPageSetupRow'>"+"<div class='printPreviewPageSetupLabel'>Size:</div>"+"<div class='printPreviewPageSetupField'>"+"<select name='Size'>"+"<option value='a4' selected>A4"+"<option value='a3'>A3"+"</select>"+"</div>"+"</div>"+"<div class='printPreviewPageSetupRow'>"+"<div class='printPreviewPageSetupLabel'>Orientation:</div>"+"<div class='printPreviewPageSetupField'>"+"<select name='Orientation'>"+"<option value='portrait' selected>Portrait"+"<option value='landscape'>Landscape"+"</select>"+"</div>"+"</div>"+"<div class='printPreviewPageSetupRow'>"+"<input class='printPreviewPageSetupSubmit' type='button' value='OK' onclick='"+this.myself+".onSubmitPrintPreviewPageSetup()'>"+"</div>"+"</form>";
SIX.App.printPreviewPageSetupPopupWin.offsetX=10;
SIX.App.printPreviewPageSetupPopupWin.offsetY=30;
SIX.App.printPreviewPageSetupPopupWin.autoHide();
SIX.App.hideToolbarPopups();
SIX.App.printPreviewPageSetupPopupWin.populate(_cc1);
SIX.App.printPreviewPageSetupPopupWin.showPopup(tool.containerUid);
};
SIX.Map.prototype.initRoamClip=function(_cc2){
var _cc3=document[this.uid];
this.bRoamClip=true;
var _cc4=_cc3.GetViewWidth();
var _cc5=_cc3.GetViewHeight();
var _cc6=parseInt(_cc4/2,10);
var _cc7=parseInt(_cc5/2,10);
this.nRoamSize=arguments.length?_cc2:this.nRoamSize;
_cc3.SetLayerClip(this.getTopEcw(),true);
_cc3.SetLayerClipRect(this.getTopEcw(),(_cc6-this.nRoamSize/2),(_cc7-this.nRoamSize/2),(_cc6+this.nRoamSize/2),(_cc7+this.nRoamSize/2));
};
SIX.Map.prototype.clearRoam=function(){
this.bRoamClip=false;
var _cc8=document[this.uid];
var _cc9=_cc8.GetNumberLayers();
for(var i=0;i<_cc9;i++){
_cc8.SetLayerClip(_cc8.GetLayerName(i),false);
}
};
SIX.Map.prototype.roamClip=function(_ccb,_ccc,_ccd,_cce,_ccf){
var _cd0=document[this.uid];
var _cd1=_cd0.GetViewWidth();
var _cd2=_cd0.GetViewHeight();
if(this.bRoamClip){
_cd0.SetLayerClipRect(this.getTopEcw(),(_ccc-this.nRoamSize/2),(_ccd-this.nRoamSize/2),(_ccc+this.nRoamSize/2),(_ccd+this.nRoamSize/2));
_cd0.SetLayerClip(this.getTopEcw(),true);
}else{
_cd0.SetLayerClip(this.getLastVisibleLayer(),false);
}
};
SIX.Map.prototype.getLastVisibleLayer=function(){
var _cd3="";
var _cd4=document[this.uid];
for(var i=0;i<this.catalog.services.length;i++){
var _cd6=this.catalog.services[i];
if(_cd6.loaded&&_cd6.active){
if(_cd6.access instanceof SIX.Access.ECWP&&_cd6.layers.length>0){
_cd3=_cd6.layers[_cd6.layers.length-1].uid;
}else{
_cd3=_cd6.uid;
}
}
}
return _cd3;
};
SIX.Map.prototype.getLayerParameter=function(_cd7,_cd8){
var _cd9="";
var _cda=document[this.uid];
try{
_cd9=_cda.GetLayerParameter(_cd7,_cd8);
}
catch(e){
}
return _cd9;
};
SIX.Map.prototype.getECWProgress=function(){
return this.nECWProgressPercent;
};
SIX.Map.prototype.setECWProgress=function(_cdb){
var _cdc=SIX.App.getCurrentChannel();
if(_cdc.console){
_cdc.console.setECWJP2Progress(_cdb);
}
this.nECWProgressPercent=_cdb;
this.status.setProgress(Math.round((this.nECWProgressPercent+this.nGISOverlayProgressPercent)/2));
};
SIX.Map.prototype.getGISOverlayProgress=function(){
return this.nGISOverlayProgressPercent;
};
SIX.Map.prototype.setGISOverlayProgress=function(_cdd){
var _cde=SIX.App.getCurrentChannel();
if(_cde.console){
_cde.console.setGISOverlayProgress(_cdd);
}
this.nGISOverlayProgressPercent=_cdd;
this.status.setProgress(Math.round((this.nECWProgressPercent+this.nGISOverlayProgressPercent)/2));
};
SIX.Map.prototype.getContainer=function(){
var map=this.getTopMap();
var _ce0=document.getElementById(map.containerUid);
return _ce0;
};
SIX.Map.prototype.getCanvas=function(){
var _ce1=null;
if(SIX.App.bDHTMLControl){
var map=this.getTopMap();
var _ce3=document[map.uid];
_ce1=document.getElementById("NCSJSViewCanvas"+_ce3.nViewID);
}
return _ce1;
};
SIX.Map.prototype.onChangeSaveMapFormDescription=function(){
var _ce4=document.getElementById(this.saveMapFormUid);
if(_ce4&&(this.sMapDescription==""||_ce4.Description.value!=this.sMapDescription)){
this.sMapDescription=_ce4.Description.value;
var _ce5=document.getElementById(this.saveMapFormDescriptionRichTextUid);
var _ce6=document.getElementById(this.saveMapFormDescriptionUid);
if(_ce5&&_ce6){
this.onChangeRichText(_ce4.Description,_ce5,_ce6);
}
}
};
SIX.Map.prototype.onChangeMarkerFormDescription=function(){
var _ce7=document.getElementById(this.markerFormUid);
if(_ce7&&(this.sMarkerDescription==""||_ce7.Description.value!=this.sMarkerDescription)){
this.sMarkerDescription=_ce7.Description.value;
var _ce8=document.getElementById(this.markerFormDescriptionRichTextUid);
var _ce9=document.getElementById(this.markerFormDescriptionUid);
if(_ce8&&_ce9){
this.onChangeRichText(_ce7.Description,_ce8,_ce9);
}
}
};
SIX.Map.prototype.onChangeRichText=function(_cea,_ceb,_cec){
var _ced=_cea.value?_cea.value:"";
var _cee=SIX.Util.convertTextUrlsToLinks(_ced);
var _cef=document.createElement("pre");
_cef.setAttribute("class","richTextArea");
_cef.setAttribute("className","richTextArea");
_cef.innerHTML=_cee;
while(_ceb.hasChildNodes()){
_ceb.removeChild(_ceb.lastChild);
}
_ceb.appendChild(_cef);
var _cf0=_cea.scrollHeight-2;
_cef.style.height=0+"px";
_cef.style.height=_cf0+"px";
_cea.style.height=0+"px";
_cea.style.height=_cf0+"px";
_cea.style.top=-(_ceb.offsetHeight)+"px";
for(var i=_cec.childNodes.length-1;i>=0;i--){
var _cf2=_cec.childNodes[i];
if((_cf2.tagName.toLowerCase()=="a")||(_cf2.tagName.toLowerCase()=="br")||((_cf2.tagName.toLowerCase()=="pre")&&(_cf2!=_cef))){
_cec.removeChild(_cf2);
}
}
var _cf3=SIX.Util.findPosX(_cef);
var _cf4=SIX.Util.findPosY(_cef);
for(var i=0;i<_cef.childNodes.length;i++){
if((_cef.childNodes[i].nodeType!=Node.ELEMENT_NODE)||_cef.childNodes[i].tagName.toLowerCase()!="a"){
continue;
}
var _cf5=(i&&!(_cef.childNodes[i-1].nodeType==Node.ELEMENT_NODE&&_cef.childNodes[i-1].tagName.toLowerCase()=="br"));
var _cf6=_cef.childNodes[i];
var _cf7=SIX.Util.findPosX(_cf6);
var _cf8=SIX.Util.findPosY(_cf6);
var nX=_cf7-_cf3;
var nY=_cf8-_cf4;
var _cfb=_cf6.cloneNode(true);
_cfb.style.backgroundColor="#ffffff";
_cfb.style.visibility="inherit";
if(SIX.App.isIE&&(!nX||(nX+_cf6.offsetWidth>_cef.offsetWidth))){
var _cfc=_cef.cloneNode(false);
_cfc.style.position="relative";
_cfc.style.left=0;
_cfc.style.visibility="inherit";
if(_cf5){
var _cfd=document.createElement("br");
_cfc.appendChild(_cfd);
}
_cfc.appendChild(_cfb);
_cec.appendChild(_cfc);
_cfc.style.top=(_cf8-SIX.Util.findPosY(_cfc))+"px";
}else{
_cfb.style.position="absolute";
_cfb.style.top=nY+"px";
_cfb.style.left=nX+"px";
_cec.appendChild(_cfb);
}
}
};
SIX.Map.prototype.onSubmitMarkerForm=function(){
var _cfe=SIX.App.getCurrentChannel();
var _cff=this.markerCollection.aMarkers[this.markerCollection.nSelectedMarker];
var _d00=document.getElementById(this.markerFormUid);
if(_d00){
if((_cff.sSymbol!=_cfe.sMarkerSymbolId)||(_cff.sTitle!=_d00.Name.value)||(_cff.sDescription!=_d00.Description.value)){
_cff.sSymbol=_cfe.sMarkerSymbolId;
_cff.sTitle=_d00.Name.value;
_cff.sDescription=_d00.Description.value;
var _d01=document.getElementById(_cff.uid);
var _d02=document.getElementById(_cff.imageUid);
if(_d01&&_d02){
_d01.removeChild(_d02);
var _d03=this.markerCollection.buildMarkerImage(_cff);
if(_d03){
_d01.appendChild(_d03);
}
}
}
}
this.hideMarkerForm();
this.markerCollection.updateMarkerList();
};
SIX.Map.prototype.onCancelMarkerForm=function(){
this.markerCollection.deleteMarker(this.markerCollection.nSelectedMarker);
this.markerCollection.update();
this.hideMarkerForm();
this.markerCollection.updateMarkerList();
};
SIX.Map.prototype.onSubmitSaveMapForm=function(){
var _d04=document.getElementById(this.saveMapFormUid);
if(_d04){
var _d05=new SIX.Context("",_d04.Name.value,_d04.Description.value);
if(_d04.Extents[_d04.Extents.selectedIndex].value=="VIEW"){
_d05.setExtents(this.getTopLeftLatitude(),this.getTopLeftLongitude(),this.getBottomRightLatitude(),this.getBottomRightLongitude());
}else{
var _d06=this.markerCollection.getEnvelope();
if(_d06){
var _d07=0.1;
var _d08=_d07*(_d06.dMaxX-_d06.dMinX);
var _d09=_d07*(_d06.dMaxY-_d06.dMinY);
_d05.setExtents(_d06.dMaxY+_d09,_d06.dMinX-_d08,_d06.dMinY-_d09,_d06.dMaxX+_d08);
}
}
_d05.featureCollection=this.markerCollection.toGeoJSONFeatureCollection();
var _d0a=SIX.App.aContextCollections[0];
_d0a.saveContext(_d05);
}
this.hideSaveMapForm();
};
SIX.Map.prototype.onCancelSaveMapForm=function(){
this.hideSaveMapForm();
};
SIX.Map.prototype.showSaveMapForm=function(_d0b){
var _d0c=document.getElementById(this.saveMapFormContainerUid);
if(_d0c){
_d0c.style.display="block";
this.onChangeSaveMapFormDescription();
}
};
SIX.Map.prototype.hideSaveMapForm=function(){
var _d0d=document.getElementById(this.saveMapFormContainerUid);
if(_d0d){
_d0d.style.display="none";
}
};
SIX.Map.prototype.hideMarkerSymbols=function(){
var _d0e=document.getElementById(this.markerSymbolsContainerUid);
if(_d0e){
_d0e.style.visibility="hidden";
}
};
SIX.Map.prototype.showMarkerSymbols=function(){
var _d0f=document.getElementById(this.markerSymbolsContainerUid);
if(_d0f){
var _d10=SIX.App.getCurrentChannel();
if(!document.getElementById(_d10.markerSymbolsUid)){
this.buildMarkerSymbols();
}
_d0f.style.visibility="visible";
}
};
SIX.Map.prototype.buildMarkerSymbols=function(){
var _d11="";
var _d12=SIX.App.getCurrentChannel();
var _d13=_d12.markerSymbols.length?_d12.markerSymbols:SIX.App.markerSymbols;
_d11+="<div id='"+_d12.markerSymbolsUid+"'>";
for(var i in _d13.items){
if(_d13.items.hasOwnProperty(i)){
_d11+="<img src='"+_d13.items[i].sImage+"' onclick='"+this.myself+".onClickMarkerFormSymbol(\""+i+"\")' border='0'>";
}
}
_d11+="</div>";
var _d15=document.getElementById(this.markerSymbolsUid);
if(_d15){
_d15.innerHTML=_d11;
}
};
SIX.Map.prototype.onClickMarkerFormSymbol=function(_d16){
this.setMarkerFormSymbol(_d16);
this.hideMarkerSymbols();
};
SIX.Map.prototype.setMarkerFormSymbol=function(_d17){
var _d18=SIX.App.getCurrentChannel();
var _d19=_d18.getMarkerSymbol(_d17);
var _d1a=_d19.sImage;
var _d1b=document.getElementById(this.markerFormSymbolUid);
if(_d1b){
_d1b.src=_d1a;
_d18.sMarkerSymbolId=_d17;
}
};
SIX.Map.prototype.showMarkerForm=function(_d1c){
if(this.tMarkerFormPan){
clearTimeout(this.tMarkerFormPan);
this.tMarkerFormPan=null;
}
var _d1d=this.markerCollection.aMarkers[_d1c];
if(_d1d){
this.markerCollection.nSelectedMarker=_d1c;
var _d1e=document.getElementById(this.markerFormUid);
if(_d1e){
_d1e.Name.value=_d1d.sTitle;
_d1e.Description.value=_d1d.sDescription;
this.setMarkerFormSymbol(_d1d.sSymbol);
}
var _d1f=document.getElementById(this.markerFormContainerUid);
if(_d1f){
_d1f.style.visibility="hidden";
_d1f.style.display="block";
var _d20=this.getPixelFromLL(_d1d.x,_d1d.y);
if(_d20){
var _d21=document.getElementById(_d1d.uid);
var _d22=document.getElementById(_d1d.imageUid);
var _d23=_d20[0]-Math.round(_d1f.offsetWidth/2);
var nTop=_d20[1]-_d1f.offsetHeight+(_d22?_d22.offsetTop:0);
var _d25=this.tly;
var _d26=this.bry;
var _d27=this.tlx;
var _d28=this.brx;
if(nTop<0){
var dY=(this.tly-this.bry)*Math.abs(nTop/this.height);
_d25=this.tly+dY;
_d26=this.bry+dY;
}
if(_d23<0){
var dX=(this.brx-this.tlx)*Math.abs(_d23/this.width);
_d27=this.tlx-dX;
_d28=this.brx-dX;
}
_d1f.style.visibility="visible";
_d1f.style.left=_d23+"px";
_d1f.style.top=nTop+"px";
this.onChangeMarkerFormDescription();
if(nTop<0||_d23<0){
var _d2b=5;
var _d2c=100*(_d27-this.tlx)/(this.brx-this.tlx);
var _d2d=100*(_d25-this.tly)/(this.tly-this.bry);
var _d2e=(Math.abs(_d2d)>Math.abs(_d2c)?_d2b*_d2c/Math.abs(_d2d):(_d2c<0?-_d2b:_d2b));
var _d2f=(Math.abs(_d2c)>Math.abs(_d2d)?_d2b*_d2d/Math.abs(_d2c):(_d2d<0?-_d2b:_d2b));
var map=this;
var _d31=function(){
map.pan(_d2e,_d2f);
};
this.tMarkerFormPan=setTimeout(_d31,50);
}
}
}
}
};
SIX.Map.prototype.hideMarkerForm=function(){
var _d32=document.getElementById(this.markerFormContainerUid);
if(_d32){
_d32.style.visibility="hidden";
_d32.style.display="none";
}
};
SIX.Map.prototype.isMarkerFormVisible=function(){
var _d33=document.getElementById(this.markerFormContainerUid);
return (_d33&&_d33.style.display!="none"&&_d33.style.visibility!="hidden");
};
SIX.Map.prototype.showSavedMaps=function(_d34){
var _d35=document.getElementById(this.savedMapsContainerUid);
var _d36=document.getElementById(this.savedMapsTitleBarUid);
var _d37=document.getElementById(this.savedMapsUid);
var _d38=document.getElementById(this.savedMapsBackgroundUid);
if(_d35&&_d36&&_d37&&_d38){
if(_d34){
var map=this;
_d37.innerHTML="";
_d36.innerHTML="";
var _d3a=document.createElement("div");
_d3a.setAttribute("class","savedMapsTitleBarBackground");
_d3a.setAttribute("className","savedMapsTitleBarBackground");
_d36.appendChild(_d3a);
var _d3b=document.createElement("img");
_d3b.setAttribute("class","savedMapsCloseButton");
_d3b.setAttribute("className","savedMapsCloseButton");
_d3b.setAttribute("src","images/close.gif");
_d3b.onclick=function(){
with({map:map}){
map.hideSavedMaps();
}
};
_d36.appendChild(_d3b);
var _d3c=document.createElement("img");
_d3c.setAttribute("class","saveMapButton");
_d3c.setAttribute("className","saveMapButton");
_d3c.setAttribute("alt","Save map");
_d3c.setAttribute("title","Save map");
_d3c.setAttribute("src","images/save_map.gif");
_d3c.onmouseover=function(){
this.src="images/save_map_on.gif";
};
_d3c.onmouseout=function(){
this.src="images/save_map.gif";
};
_d3c.onclick=function(){
with({map:map}){
if(!SIX.App.account.bLoggedIn){
var _d3d=function(){
with({map:map}){
var _d3e=function(){
with({map:map}){
map.showSaveMapForm();
}
};
SIX.App.getMySavedMaps(_d3e);
}
};
SIX.App.account.fnLoginCallback=_d3d;
SIX.App.account.showLogin();
}else{
map.showSaveMapForm();
}
}
};
_d36.appendChild(_d3c);
var _d3f=this.markerCollection.buildMarkerList();
_d37.appendChild(_d3f);
this.markerCollection.updateMarkerList();
for(var i=0;i<SIX.App.aContextCollections.length;i++){
var _d41=SIX.App.aContextCollections[i];
var _d42=document.createElement("div");
_d42.setAttribute("id",_d41.containerUid);
_d42.setAttribute("class","contextCollectionContainer");
_d42.setAttribute("className","contextCollectionContainer");
var _d43=document.createElement("div");
_d43.setAttribute("class","contextListTitle");
_d43.setAttribute("className","contextListTitle");
if(i>0){
var _d44=_d41.buildExpandCollapseContextListButton(true);
_d43.appendChild(_d44);
var _d45=document.createTextNode(_d41.sTitle);
_d43.appendChild(_d45);
}else{
var _d46=document.createElement("a");
_d46.setAttribute("href","#");
var _d47="Click to display "+_d41.sTitle;
_d46.setAttribute("alt",_d47);
_d46.setAttribute("title",_d47);
_d46.onclick=function(_d48){
with({map:map}){
if(!SIX.App.account.bLoggedIn){
var _d49=function(){
with({map:map}){
SIX.App.getMySavedMaps(null);
}
};
SIX.App.account.fnLoginCallback=_d49;
SIX.App.account.showLogin();
}
}
return false;
};
var _d45=document.createTextNode(_d41.sTitle);
_d46.appendChild(_d45);
_d43.appendChild(_d46);
}
_d42.appendChild(_d43);
var _d4a=document.createElement("ol");
_d4a.setAttribute("id",_d41.uid);
_d4a.setAttribute("class","contextList");
_d4a.setAttribute("className","contextList");
_d42.appendChild(_d4a);
_d37.appendChild(_d42);
_d41.updateContextList();
}
var _d4b=document.createElement("div");
_d4b.setAttribute("class","savedMapsFooter");
_d4b.setAttribute("className","savedMapsFooter");
var _d4c=document.createTextNode("Footer");
_d4b.appendChild(_d4c);
_d37.appendChild(_d4b);
}
_d35.style.display="block";
_d38.style.display="block";
}
};
SIX.Map.prototype.hideSavedMaps=function(){
var _d4d=document.getElementById(this.savedMapsContainerUid);
var _d4e=document.getElementById(this.savedMapsBackgroundUid);
if(_d4d&&_d4e){
_d4d.style.display="none";
_d4e.style.display="none";
}
};
SIX.Map.prototype.getPixelFromEN=function(dX,dY){
var _d51=document[this.uid];
var _d52=_d51.GetViewWidth();
var _d53=_d51.GetViewHeight();
var _d54=Math.round(_d52*(dX-this.tlx)/(this.brx-this.tlx));
var _d55=Math.round(_d53*(this.tly-dY)/(this.tly-this.bry));
var _d56=new Array();
_d56[0]=_d54;
_d56[1]=_d55;
return _d56;
};
SIX.Map.prototype.getPixelFromLL=function(dX,dY){
var _d59=null;
var _d5a=this.getENPoint(dX,dY,this.datum(),this.projection());
if(_d5a){
_d59=this.getPixelFromEN(_d5a[0],_d5a[1]);
}
return _d59;
};
SIX.Map.prototype.getENFromPixel=function(nX,nY){
var _d5d=document[this.uid];
var _d5e=_d5d.GetViewWidth();
var _d5f=_d5d.GetViewHeight();
var _d60=null;
if((nX>=0)&&(nX<_d5e)&&(nY>=0)&&(nY<_d5f)){
var dX=this.tlx+(this.brx-this.tlx)*nX/_d5e;
var dY=this.tly-(this.tly-this.bry)*nY/_d5f;
_d60=new Array();
_d60[0]=dX;
_d60[1]=dY;
}
return _d60;
};
SIX.Map.prototype.getLLFromPixel=function(nX,nY){
var _d65=null;
var a;
var _d67=this.getENFromPixel(nX,nY);
if(_d67){
_d65=this.getGeoPoint(_d67[0],_d67[1],this.datum(),this.projection());
}
return _d65;
};
SIX.Map.prototype.setBestScale=function(_d68){
this.dBestScale=_d68;
};
SIX.Map.prototype.getBestScale=function(){
return this.dBestScale;
};
SIX.Map.prototype.showCrosshairs=function(){
var _d69=document.getElementById(this.crosshairsUid);
if(_d69){
_d69.style.display="block";
}
};
SIX.Map.prototype.hideCrosshairs=function(){
var _d6a=document.getElementById(this.crosshairsUid);
if(_d6a){
_d6a.style.display="none";
}
};
SIX.Map.prototype.getTopMap=function(){
var map=this;
while(map.childMap){
map=map.childMap;
}
return map;
};
SIX.Map.prototype.getBottomMap=function(){
var map=this;
while(map.parentMap){
map=map.parentMap;
}
return map;
};
SIX.eListState={NONE:0,COLLAPSED:1,EXPANDED:2};
SIX.eLayerCallbacks={ONCHANGEISINSCALE:1,ONCHANGEISSELECTED:2};
SIX.Layer=function(_d6d,name,id,url,_d71){
SIX.addRef(this);
this.uid=SIX.Uid.getUid("layer");
SIX.aUidToObject[this.uid]=this;
this.service=null;
this.parentLayer=null;
this.renderer=null;
var _d72=true;
if(_d6d.constructor==SIX.Service){
this.service=_d6d;
}else{
if(_d6d.constructor==SIX.Layer){
this.parentLayer=_d6d;
this.service=_d6d.service;
if(!this.service.bLayersOutOfScaleEnabled){
_d72=false;
}
}
}
this.name=this.service.getLayerNameAlias(id,name);
this.childLayersListUid=SIX.Uid.getUid("childLayersList");
this.childLayersListExpandCollapseUid=SIX.Uid.getUid("childLayersListExpandCollapse");
this.nameDisabledUid=SIX.Uid.getUid("name_disabled");
this.nameEnabledUid=SIX.Uid.getUid("name_enabled");
this.visibilityUnselectedEnabledUid=SIX.Uid.getUid("visibility_unselected_enabled");
this.visibilitySelectedEnabledUid=SIX.Uid.getUid("visibility_selected_enabled");
this.visibilityUnselectedDisabledUid=SIX.Uid.getUid("visibility_unselected_disabled");
this.visibilitySelectedDisabledUid=SIX.Uid.getUid("visibility_selected_disabled");
this.queryUid=SIX.Uid.getUid("query");
this.upUid=SIX.Uid.getUid("up");
this.metadataUid=SIX.Uid.getUid("metadata");
this.id=id;
this.url=url;
this.parameters=new SIX.Parameters(_d71?_d71:"");
this.doQuery=this.parameters.getParameter("doquery","boolean",false);
this.canQuery=this.doQuery?true:this.parameters.getParameter("canquery","boolean",true);
this.bSelected=this.parameters.getParameter("selected","boolean",false);
this.sMetadataUrl=this.parameters.getParameter("metadataurl","string","");
this.nBestIndex=this.parameters.getParameter("bestindex","number",-1);
this.nZIndex=this.parameters.getParameter("zindex","number",-1);
if(this.nZIndex==-1){
this.nZIndex=this.service.getLayerZIndex(this.id,this.name);
}
this.bCalculateExtents=this.parameters.getParameter("calculateextents","boolean",true);
this.sColor="";
this.bHidden=false;
this.bSelectedDisabled=false;
this.aGroupedLayers=new Array();
this.bNeverInList=this.parameters.getParameter("neverinlist","boolean",false);
if(this.service.bGroupLayersByName){
for(var i=0;i<this.service.allLayers.length;i++){
var _d74=this.service.allLayers[i];
if(_d74.name==this.name&&_d74!=this){
this.bNeverInList=true;
_d74.aGroupedLayers[_d74.aGroupedLayers.length]=this;
break;
}
}
}
this.bInScale=_d72;
this.bOTDF=this.parameters.getParameter("otdf","boolean",false);
this.sOTDFPath=this.parameters.getParameter("otdfpath","string","");
this.bSelectedDefault=this.bSelected;
this.bInList=true;
this.featureType="";
this.loaded=false;
this.minScale=null;
this.maxScale=null;
this.tlLatitude=0;
this.tlLongitude=0;
this.brLatitude=0;
this.brLongitude=0;
this.envelopeLL=null;
this.envelope=null;
this.coordSys=new SIX.CoordSys();
this.aSupportedCoordinateSystems=new Array();
this.aColorsToMask=new Array();
this.sColorMask="";
this.aImageRegion=new Array();
this.aLayers=new Array();
this.aClipRegion=new Array();
this.clipRegionEnvelope=null;
this._sClipRegion="";
this.MAX_CLIP_REGION_LENGTH=SIX.App.isIE?1800:Number.MAX_VALUE;
this.imgListButtonOff=null;
this.imgListButtonOn=null;
this.imgListButtonDisabledOff=null;
this.imgListButtonDisabledOn=null;
var _d75=this.parentLayer;
var _d76=0;
while(_d75!=null){
_d76++;
_d75=_d75.parentLayer;
}
this.nListState=this.service.bShowNestedLayers?(_d76<this.service.nNumLayerLevelsExpanded?SIX.eListState.EXPANDED:SIX.eListState.COLLAPSED):SIX.eListState.NONE;
this.hCallbackManagers=new SIX.Hash();
if(this.service.hLayerCallbackManagers.hasItem(id)){
this.hCallbackManagers=this.service.hLayerCallbackManagers.getItem(id);
for(var i in this.hCallbackManagers.items){
if(this.hCallbackManagers.items.hasOwnProperty(i)){
var _d77=this.hCallbackManagers.getItem(i);
for(var j=0;j<_d77.aCallbacks.length;j++){
var _d79=_d77.aCallbacks[j];
_d79.object=this;
}
}
}
}
};
SIX.Layer.prototype.setParentSelection=function(){
this.bSelected=this.bAllChildrenSelected();
var _d7a=this.bNoChildrenSelected();
var _d7b=(!this.bSelected&&!_d7a)?true:false;
this.bSelectedDisabled=_d7b;
var _d7c=document.getElementById(this.visibilityUnselectedEnabledUid);
if(_d7c){
_d7c.style.display=_d7a?"inline":"none";
}
var _d7d=document.getElementById(this.visibilitySelectedEnabledUid);
if(_d7d){
_d7d.style.display=this.bSelected?"inline":"none";
}
var _d7e=document.getElementById(this.visibilityUnselectedDisabledUid);
if(_d7e){
_d7e.style.display="none";
}
var _d7f=document.getElementById(this.visibilitySelectedDisabledUid);
if(_d7f){
_d7f.style.display=_d7b?"inline":"none";
}
if(this.parentLayer){
this.parentLayer.setParentSelection();
}
};
SIX.Layer.prototype.bAllChildrenSelected=function(){
for(var i=0;i<this.aLayers.length;i++){
if(!this.aLayers[i].bAllChildrenSelected()){
return false;
}
}
if(this.aLayers.length==0){
return this.bSelected;
}else{
return true;
}
};
SIX.Layer.prototype.bNoChildrenSelected=function(){
for(var i=0;i<this.aLayers.length;i++){
if(this.aLayers[i].bSelectedDisabled||!this.aLayers[i].bNoChildrenSelected()){
return false;
}
}
if(this.aLayers.length==0){
return !this.bSelected;
}else{
return true;
}
};
SIX.Layer.prototype.executeCallbacks=function(_d82){
if(this.hCallbackManagers.hasItem(_d82)){
var _d83=this.hCallbackManagers.getItem(_d82);
var _d84=arguments.length>1?Array.prototype.slice.call(arguments,1,arguments.length):new Array();
_d83.executeCallbacks.apply(_d83,_d84);
}
};
SIX.Layer.prototype.addCallback=function(_d85,_d86,data){
var _d88=this.hCallbackManagers.hasItem(_d85)?this.hCallbackManagers.getItem(_d85):new SIX.CallbackManager();
_d88.addCallback(new SIX.Callback(this,_d86,(arguments.length>=3?data:null)));
this.hCallbackManagers.setItem(_d85,_d88);
};
SIX.Layer.prototype.addLayer=function(_d89){
this.aLayers[this.aLayers.length]=_d89;
this.service.allLayers[this.service.allLayers.length]=_d89;
if(this.service.aLayerMetadataUrls[_d89.id]){
_d89.setMetadataUrl(this.service.aLayerMetadataUrls[_d89.id]);
}
return _d89;
};
SIX.Layer.prototype.containsPoint=function(_d8a){
var _d8b=true;
if(this.envelopeLL&&!this.envelopeLL.containsPoint(_d8a)){
_d8b=false;
}else{
if(this.aImageRegion.length){
_d8b=false;
for(var i=0;i<this.aImageRegion.length;i++){
if(SIX.Util.inRegion(this.aImageRegion[i],_d8a)){
_d8b=true;
break;
}
}
}
}
return _d8b;
};
SIX.Layer.prototype.containsPoints=function(_d8d){
var _d8e=true;
if(this.envelopeLL){
_d8e=this.envelopeLL.containsPoints(_d8d);
}
if(_d8e&&this.aImageRegion.length){
_d8e=false;
for(var i=0;i<this.aImageRegion.length;i++){
_d8e=SIX.Util.pointsInRegion(this.aImageRegion[i],_d8d);
if(_d8e){
break;
}
}
}
return _d8e;
};
SIX.Layer.prototype.setColorMask=function(_d90,_d91,_d92){
this.aColorsToMask=_d90;
this.sColorMask=_d91;
var _d93=1;
if((typeof _d92[0]=="object")&&(_d92[0].constructor==Array)){
_d93=2;
if((typeof _d92[0][0]=="object")&&(_d92[0][0].constructor==Array)){
_d93=3;
}
}
switch(_d93){
case 1:
if(_d92&&(_d92.length>=3)){
this.aImageRegion[0]=new Array();
this.aImageRegion[0][0]=_d92;
}
break;
case 2:
if(_d92&&(_d92.length>=3)){
this.aImageRegion[0]=new Array();
for(var i=0;i<_d92.length;i++){
var _d95=new SIX.Point(_d92[i][0],_d92[i][1]);
this.aImageRegion[0][i]=_d95;
}
}
break;
case 3:
for(var i=0;i<_d92.length;i++){
this.aImageRegion[i]=new Array();
if(_d92[i]&&(_d92[i].length>=3)){
for(var j=0;j<_d92[i].length;j++){
var _d95=new SIX.Point(_d92[i][j][0],_d92[i][j][1]);
this.aImageRegion[i][j]=_d95;
}
}
}
break;
default:
break;
}
};
SIX.Layer.prototype.setExtents=function(_d97,_d98,_d99,_d9a){
this.bCalculateExtents=false;
this.tlLatitude=_d97;
this.tlLongitude=_d98;
this.brLatitude=_d99;
this.brLongitude=_d9a;
this.envelopeLL=new SIX.Envelope(_d98,_d99,_d9a,_d97);
this.envelope=null;
};
SIX.Layer.prototype.setClipRegion=function(_d9b){
var _d9c=1;
if((typeof _d9b[0]=="object")&&(_d9b[0].constructor==Array)){
_d9c=2;
}
switch(_d9c){
case 1:
if(_d9b&&(_d9b.length>=3)){
this.aClipRegion=_d9b;
var _d9d=_d9b[0].x;
var _d9e=_d9b[0].y;
var _d9f=_d9b[0].x;
var _da0=_d9b[0].y;
for(var i=0;i<this.aClipRegion.length;i++){
var _da2=this.aClipRegion[i];
_d9d=Math.min(_da2.x,_d9d);
_d9e=Math.min(_da2.y,_d9e);
_d9f=Math.max(_da2.x,_d9f);
_da0=Math.max(_da2.y,_da0);
}
}
break;
case 2:
if(_d9b&&(_d9b.length>=3)){
var _d9d=_d9b[0][0];
var _d9e=_d9b[0][1];
var _d9f=_d9b[0][0];
var _da0=_d9b[0][1];
this.aClipRegion=new Array();
for(var i=0;i<_d9b.length;i++){
var _da2=new SIX.Point(_d9b[i][0],_d9b[i][1]);
this.aClipRegion[i]=_da2;
_d9d=Math.min(_da2.x,_d9d);
_d9e=Math.min(_da2.y,_d9e);
_d9f=Math.max(_da2.x,_d9f);
_da0=Math.max(_da2.y,_da0);
}
this.clipRegionEnvelope=new SIX.Envelope(_d9d,_d9e,_d9f,_da0);
}
break;
default:
break;
}
this._sClipRegion="";
};
SIX.Layer.prototype.getLayerByName=function(_da3){
if(this.name==_da3){
return this;
}
for(var i=0;i<this.aLayers.length;i++){
var _da5=this.aLayers[i].getLayerByName(_da3);
if(_da5!=null){
return _da5;
}
}
return null;
};
SIX.Layer.prototype.getClipRegionStr=function(){
if(this._sClipRegion==""){
var _da6="";
var _da7="";
for(var i=0;i<this.aClipRegion.length;i++){
var _da9=this.aClipRegion[i];
_da6+=(_da6!=""?",":"")+_da9.x+","+_da9.y;
_da7+=(_da7!=""?",":"")+Math.round(_da9.x)+","+Math.round(_da9.y);
}
if(_da6.length>this.MAX_CLIP_REGION_LENGTH){
_da6=_da7;
}
if(_da6.length<=this.MAX_CLIP_REGION_LENGTH){
this._sClipRegion=_da6;
}
}
return this._sClipRegion;
};
SIX.Layer.prototype.setMetadataUrl=function(_daa){
this.sMetadataUrl=_daa;
};
SIX.Layer.prototype.setScale=function(_dab,_dac){
this.minScale=_dab;
this.maxScale=_dac;
};
SIX.Layer.prototype.hasScale=function(){
return (this.minScale!=null||this.maxScale!=null);
};
SIX.Layer.prototype.setCoordSys=function(){
if((arguments.length==1)&&(typeof arguments[0]=="object")&&(arguments[0].constructor==SIX.CoordSys)){
var _dad=arguments[0];
this.coordSys=_dad.clone(this.coordSys);
}else{
if((arguments.length==2)&&(typeof arguments[0]=="string")&&(typeof arguments[1]=="string")){
var _dae=arguments[0];
var _daf=arguments[1];
this.coordSys.setDatum(_dae);
this.coordSys.setProjection(_daf);
}
}
this.envelope=null;
};
SIX.Layer.prototype.setSupportedCoordSys=function(){
var _db0=new SIX.CoordSys();
if((arguments.length==1)&&(typeof arguments[0]=="object")&&(arguments[0].constructor==SIX.CoordSys)){
_db0=arguments[0].clone(_db0);
}else{
if((arguments.length==2)&&(typeof arguments[0]=="string")&&(typeof arguments[1]=="string")){
var _db1=arguments[0];
var _db2=arguments[1];
_db0.setDatum(_db1);
_db0.setProjection(_db2);
}
}
if(_db0.initialized()&&!this.supportsCoordSys(_db0)){
this.aSupportedCoordinateSystems[this.aSupportedCoordinateSystems.length]=_db0;
}
};
SIX.Layer.prototype.supportsCoordSys=function(_db3){
var _db4=false;
for(var i=0;i<this.aSupportedCoordinateSystems.length;i++){
var _db6=this.aSupportedCoordinateSystems[i];
if(_db6.initialized()&&_db3.initialized()&&_db3.equals(_db6)){
_db4=true;
break;
}
}
return _db4;
};
SIX.Layer.prototype.setSelected=function(_db7){
this.bSelected=_db7;
for(var i=0;i<this.aLayers.length;i++){
var _db9=this.aLayers[i];
_db9.setSelected(_db7);
}
if(this.service.bShowNestedLayers){
if(this.aLayers.length>0){
this.setParentSelection();
}else{
if(this.parentLayer){
this.parentLayer.setParentSelection();
}
}
}
if(this.service.bGroupLayersByName){
for(var i=0;i<this.aGroupedLayers.length;i++){
var _dba=this.aGroupedLayers[i];
if(_dba!=this&&_dba.name==this.name){
_dba.setSelected(_db7);
}
}
}
};
SIX.Layer.prototype.setListButton=function(_dbb){
this.imgListButtonOff=new Image();
this.imgListButtonOff.src=_dbb+".gif";
this.imgListButtonOn=new Image();
this.imgListButtonOn.src=_dbb+"_on.gif";
this.imgListButtonDisabledOff=new Image();
this.imgListButtonDisabledOff.src=_dbb+"_disabled.gif";
this.imgListButtonDisabledOn=new Image();
this.imgListButtonDisabledOn.src=_dbb+"_disabled_on.gif";
};
SIX.Layer.prototype.expandCollapse=function(){
this.nListState=this.nListState==SIX.eListState.EXPANDED?SIX.eListState.COLLAPSED:SIX.eListState.EXPANDED;
var _dbc=document.getElementById(this.childLayersListExpandCollapseUid);
if(_dbc){
_dbc.src=SIX.App.imageUrl("images/"+(this.nListState==SIX.eListState.COLLAPSED?"plus":"minus"));
}
var _dbd=document.getElementById(this.childLayersListUid);
if(_dbd){
_dbd.style.display=this.nListState==SIX.eListState.COLLAPSED?"none":"";
}
};
SIX.Layer.prototype.build=function(){
if(!this.bInList||this.bNeverInList){
return "";
}
var svc=this.service;
var _dbf=0;
var _dc0=this.parentLayer;
while(_dc0!=null){
_dbf++;
_dc0=_dc0.parentLayer;
}
var _dc1=0;
var _dc2=false;
for(var i=0;i<svc.aHiddenLayerLevels.length;i++){
if(svc.aHiddenLayerLevels[i]==_dbf){
_dc2=true;
}else{
if(svc.aHiddenLayerLevels[i]<_dbf){
_dc1++;
}
}
}
var _dc4=svc.attachWin;
if(!_dc4){
var _dc5=svc.parentService;
while(_dc5&&_dc5.parentService){
_dc5=_dc5.parentService;
}
_dc4=_dc5.attachWin;
}
var _dc6=this.nListState==SIX.eListState.COLLAPSED;
var _dc7=this.nListState==SIX.eListState.EXPANDED;
var _dc8=" onclick='"+this.myself+".expandCollapse(); return false;' ";
var _dc9=(svc.layersList.length&&this==svc.layersList[0])?true:false;
svc.updateListLayer(this);
var _dca=((this.bInScale&&(!svc.bDisplayBest||!svc.bDisplayBestDisableListLayers))||(svc.bDisplayBest&&this.bSelected));
var _dcb="style='display:"+(this.bSelected?"none":"inline")+"'";
var _dcc="style='display:"+(!this.bSelected?"none":"inline")+"'";
var _dcd="style='display:none;'";
var _dce=(this.bInScale&&!this.bSelected&&(!this.bDisplayBest||(this.nBestIndex<0)));
var _dcf=(this.bInScale&&this.bSelected&&(!this.bDisplayBest||(this.nBestIndex<0)));
var _dd0=((!this.bInScale&&!this.bSelected)||(this.bDisplayBest&&(this.nBestIndex>=0)&&!this.bSelected));
var _dd1=((!this.bInScale&&this.bSelected)||(this.bDisplayBest&&(this.nBestIndex>=0)&&this.bSelected));
var _dd2=_dc9&&!(svc.bDisplayBestCheckbox&&svc.bDisplayBestInLayersList);
if(this.aLayers.length>0&&this.nListState!=SIX.eListState.NONE){
var _dd3=this.bAllChildrenSelected();
var _dd4=this.bNoChildrenSelected();
var _dd5=(!this.bSelected&&!_dd4)?true:false;
_dcf=_dd3;
_dce=_dd4;
_dd1=_dd5;
_dd0=false;
}
var _dd6=new Array();
if(!_dc2){
_dd6.push("<li class='nested' style='white-space:nowrap"+(_dd2?";border-top-width:0px'":"")+"'>");
if(_dc4&&_dc4.attachObject.length>1){
_dd6.push("<img class='subPaneIndent' "+SIX.App.imageSrc("images/transparent")+">");
}
_dd6.push("<img class='layerIndent' "+SIX.App.imageSrc("images/transparent")+">");
for(var i=0;i<(_dbf-_dc1);i++){
_dd6.push("<span class='childLayerIndent'>&nbsp;</span>");
}
if(this.nListState!=SIX.eListState.NONE){
if(this.aLayers.length){
_dd6.push("<img id='"+this.childLayersListExpandCollapseUid+"' "+_dc8+" alt='' title='' class='expandCollapse' "+SIX.App.imageSrc("images/"+(this.nListState==SIX.eListState.COLLAPSED?"plus":"minus"))+">");
}else{
_dd6.push("<img alt='' title='' style='visibility:hidden' class='expandCollapse' "+SIX.App.imageSrc("images/plus")+">");
}
}
var _dd7=" onclick='"+svc.myself+".layerVisible("+this.myself+")' ";
if(this.imgListButtonOff&&this.imgListButtonOn&&this.imgListButtonDisabledOff&&this.imgListButtonDisabledOn){
_dd6.push("<img class='layerButton' src='"+this.imgListButtonOff.src+"' alt='Visibility' title='Visibility' id='"+this.visibilityUnselectedEnabledUid+"' "+_dd7+(_dce?"":"style='display:none'")+">"+"<img class='layerButton' src='"+this.imgListButtonOn.src+"' alt='Visibility' title='Visibility' id='"+this.visibilitySelectedEnabledUid+"' "+_dd7+(_dcf?"":"style='display:none'")+">"+"<img class='layerButton' src='"+this.imgListButtonDisabledOff.src+"' alt='Visibility' title='Visibility' id='"+this.visibilityUnselectedDisabledUid+"' "+_dd7+(_dd0?"":"style='display:none;'")+">"+"<img class='layerButton' src='"+this.imgListButtonDisabledOn.src+"' alt='Visibility' title='Visibility' id='"+this.visibilitySelectedDisabledUid+"' "+_dd7+(_dd1?"":"style='display:none;'")+">");
}else{
var _dd8=svc.bLayerRadioGroup?"radio":"tick";
_dd6.push("<img class='layerButton' "+SIX.App.imageSrc("images/"+_dd8+((this.sColor!="")?"_no_border":""))+" alt='Visibility' title='Visibility' id='"+this.visibilityUnselectedEnabledUid+"' "+_dd7+((this.sColor!="")?("border='2' style='border-color:"+this.sColor+(_dce?"":";display:none")+"'"):(_dce?"":"style='display:none;'"))+">"+"<img class='layerButton' "+SIX.App.imageSrc("images/"+_dd8+((this.sColor!="")?"_no_border_on":"_on"))+" alt='Visibility' title='Visibility' id='"+this.visibilitySelectedEnabledUid+"' "+_dd7+((this.sColor!="")?("border='2' style='border-color:"+this.sColor+(_dcf?"":";display:none")+"'"):(_dcf?"":"style='display:none;'"))+">"+"<img class='layerButton' "+SIX.App.imageSrc("images/"+_dd8+"_disabled")+" alt='Visibility' title='Visibility' id='"+this.visibilityUnselectedDisabledUid+"' "+_dd7+(_dd0?"":"style='display:none;'")+">"+"<img class='layerButton' "+SIX.App.imageSrc("images/"+_dd8+"_on_disabled")+" alt='Visibility' title='Visibility' id='"+this.visibilitySelectedDisabledUid+"' "+_dd7+(_dd1?"":"style='display:none;'")+">");
if(!this.parentLayer&&svc.bCanReorder){
_dd6.push("<img class='layerButton' "+SIX.App.imageSrc("images/"+(_dc9?"up":"up_on"))+" onclick='if(!"+svc.myself+".bDisplayBest)"+svc.myself+".reorderLayer("+this.myself+")'"+" alt='Move layer up' title='Move layer up' name='"+this.upUid+"'>");
}
if(svc.bMetadata){
_dd6.push("<img class='layerButton' name='"+this.metadataUid+"' id='"+this.metadataUid+"' onclick='"+svc.myself+".layerMeta("+this.myself+")' "+SIX.App.imageSrc("images/info")+" alt='Display layer metadata' title='Display layer metadata' border='0' "+(this.sMetadataUrl==""?" style='visibility:hidden'":"")+">");
}
_dd6.push("<span onclick='"+this.myself+".zoomTo()' title='Click to zoom to layer'\t>");
_dd6.push("<span id='"+this.nameDisabledUid+"' class='layerTitleDisabled'"+(_dca?" style='display:none'":"")+">"+this.name+"</span>");
_dd6.push("<span id='"+this.nameEnabledUid+"' class='layerTitle'"+(_dca?"":" style='display:none'")+">"+this.name+"</span>");
_dd6.push("</span>");
}
}
if(this.aLayers.length>0&&this.nListState!=SIX.eListState.NONE){
if(!_dc2){
_dd6.push("<ul id='"+this.childLayersListUid+"' class='nested'"+(this.nListState==SIX.eListState.EXPANDED?"":" style='display:none'")+">");
}
for(var i=0;i<this.aLayers.length;i++){
_dd6.push(this.aLayers[i].build());
}
if(!_dc2){
_dd6.push("</ul>");
}
}
_dd6.push("</li>");
var _dd9=_dd6.join("");
return (_dd9);
};
SIX.Layer.prototype.zoomTo=function(){
this.service.catalog.maps[0].getTopMap().setExtents(this.tlLatitude,this.tlLongitude,this.brLatitude,this.brLongitude);
};
SIX.RequestResponse=function(_dda,sUrl,_ddc,_ddd,_dde,_ddf,_de0,_de1,_de2,_de3){
this.uid=SIX.Uid.getUid("RequestResponse");
this.sLayerName=_dda;
this.sUrl=sUrl;
this.sBody=SIX.Util.escapeMarkup(_ddc);
this.sAction=_ddd;
this.dTopLeftX=_dde;
this.dTopLeftY=_ddf;
this.dBottomRightX=_de0;
this.dBottomRightY=_de1;
this.response=(typeof _de2=="string")?SIX.Util.escapeMarkup(_de2):_de2;
this.nStatus=_de3;
this.date=new Date();
this.nTimeStamp=this.date.getTime();
};
SIX.RequestResponse.prototype.getConsoleMessage=function(){
var _de4=((this.nStatus==SIXConfig.eRequestResponseStatus.SUCCESS)?"SUCCESS: ":"ERROR: ")+this.sUrl;
var _de5="<b>Request URL</b><br>"+this.sUrl+"<br><br>";
_de5+="<b>Request status</b><br>"+aRequestResponseStatus[this.nStatus].sSummary+"<br><br>";
if(this.sBody&&this.sBody!=""){
_de5+="<b>Request body</b><br>"+this.sBody+"<br><br>";
}
if(this.response){
_de5+="<b>Response</b><br>"+this.response;
}
var _de6=new SIX.ConsoleMessage(_de4,_de5,this);
return _de6;
};
SIX.Statistics=function(svc){
SIX.addRef(this);
this.uid=SIX.Uid.getUid("statistics");
this.service=svc;
this.aAllRequests=new Array();
this.aRequestsByType=new Object();
};
SIX.Statistics.prototype.addRequestResponse=function(_de8){
var _de9="#"+_de8.nStatus;
if(!this.aRequestsByType[_de9]){
this.aRequestsByType[_de9]=new Array();
}
var _dea=this.aRequestsByType[_de9];
_dea[_dea.length]=_de8;
this.aAllRequests[this.aAllRequests.length]=_de8;
if(this.service.parentService){
var _deb=this.service.parentService;
if(!_deb.statistics.aRequestsByType[_de9]){
_deb.statistics.aRequestsByType[_de9]=new Array();
}
var _dea=_deb.statistics.aRequestsByType[_de9];
_dea[_dea.length]=_de8;
_deb.statistics.aAllRequests[_deb.statistics.aAllRequests.length]=_de8;
}
};
SIX.Service=function(name,_ded,host,_def,_df0){
SIX.addRef(this);
this.uid=SIX.Uid.getUid("service");
SIX.aUidToObject[this.uid]=this;
this.name=name;
this.parentService=null;
this.catalog=null;
this.parameters=new SIX.Parameters(_df0?_df0:"");
this.transparency=this.parameters.getParameter("transparency","number",100)/100;
if(this.transparency<0||this.transparency>1){
this.transparency=0;
}
this.active=this.parameters.getParameter("active","boolean",true);
this.hidden=this.parameters.getParameter("hidden","boolean",false);
this.bHiddenSlider=this.parameters.getParameter("hiddenslider","boolean",false);
this.bAlwaysOn=this.parameters.getParameter("alwayson","boolean",false);
this.bCanShowHideUnselectedLayers=this.parameters.getParameter("canshowhideunselectedlayers","boolean",false);
this.bFeatureServer=this.parameters.getParameter("featureserver","boolean",false);
this.bDisplayBestCheckbox=this.parameters.getParameter("displaybest","boolean",false);
this.bDisplayBestInLayersList=this.parameters.getParameter("displaybestinlayerslist","boolean",false);
this.bDisplayBest=this.bDisplayBestCheckbox;
this.bLayersOutOfScaleEnabled=this.parameters.getParameter("layersoutofscaleenabled","boolean",false);
this.bLayersOutsideExtentsEnabled=this.parameters.getParameter("layersoutsideextentsenabled","boolean",false);
this.bColoredLayers=this.parameters.getParameter("coloredlayers","boolean",false);
this.bLayerRadioGroup=this.parameters.getParameter("layerradiogroup","boolean",false);
this.sBackgroundColor=this.parameters.getParameter("backgroundcolor","string",null);
this.bBackgroundTransparency=this.parameters.getParameter("backgroundtransparency","boolean",false);
this.bCanReproject=this.parameters.getParameter("canreproject","boolean",true);
this.bGroupLayersByName=this.parameters.getParameter("grouplayersbyname","boolean",false);
this.bShowNestedLayers=this.parameters.getParameter("shownestedlayers","boolean",false);
this.nNumLayerLevelsExpanded=this.parameters.getParameter("numlayerlevelsexpanded","number",0);
this.aHiddenLayerLevels=new Array();
var _df1=this.parameters.getParameter("hiddenlayerlevels","string",null);
if(_df1){
var _df2=_df1.split(",");
for(var i=0;i<_df2.length;i++){
this.aHiddenLayerLevels[i]=parseInt(_df2[i]);
}
}
this.bDummy=this.parameters.getParameter("dummy","boolean",false);
this.sCopyright="";
this.aSupportedEPSGCodes=null;
this.aUnsupportedEPSGCodes=null;
if(typeof _ded=="string"&&typeof host=="string"){
for(var i=0;i<SIXConfig.aUnsupportedEPSGCodes.length;i++){
var _df4=SIXConfig.aUnsupportedEPSGCodes[i][0];
var _df5=SIXConfig.aUnsupportedEPSGCodes[i][1];
var _df6=SIXConfig.aUnsupportedEPSGCodes[i][2];
if(_df4.toLowerCase()==host.toLowerCase()&&_df5.toLowerCase()==_ded.toLowerCase()){
this.setUnsupportedEPSGCodes(_df6);
break;
}
}
}
this.tlLatitude=90;
this.tlLongitude=-180;
this.brLatitude=-90;
this.brLongitude=180;
this.aServices=new Array();
this.host=host;
this.service=_def;
this.nDefaultDPI=96;
this.nMaxMapSize=1048576;
this.transparencyDefault=this.transparency;
this.loaded=false;
this.layers=new Array();
this.allLayers=new Array();
this.layersOrder=new Array();
this.layersIndices=new Object();
this.aLayerZIndices=new Array();
this.layersList=new Array();
this.oldLayersList=new Array();
this.bRebuildLayersList=true;
this.bFilterDefaultLayersInList=false;
this.bFilterIgnoreDefaultLayerSelections=false;
this.bFilterDefaultLayersSelected=false;
this.aLayerExactMatchFilters=new Array();
this.aLayerPartialMatchFilters=new Array();
this.aExcludedLayers=new Array();
this.aLayerNameAliases=new Array();
this.isOnline=true;
this.isBusy=false;
this.activeUid=SIX.Uid.getUid("active");
this.busyUid=SIX.Uid.getUid("busy");
this.listUid=SIX.Uid.getUid("list");
this.upUid=SIX.Uid.getUid("up");
this.activeUid2=SIX.Uid.getUid("active");
this.busyUid2=SIX.Uid.getUid("busy");
this.listUid2=SIX.Uid.getUid("list");
this.displayBestSelectedUid=SIX.Uid.getUid("displaybest");
this.displayBestUnselectedUid=SIX.Uid.getUid("displaybest");
this.bLayersBuilt=false;
this.bHideOutOfScaleLayers=false;
this.bShowUnselectedLayers=true;
this.sShowHiddenLayersLabel="Show hidden layers";
this.sHideUnselectedLayersLabel="Hide unselected layers";
this.sShowHideUnselectedLayersLabel=this.sHideUnselectedLayersLabel;
this.showHideUnselectedLayersUid=SIX.Uid.getUid("showHideUnselectedLayers");
this.sliderUid=SIX.Uid.getUid("slider");
this.ptrUid=SIX.Uid.getUid("slider");
this.sliderLabelUid=SIX.Uid.getUid("sliderLabel");
this.sliderLabelDisabledUid=SIX.Uid.getUid("sliderLabelDisabled");
this.bSliderEnabled=true;
this.nSliderPointerLeft=-1;
this.sliderX=0;
this.tabUids=new Array(4);
this.tabUids[0]=SIX.Uid.getUid("tab0");
this.tabUids[1]=SIX.Uid.getUid("tab1");
this.tabUids[2]=SIX.Uid.getUid("tab2");
this.tabUids[3]=SIX.Uid.getUid("tab3");
this.currentTab=0;
this.searchUid=SIX.Uid.getUid("search");
this.searches=new Array();
this.currentSearch=-1;
this.bSortSearch=false;
this.tGISOverlaySetVisible=null;
this.queries=null;
this.reportsQueries=null;
this.nMapLoadState=SIX.eMapLoadState.NOT_LOADED;
this.nLayersLoadState=SIX.eLayersLoadState.NOT_LOADED;
this.colors=new Object();
this.colorMask=0;
this.nNumConsecutiveLoadLayersFailed=0;
this.tLoadLayers=null;
var _df7=SIX.Access;
for(var name in SIX.Access){
if(SIX.Access.hasOwnProperty(name)&&name.toLowerCase()==_ded.toLowerCase()){
_df7=SIX.Access[name];
break;
}
}
this.access=new _df7(this);
this.bMetadata=this.parameters.getParameter("metadata","boolean",this.access.hasMetadata);
this.aLayerMetadataUrls=new Object();
if(!(this.access instanceof SIX.Access.ECWP)&&((this.host==null)||(this.host==""))&&((this.service==null)||(this.service==""))){
this.bCanReorder=false;
}else{
this.bCanReorder=this.parameters.getParameter("canreorder","boolean",this.access.canReorder);
}
this.attachWin=0;
this.legendUrl="";
this.queryText="";
this.bChangeSearch=false;
this.statistics=new SIX.Statistics(this);
SIX.App.addMouseAction(this.sliderUid,this,5,true);
SIX.App.addMouseAction(this.ptrUid,this,5,true);
this.aFeatureLimitedLayers=new Array();
this.childServicesSlider=null;
this.tSetChildServicesTransparenciesTimeout=null;
this.tSetChildServicesTransparenciesInterval=null;
this.hCallbackManagers=new SIX.Hash();
this.hLayerCallbackManagers=new SIX.Hash();
this.aAttachedServices=new Array();
this.aServicesAttachedTo=new Array();
this.fnOnBeforeQueries=null;
};
SIX.Service.prototype.performQueries=function(map){
if(this.fnOnBeforeQueries){
this.fnOnBeforeQueries(map);
}
if(this.loaded&&this.queries&&this.queries.aQueries.length){
this.access.queryLayers(map);
}
};
SIX.Service.prototype.addFeatureLimitedLayer=function(_df9,_dfa,_dfb,_dfc,_dfd){
featureLimitedLayer=new SIX.FeatureLimitedLayer(this,_df9,_dfa,_dfb,_dfc,_dfd);
this.aFeatureLimitedLayers[this.aFeatureLimitedLayers.length]=featureLimitedLayer;
return featureLimitedLayer;
};
SIX.FeatureLimitedLayer=function(svc,_dff,_e00,_e01,_e02,_e03){
this.service=svc;
if(_dff.length!=_e00.length){
alert("LayerIds array must be same size as MaxFeatures array");
}
this.aLayerIds=_dff;
this.aMaxFeatures=_e00;
this.aLayers=new Array();
this.aLayerIndices=new Array();
this.databaseTable=_e01;
var _e04=0;
for(var i=0;i<_e00.length;i++){
if(_e00[i]>_e04){
_e04=_e00[i];
}
}
this.maxFeatures=_e04;
this.minScale=_e02?_e02:0;
this.maxScale=_e03?_e03:1000000;
};
var FeatureCountRendererLocal=new Object();
FeatureCountRendererLocal.cache=new Object();
FeatureCountRendererLocal.callbacks=new Object();
FeatureCountRendererLocal.getNumFeaturesLimited=function(_e06,x1,y1,x2,y2,_e0b,_e0c){
var _e0d=_e06+x1+x2+y1+y2;
if(this.cache[_e0d]&&this.cache[_e0d].maxFeatures>=_e0b){
_e0c(this.cache[_e0d].numFeatures);
}else{
if(this.callbacks[_e0d]){
var _e0e=this.callbacks[_e0d];
_e0e[_e0e.length]=_e0c;
}else{
this.callbacks[_e0d]=new Array();
FeatureCountRenderer.getNumFeaturesLimited(_e06,x1,y1,x2,y2,_e0b,_e0f);
}
}
var me=this;
function _e0f(_e11){
me.cache[_e0d]={numFeatures:_e11,maxFeatures:_e0b};
_e0c(_e11);
if(me.callbacks[_e0d]){
var _e12=me.callbacks[_e0d];
for(var i=0;i<_e12.length;i++){
var _e14=_e12[i];
_e14(_e11);
}
me.callbacks[_e0d]=null;
}
};
};
SIX.FeatureLimitedLayer.prototype.applyFeatureCount=function(map,_e16){
var svc=this.service;
var _e18=this;
if(!this.aLayers||this.aLayers.length==0){
return;
}
x1=map.getTopLeftLongitude();
y1=map.getTopLeftLatitude();
x2=map.getBottomRightLongitude();
y2=map.getBottomRightLatitude();
svc.nMapLoadState=SIX.eMapLoadState.LOADING;
if(typeof FeatureCountRenderer!="undefined"){
FeatureCountRendererLocal.getNumFeaturesLimited(this.databaseTable,x1,y1,x2,y2,this.maxFeatures,_e19);
}else{
_e19(this.maxFeatures);
}
function _e19(_e1a){
for(var i=0;i<_e18.aLayers.length;i++){
var _e1c=_e18.aLayers[i];
var _e1d=_e1c.bInScale;
_e1c.bInScale=_e1a<_e1c.maxFeatures;
if(_e1c.bInScale!=_e1d){
svc.updateListLayer(_e1c);
}
}
_e16();
};
};
SIX.Service.prototype.init=function(){
return "";
};
SIX.Service.prototype.clearLoadLayersTimer=function(){
if(this.tLoadLayers!=null){
clearTimeout(this.tLoadLayers);
this.tLoadLayers=null;
}
};
SIX.Service.prototype.addService=function(_e1e){
this.aServices[this.aServices.length]=_e1e;
_e1e.setParentService(this);
return _e1e;
};
SIX.Service.prototype.setParentService=function(_e1f){
this.parentService=_e1f;
if(_e1f.catalog){
this.setCatalog(_e1f.catalog);
}
};
SIX.Service.prototype.setCatalog=function(_e20){
this.catalog=_e20;
for(var i=0;i<this.aServices.length;i++){
this.aServices[i].setCatalog(_e20);
}
};
SIX.Service.prototype.getChildService=function(_e22){
var _e23=null;
if(this.aServices.length>_e22){
_e23=this.aServices[_e22];
}
return _e23;
};
SIX.Service.prototype.addLayer=function(_e24){
this.layersOrder[this.layersOrder.length]=this.layers.length;
this.layersIndices[_e24.uid]=this.layers.length;
this.layers[this.layers.length]=_e24;
this.allLayers[this.allLayers.length]=_e24;
this.nLayersLoadState=SIX.eLayersLoadState.LOADED;
if(this.aLayerMetadataUrls[_e24.id]){
_e24.setMetadataUrl(this.aLayerMetadataUrls[_e24.id]);
}
return _e24;
};
SIX.Service.prototype.addCallback=function(_e25,_e26,data){
var _e28=this.hCallbackManagers.hasItem(_e25)?this.hCallbackManagers.getItem(_e25):new SIX.CallbackManager();
_e28.addCallback(new SIX.Callback(this,_e26,(arguments.length>=3?data:null)));
this.hCallbackManagers.setItem(_e25,_e28);
};
SIX.Service.prototype.executeCallbacks=function(_e29){
if(this.hCallbackManagers.hasItem(_e29)){
var _e2a=this.hCallbackManagers.getItem(_e29);
var _e2b=arguments.length>1?Array.prototype.slice.call(arguments,1,arguments.length):new Array();
_e2a.executeCallbacks.apply(_e2a,_e2b);
}
};
SIX.Service.prototype.addLayerCallback=function(_e2c,_e2d,_e2e,data){
var _e30=this.hLayerCallbackManagers.hasItem(_e2c)?this.hLayerCallbackManagers.getItem(_e2c):new SIX.Hash();
var _e31=_e30.hasItem(_e2d)?_e30.getItem(_e2d):new SIX.CallbackManager();
_e31.addCallback(new SIX.Callback(null,_e2e,(arguments.length>=4?data:null)));
_e30.setItem(_e2d,_e31);
this.hLayerCallbackManagers.setItem(_e2c,_e30);
};
SIX.Service.prototype.addSearch=function(_e32){
this.searches[this.searches.length]=_e32;
return _e32;
};
SIX.Service.prototype.addQueries=function(_e33){
this.queries=_e33;
return _e33;
};
SIX.Service.prototype.activateNoUpdate=function(_e34){
this.active=_e34;
var _e35="";
if(!this.isOnline){
_e35="_fail";
}else{
if(this.active){
_e35="_on";
}
}
var _e36=document[this.activeUid];
if(_e36){
_e36.src=SIX.App.imageUrl("images/tick"+_e35);
}
_e36=document[this.activeUid2];
if(_e36){
_e36.src=SIX.App.imageUrl("images/tick"+_e35);
}
};
SIX.Service.prototype.activate=function(){
this.activateNoUpdate(!this.active);
for(var i=0;i<this.catalog.maps.length;i++){
this.updateMap(this.catalog.maps[i]);
}
if(this.active){
this.setCurrent();
}
};
SIX.Service.prototype.update=function(){
if(this.attachWin&&this.currentTab!=2){
this.attachWin.build();
}
};
SIX.Service.prototype.buildFixed=function(){
if(!this.attachWin){
return "";
}
var _e38="";
var _e39=2;
var html="<table class='"+this.attachWin.sServiceWindowContentsClass+"' border='0' cellpadding='"+_e39+"' cellspacing='0' width='100%'>";
if(!this.bAlwaysOn||!this.bHiddenSlider||(this.bDisplayBestCheckbox&&!this.bDisplayBestInLayersList)){
html+="<tr>";
if(!this.bAlwaysOn){
var _e3b="Turn map service on or off";
html+="<td><img"+SIX.App.imageSrc("images/tick"+(this.active?"_on":""))+" alt='"+_e3b+"' title='"+_e3b+"' name='"+this.activeUid2+"' "+"onclick='"+this.myself+".activate()'></td>";
}
if(this.bDisplayBestCheckbox&&!this.bDisplayBestInLayersList){
html+="<td>"+"<div class='displayBestContainer'>"+"<span class='displayBestLabel'>Best available</span>"+"<span class='displayBestCheckBox'>"+"<img"+SIX.App.imageSrc("images/tick")+" alt='Display best available images' title='Display best available images' id='"+this.displayBestUnselectedUid+"'"+" onclick='"+this.myself+".onSelectDisplayBest()' "+(this.bDisplayBest?"style='display:none;'":"")+">"+"<img"+SIX.App.imageSrc("images/tick_on")+" alt='Display best available images' title='Display best available images' id='"+this.displayBestSelectedUid+"'"+" onclick='"+this.myself+".onSelectDisplayBest()' "+(this.bDisplayBest?"":"style='display:none;'")+">"+"</span>"+"</div>"+"</td>";
}
var _e3c=false;
for(var i=0;i<this.layers.length;i++){
var _e3e=this.layers[i];
if(_e3e.bSelected&&_e3e.bInScale&&_e3e.nBestIndex<0&&!_e3e.bNeverInList){
_e3c=true;
break;
}
}
var _e3f="Change Transparency. HINT: Transparency only applies when two or more images are turned on.";
html+="<td>"+"<div class='sliderContainer' style='display:"+(this.bHiddenSlider?"none":"block")+"'>"+"<span id='"+this.sliderLabelUid+"' class='sliderLabel' "+((this.bDisplayBest&&!_e3c)?"style='display:none'":"")+">Transparency:</span>"+"<span id='"+this.sliderLabelDisabledUid+"' class='sliderLabelDisabled' "+((this.bDisplayBest&&!_e3c)?"":"style='display:none'")+">Transparency:</span>"+"<div class='slider'>";
html+="<img id='"+this.sliderUid+"' class='sliderBar' alt='"+_e3f+"' title='"+_e3f+"'"+SIX.App.imageSrc("images/"+(this.bDisplayBest&&!_e3c?"slider_line_disabled":"slider_line"))+">"+"<img id='"+this.ptrUid+"' alt='"+_e3f+"' title='"+_e3f+"' class='sliderPointer'"+(this.nSliderPointerLeft>=0?"style='left:"+this.nSliderPointerLeft+"px'":"")+SIX.App.imageSrc("images/"+(this.bDisplayBest&&!_e3c?"slider_ptr_disabled":"slider_ptr"))+">";
html+="</div></div></td></tr>";
}
if(this.bCanShowHideUnselectedLayers){
html+="<tr bgcolor='#CCCCCC'>"+"<td colspan='3'>"+"<input type='button' class='showHideUnselectedLayersButton' name='"+this.showHideUnselectedLayersUid+"' id='"+this.showHideUnselectedLayersUid+"'"+" value='"+this.sShowHideUnselectedLayersLabel+"'"+" onclick='"+this.myself+".showHideUnselectedLayers();'>"+"</td>"+"</tr>";
}
html+="</table>";
return html;
};
SIX.Service.prototype.buildLayers=function(){
if(!this.attachWin){
return "";
}
if((this.bGroupedService||(this.parentService&&this.parentService.bGroupedService))&&!this.aServices.length){
return "";
}
var html="";
if(this.layers.length){
var _e41=new Array();
this.oldLayersList=this.layersList;
this.layersList=new Array();
this.bRebuildLayersList=false;
var _e42=((this.attachWin&&(this.attachWin.attachObject.length>1))?"padding-left:20px;":"padding-left:5px;");
var _e43=(SIX.App.isIE?"style='color:inherit;'":"style='color:inherit;border-bottom: 2px solid white;'");
var _e44="style='"+(SIX.App.isIE?"color:inherit;border-bottom: 2px solid white;":"")+_e42+"color:inherit;background-color:inherit;'";
var _e45="style='"+(SIX.App.isIE?"color:inherit;border-bottom: 2px solid white;":"")+"color:inherit;background-color:inherit;'";
_e41.push("<table class='"+this.attachWin.sServiceWindowContentsClass+"' border='0' cellpadding='0' cellspacing='0' width='100%'>");
_e41.push("<tr><td><ul class='nested'>");
if(this.bDisplayBestCheckbox&&this.bDisplayBestInLayersList){
_e41.push("<li class='nested' style='white-space:nowrap;border-top-width:0px'>");
if(this.attachWin&&(this.attachWin.attachObject.length>1)){
_e41.push("<img class='subPaneIndent' "+SIX.App.imageSrc("images/transparent")+">");
}
_e41.push("<img class='layerIndent' "+SIX.App.imageSrc("images/transparent")+">");
if(this.bShowNestedLayers){
_e41.push("<img alt='' title='' style='visibility:hidden' class='expandCollapse' "+SIX.App.imageSrc("images/plus")+">");
}
_e41.push("<img class='layerButton' "+SIX.App.imageSrc("images/tick")+" alt='Display best available images' title='Display best available images' id='"+this.displayBestUnselectedUid+"'"+" onclick='"+this.myself+".onSelectDisplayBest()' "+(this.bDisplayBest?"style='display:none;'":"")+">"+"<img class='layerButton' "+SIX.App.imageSrc("images/tick_on")+" alt='Display best available images' title='Display best available images' id='"+this.displayBestSelectedUid+"'"+" onclick='"+this.myself+".onSelectDisplayBest()' "+(this.bDisplayBest?"":"style='display:none;'")+">");
if(this.bCanReorder){
_e41.push("<img class='layerButton' "+SIX.App.imageSrc("images/up")+" style='visibility:hidden' alt='' title='' border='0'>");
}
if(this.bMetadata){
_e41.push("<img class='layerButton' "+SIX.App.imageSrc("images/info")+" style='visibility:hidden' alt='' title='' border='0'>");
}
_e41.push("<span class='layerTitle'>Best available image layer</span>");
}
for(var i=0;i<this.layers.length;i++){
var _e47=this.layersOrder[i];
var _e48=this.layers[_e47];
if(!_e48.bInList||_e48.bNeverInList){
continue;
}
this.layersList[this.layersList.length]=_e48;
_e41.push(_e48.build());
}
_e41.push("</ul></td></tr>");
_e41.push("</table>");
if(this.oldLayersList.length!=this.layersList.length){
this.bRebuildLayersList=true;
}else{
for(var i=0;i<this.layersList.length;i++){
if(this.layersList[i]!=this.oldLayersList[i]){
this.bRebuildLayersList=true;
break;
}
}
}
html=_e41.join("");
}else{
if(this.nLayersLoadState==SIX.eLayersLoadState.LOADED){
html="";
}else{
html="<span class='legend'>&nbsp;&nbsp; Requesting "+this.name+" details...</span>";
}
}
if(this.childServicesSlider){
this.setChildServicesTransparencies();
return (this.childServicesSlider.build());
}else{
if(this.bGroupedService||(this.parentService&&this.parentService.bGroupedService)){
return "";
}else{
return html;
}
}
};
SIX.Service.prototype.deleteEcwpLayer=function(map,_e4a){
var _e4b=false;
if(this.access instanceof SIX.Access.ECWP){
var _e4c=document[map.uid];
if(_e4a.loaded){
var _e4d=_e4c.GetLayerIndex(_e4a.uid);
if(_e4d!=-1){
map.deleteLayer(_e4a.uid);
_e4b=true;
map.cacheEcwpLayer(_e4a);
}
_e4a.loaded=false;
if(_e4a.parentLayer){
_e4a.parentLayer.loaded=false;
}
}
for(var i=0;i<_e4a.aLayers.length;i++){
if(this.deleteEcwpLayer(map,_e4a.aLayers[i])){
_e4b=true;
}
}
}
return _e4b;
};
SIX.Service.prototype.deleteLayers=function(map){
if(this.access instanceof SIX.Access.ECWP){
for(var i=0;i<this.layers.length;i++){
this.deleteEcwpLayer(map,this.layers[i]);
}
}else{
for(var i=0;i<this.layers.length;i++){
delete this.layers[i];
delete this.layersOrder[i];
}
delete this.layersOrder;
delete this.layers;
delete this.layersIndices;
this.layersOrder=new Array();
this.layers=new Array();
this.layersIndices=new Object();
if(!this.aServices.length){
this.nLayersLoadState=SIX.eLayersLoadState.NOT_LOADED;
}
}
};
SIX.Service.prototype.sortLayers=function(a,b){
aa=a.name.toLowerCase();
bb=b.name.toLowerCase();
if(aa==bb){
return 0;
}
if(aa<bb){
return -1;
}
return 1;
};
SIX.Service.prototype.buildLegend=function(){
return this.legendUrl;
};
SIX.Service.prototype.buildSearch=function(){
if(!this.searches.length||(!this.access.hasSearch&&!this.bFeatureServer)){
return "No search available";
}else{
var txt="";
var _e54="";
if(this.catalog.attachWin!=this.attachWin){
if(this.searches.length>1){
txt+="<div id='"+this.attachWin.searchContainerUid+"' class='searchListContainer'>";
txt+="<form id='"+this.attachWin.searchFormUid+"' name='"+this.attachWin.searchFormUid+"'>";
txt+="<select name='"+this.searchUid+"' class='searchList' id='"+this.searchUid+"'"+" size="+this.searches.length+" onFocus='javascript:"+this.myself+".onFocusSearch()'"+" onChange='javascript:"+this.myself+".setCurrentSearch(this[this.selectedIndex].value)'>";
var _e55="";
var _e56="";
var _e57=true;
if(this.bSortSearch){
this.searches.sort(this.sortFunction);
}
for(var j=0;j<this.searches.length;j++){
if(this.access.hasGroupedSearch){
_e56=this.searches[j].optionDisplay;
}
if((this.access.hasGroupedSearch&&(_e55==_e56))||!this.access.hasGroupedSearch){
if(_e57&&!this.bChangeSearch||_e57&&this.currentSearch==-1){
this.currentSearch=j;
this.bChangeSearch=false;
_e57=false;
}
_e54+="<option value='"+this.searches[j].uid+"'";
if(j==this.currentSearch){
_e54+=" selected";
}
_e54+=">"+this.searches[j].name+"</option>";
}
}
if(_e54==""){
_e54+="<option value=''>No Searches Available for this selection</option>";
}
txt+=_e54;
txt+="</select>";
txt+="</form>";
txt+="</div>";
}else{
if(this.searches.length==1){
this.currentSearch=0;
txt+="<span class='searchTitle'>"+this.searches[this.currentSearch].name+"</span>";
}
}
if(!isNaN(this.currentSearch)&&this.currentSearch>-1){
txt+=this.searches[this.currentSearch].build();
}
}else{
if(!isNaN(this.currentSearch)&&this.currentSearch>-1){
if(!this.catalog||(this.catalog&&(this.catalog.currentSearchService==this))){
txt+=this.searches[this.currentSearch].build();
}
}
}
return txt;
}
};
SIX.Service.prototype.searchResponse=function(map){
var _e5a=this.searches[this.currentSearch];
if(_e5a.sResponseFunction){
eval(this.access.myself+"."+_e5a.sResponseFunction+"()");
}else{
this.access.searchResponse(map);
}
if(_e5a.bResetHiddenFieldsAfterFirstLoad){
for(var i=0;i<_e5a.fields.length;i++){
var _e5c=_e5a.fields[i];
if(_e5c.style=="hidden"){
_e5c.value="";
}
}
}
if(_e5a.bZoomToFirstFeature||_e5a.bZoomToFirstFeatureOnStartup){
if(_e5a.bGotResults){
_e5a.selectResult(0);
_e5a.bZoomToFirstFeatureOnStartup=false;
}
}
};
SIX.Service.prototype.sortFunction=function(_e5d,_e5e){
if(_e5d["name"]<_e5e["name"]){
retVal=-1;
}else{
if(_e5d["name"]>_e5e["name"]){
retVal=1;
}else{
retVal=0;
}
}
return retVal;
};
SIX.Service.prototype.getSearchIndex=function(_e5f){
var _e60=-1;
for(var i=0;i<this.searches.length;i++){
if(_e5f==this.searches[i]){
_e60=i;
break;
}
}
return _e60;
};
SIX.Service.prototype.moveSearch=function(_e62,_e63){
var _e64=false;
if((_e62>=0)&&(_e62<this.searches.length)&&(_e63>=0)&&(_e63<this.searches.length)){
var _e65=this.searches[_e62];
this.searches.splice(_e62,1);
this.searches.splice(_e63,0,_e65);
_e64=true;
}
return _e64;
};
SIX.Service.prototype.setCurrentSearch=function(_e66){
if(this.catalog.currentSearchService&&(this.catalog.currentSearchService.currentSearch>-1)){
var _e67=this.catalog.currentSearchService.searches[this.catalog.currentSearchService.currentSearch];
if(_e67.uid!=_e66){
_e67.resetForm();
}
}
for(var i=0;i<this.searches.length;i++){
var _e69=this.searches[i];
if(_e69.uid==_e66){
if(!((this.catalog.currentSearchService==this)&&(this.currentSearch==i))){
this.currentSearch=i;
this.bChangeSearch=true;
this.initializeCurrentSearch();
}
break;
}
}
};
SIX.Service.prototype.initializeCurrentSearch=function(){
if(this.currentSearch>-1){
var _e6a=this.searches[this.currentSearch];
this.catalog.currentSearchService=this;
if(_e6a.mapService&&_e6a.mapService.catalog){
_e6a.mapService.catalog.currentSearchService=this;
}
if(this.attachWin){
if(this.bFeatureServer||(this.currentTab==2)){
this.attachWin.build();
var _e6b=document.getElementById(_e6a.resultsField.uid);
if(_e6b){
ts_makeSortable(_e6b);
}
if(_e6a.bSubmitOnLoad){
var _e6c=document.forms[_e6a.uid];
if(_e6c){
_e6c.submit();
}
if(_e6a.bSubmitOnFirstLoadOnly){
_e6a.bSubmitOnLoad=false;
}
}
this.onFocusSearch();
}else{
this.setTab(2);
}
}
}
};
SIX.Service.prototype.onFocusSearch=function(){
if(this.attachWin&&(this.currentSearch>-1)){
if(!SIX.App.bDHTMLControl){
SIX.App.expandPane(this.attachWin);
}
var _e6d=this.searches[this.currentSearch];
_e6d.setFocusOnFirstField();
}
};
SIX.Service.prototype.buildQuery=function(){
if(this.queries&&this.queries.aQueries.length){
var _e6e=this.queries;
var _e6f=_e6e.queryWin;
if(_e6f){
var _e70=(_e6e.bExportColumn?true:false);
var _e71=(_e6e.sPrintFunction?true:false);
var _e72=Math.floor(100/_e6e.nNumColumns);
this.queryText="<div class='queryResultsOuter'><div class='queryResultsBackground'>&nbsp;</div>";
this.queryText+="<div id='"+_e6e.resultsContainerUid+"' class='queryResults'>";
this.queryText+="<table class='"+(_e6e.bColumnHeadings?"sortable":"queryResultsTable")+"' name='"+_e6e.uid+"' id='"+_e6e.uid+"'>";
if(_e6e.bColumnHeadings){
this.queryText+="<tr>"+"<td "+(SIX.App.isIE?"":"width='"+_e72+"%'")+" title='Click to sort' class='resultsHeadingsField'>"+"<span class='queryResultsWindowText'>"+_e6e.aColumnHeadings[0]+"</span>"+"</td>";
for(var i=1;i<=_e6e.nNumResultsColumns;i++){
this.queryText+="<td "+(SIX.App.isIE?"":"width='"+_e72+"%'")+" title='Click to sort' class='resultsHeadingsField'>"+"<span class='queryResultsWindowText'>"+_e6e.aColumnHeadings[i]+"</span>";
if(i==this.queries.nNumResultsColumns){
this.queryText+="<select id='"+_e6e.zoneSelectUid+"' class='queryResultsWindowSelect' onchange='"+_e6e.myself+".changeCurrentQueryZone(this.selectedIndex);'></select>";
}
this.queryText+="</td>";
}
if(_e70){
this.queryText+="<td "+(SIX.App.isIE?"":"width='"+_e72+"%'")+" title='Click to sort' class='resultsHeadingsField'>"+"<span class='queryResultsWindowText'>"+_e6e.aColumnHeadings[_e6e.aColumnHeadings.length-1]+"</span>"+"<input type='checkbox' alt='Select all' title='Select all' checked onclick='"+this.access.myself+".onSelectAll(event);' border='0'>";
if(this.queries.sExportFunction){
this.queryText+="<a href='#'><img src='"+_e6e.imageExportOff.src+"' alt='"+_e6e.sExportDescription+"' title='"+_e6e.sExportDescription+"'"+" onclick='"+this.access.myself+"."+_e6e.sExportFunction+"();' border='0'></a>";
}
this.queryText+="</td>";
}
if(_e6e.bPrintColumn){
this.queryText+="<td "+(SIX.App.isIE?"":"width='"+_e72+"%'")+" title='Click to sort' class='resultsHeadingsField'>"+"<span class='queryResultsWindowText'>"+_e6e.aColumnHeadings[_e6e.aColumnHeadings.length-1]+"</span>"+"</td>";
}
this.queryText+=(SIX.App.isIE?"":"<td style='visibility:hidden;'>&nbsp;</td>");
this.queryText+="</tr>";
}
this.queryText+="<tr>";
for(var i=0;i<_e6e.nNumColumns;i++){
this.queryText+="<td "+(SIX.App.isIE?"":"width='"+_e72+"%'")+" class='"+_e6e.sResultClass+"'>&nbsp;</td>";
}
this.queryText+=(SIX.App.isIE?"":"<td style='visibility:hidden;'>&nbsp;</td>");
this.queryText+="</tr>"+"</table>"+"</div>";
if(_e71&&!_e6e.bPrintColumn){
this.queryText+="<img style='position:absolute;top:2px;right:20px' src='"+_e6e.imagePrintOff.src+"' alt='"+_e6e.sPrintDescription+"' title='"+_e6e.sPrintDescription+"'"+" onclick='"+this.access.myself+"."+_e6e.sPrintFunction+"();' border='0'>";
}
this.queryText+="</div>";
}
}
return this.queryText;
};
SIX.Service.prototype.buildStatistics=function(){
var _e74="";
if(this.statistics){
_e74=(SIX.App.isIE?"<div style='height:100%;overflow:auto;border-bottom:solid 20px transparent'>":"")+"<table class='sortable'"+(SIX.App.isIE?"":" style='overflow:auto;border-bottom:solid 20px transparent'")+" cellspacing='1' cellpadding='1'"+" name='"+this.statistics.uid+"' id='"+this.statistics.uid+"'>"+"<tr>"+"<td "+(SIX.App.isIE?"":"width='50%'")+" class='consoleTableHeading' title='Click to sort'>Response Status</td>"+"<td "+(SIX.App.isIE?"":"width='50%'")+" class='consoleTableHeading' title='Click to sort'>Number</td>"+(SIX.App.isIE?"":"<td style='visibility:hidden;'>&nbsp;</td>")+"</tr>"+"</table>"+(SIX.App.isIE?"</div>":"");
}
return _e74;
};
SIX.Service.prototype.updateStatistics=function(){
var _e75=document.getElementById(this.statistics.uid);
if(_e75){
var _e76=_e75.getElementsByTagName("tbody").item(0);
for(var i in this.statistics.aRequestsByType){
if(this.statistics.aRequestsByType.hasOwnProperty(i)){
var _e78=parseInt(i.substring(1,i.length));
var _e79=this.statistics.aRequestsByType[i].length;
var _e7a=document.createElement("tr");
var _e7b=document.createElement("td");
_e7b.setAttribute("class","consoleTableCell");
_e7b.setAttribute("className","consoleTableCell");
var _e7c=document.createTextNode(aRequestResponseStatus[_e78].sSummary);
_e7b.appendChild(_e7c);
_e7a.appendChild(_e7b);
var _e7d=document.createElement("td");
_e7d.setAttribute("class","consoleTableCell");
_e7d.setAttribute("className","consoleTableCell");
var _e7e=document.createTextNode(""+_e79);
_e7d.appendChild(_e7e);
_e7a.appendChild(_e7d);
_e76.appendChild(_e7a);
}
}
}
};
SIX.Service.prototype.queryResponse=function(map,_e80){
this.access.queryResponse(map,_e80);
if(this.queries.currentQuery>=0&&this.queries.currentQuery<this.queries.aQueries.length){
var _e81=this.queries.aQueries[this.queries.currentQuery];
_e81.executeCallbacks(SIX.eQueryCallbacks.ONRESPONSE);
}
};
SIX.Service.prototype.build=function(){
var map=this.catalog.maps[0];
if(this.nLayersLoadState==SIX.eLayersLoadState.NOT_LOADED){
this.bLayersBuilt=false;
this.loadLayers(map);
}
if(this.aServices.length&&this.loaded){
this.deleteLayers(this.catalog.maps[0]);
for(var i=0;i<this.aServices.length;i++){
if(this.aServices[i].layers.length&&(!this.aServices[i].bLayersBuilt)){
this.aServices[i].bLayersBuilt=true;
this.bLayersBuilt=false;
}
for(var j=0;j<this.aServices[i].layers.length;j++){
var _e85=this.aServices[i].layers[this.aServices[i].layersOrder[j]];
this.layersIndices[_e85.uid]=this.layers.length;
this.layers[this.layers.length]=_e85;
this.allLayers[this.allLayers.length]=_e85;
}
}
for(var i=0;i<this.layers.length;i++){
this.layersOrder[i]=i;
}
}
if(!this.bLayersBuilt){
for(var i=0;i<this.layers.length;i++){
var _e86=this.layersOrder[i];
var _e87=this.layers[_e86];
_e87.bInList=this.bHideOutOfScaleLayers?(_e87.bInScale?_e87.bSelected:false):true;
_e87.bInList=this.bShowUnselectedLayers?_e87.bInList:_e87.bSelected;
_e87.bHidden=!_e87.bInList;
}
this.bLayersBuilt=true;
}
if(!this.attachWin){
return null;
}
if(this.bFeatureServer){
if(this.queries&&this.queries.aQueries.length){
return this.buildQuery();
}else{
return this.buildSearch();
}
}else{
if(this.currentTab==0){
return this.buildLayers();
}else{
if(this.currentTab==1){
return this.buildLegend();
}else{
if(this.currentTab==2){
return this.buildSearch();
}else{
if(this.currentTab==3){
return this.buildQuery();
}else{
return "";
}
}
}
}
}
};
SIX.Service.prototype.setCurrent=function(){
if(this.catalog.viewService==this){
if(this.attachWin&&!this.attachWin.isVisible){
this.attachWin.toggleWin();
}
return;
}
var _e88;
if(this.catalog.viewService){
_e88=document.getElementById(this.catalog.viewService.listUid);
if(_e88){
_e88.className="legend";
}
}
this.catalog.viewService=this;
_e88=document.getElementById(this.listUid);
if(_e88){
_e88.className="legendActive";
}
if(!this.attachWin&&this.catalog.viewWin){
this.currentTab=this.catalog.currentTab;
this.catalog.viewWin.attach(this);
}
if(this.attachWin){
if(!this.attachWin.isVisible){
this.attachWin.toggleWin();
}
this.attachWin.build();
}
this.activateNoUpdate(this.active);
this.busy(this.isBusy);
};
SIX.Service.prototype.busy=function(busy){
this.isBusy=busy;
var _e8a=document[this.busyUid];
if(_e8a){
_e8a.src=SIX.App.imageUrl("images/busy"+(busy?"_on":""));
}
_e8a=document[this.busyUid2];
if(_e8a){
_e8a.src=SIX.App.imageUrl("images/busy"+(busy?"_on":""));
}
};
SIX.Service.prototype.updateListLayer=function(_e8b){
var _e8c=((_e8b.bInScale&&(!this.bDisplayBest||(_e8b.nBestIndex<0)))||(this.bDisplayBest&&_e8b.bSelected));
var _e8d=document.getElementById(_e8b.nameDisabledUid);
if(_e8d){
_e8d.style.display=_e8c?"none":"";
}
var _e8e=document.getElementById(_e8b.nameEnabledUid);
if(_e8e){
_e8e.style.display=_e8c?"":"none";
}
var _e8f=document.getElementById(_e8b.visibilityUnselectedEnabledUid);
if(_e8f){
_e8f.style.display=(_e8b.bInScale&&!_e8b.bSelected&&(!this.bDisplayBest||(_e8b.nBestIndex<0)))?"":"none";
}
var _e90=document.getElementById(_e8b.visibilitySelectedEnabledUid);
if(_e90){
_e90.style.display=(_e8b.bInScale&&_e8b.bSelected&&(!this.bDisplayBest||(_e8b.nBestIndex<0)))?"":"none";
}
var _e91=document.getElementById(_e8b.visibilityUnselectedDisabledUid);
if(_e91){
_e91.style.display=((!_e8b.bInScale&&!_e8b.bSelected)||(this.bDisplayBest&&(_e8b.nBestIndex>=0)&&!_e8b.bSelected))?"":"none";
}
var _e92=document.getElementById(_e8b.visibilitySelectedDisabledUid);
if(_e92){
_e92.style.display=((!_e8b.bInScale&&_e8b.bSelected)||(this.bDisplayBest&&(_e8b.nBestIndex>=0)&&_e8b.bSelected))?"":"none";
}
if(_e8b.nListState!=SIX.eListState.NONE){
for(var i=0;i<_e8b.aLayers.length;i++){
var _e94=_e8b.aLayers[i];
this.updateListLayer(_e94);
}
}
};
SIX.Service.prototype.layerVisibleNoUpdate=function(_e95){
_e95.setSelected(!_e95.bSelected);
if(_e95.bSelected){
_e95.bHidden=this.bHideOutOfScaleLayers?(_e95.bInScale?false:_e95.bHidden):false;
}
this.updateListLayer(_e95);
};
SIX.Service.prototype.layerVisible=function(_e96){
if(this.bLayerRadioGroup&&_e96.bSelected){
return;
}
if(this.bDisplayBest){
if(_e96.nBestIndex>=0){
this.onSelectDisplayBest();
}
}
this.layerVisibleNoUpdate(_e96);
var _e97=!this.bDisplayBest;
if(this.bDisplayBest){
for(var j=0;j<this.layers.length;j++){
var _e96=this.layers[j];
if(_e96.nBestIndex<0&&_e96.bInScale&&_e96.bSelected){
_e97=true;
break;
}
}
}
if(this.bLayerRadioGroup&&_e96.bSelected){
for(var j=0;j<this.allLayers.length;j++){
var _e99=this.allLayers[j];
if(_e96!=_e99&&_e99.bSelected){
var _e9a=false;
for(var k=0;k<_e96.aGroupedLayers.length;k++){
if(_e99==_e96.aGroupedLayers[k]){
_e9a=true;
break;
}
}
if(!_e9a){
this.layerVisibleNoUpdate(_e99);
}
}
}
}
this.setSliderEnabled(_e97);
setTimeout(this.myself+".updateMaps()",250);
};
SIX.Service.prototype.setVisibleLayersSelectionState=function(_e9c){
if(this.attachWin){
for(var i=0;i<this.attachWin.attachObject.length;i++){
var _e9e=this.attachWin.attachObject[i];
if(_e9e==this){
if(this.attachWin.aSubPanes.length>i){
var _e9f=this.attachWin.aSubPanes[i];
_e9f.bSelected=_e9c;
var _ea0=document.getElementById(_e9f.layersSelectedUid);
if(_ea0){
_ea0.src=SIX.App.imageUrl("images/"+(_e9f.bSelected?"service_tick_on":"service_tick"));
}
}
break;
}
}
}
if(this.bLayerRadioGroup&&_e9c){
return;
}
for(var i=0;i<this.layers.length;i++){
if(this.layers[i].bInList){
this.layers[i].setSelected(_e9c);
}
}
for(var i=0;i<this.aAttachedServices.length;i++){
var _ea1=this.aAttachedServices[i];
var _ea2=true;
if(!_e9c){
for(var j=0;j<_ea1.aServicesAttachedTo.length;j++){
var _ea4=_ea1.aServicesAttachedTo[j];
if(_ea4!=this){
for(var k=0;k<_ea4.layers.length;k++){
if(_ea4.layers[k].bSelected){
_ea2=false;
break;
}
}
if(!_ea2){
break;
}
}
}
}
if(_ea2){
_ea1.setVisibleLayersSelectionState(_e9c);
}
}
if(this.attachWin){
this.attachWin.build();
}
if(this.loaded&&this.active){
for(var i=0;i<this.catalog.maps.length;i++){
var map=this.catalog.maps[i];
var _ea7=document[map.uid];
this.updateMap(map);
if(_ea7.GetLayerIndex(this.uid)!=-1){
map.setLayerParameter(this.uid,"visibility="+(_e9c?"true":"false"));
}
for(var j=0;j<this.aServices.length;j++){
if(_ea7.GetLayerIndex(this.aServices[j].uid)!=-1){
map.setLayerParameter(this.aServices[j].uid,"visibility="+(_e9c?"true":"false"));
}
}
}
}
};
SIX.Service.prototype.showHideUnselectedLayers=function(){
this.setUnselectedLayersVisibility(!this.bShowUnselectedLayers);
};
SIX.Service.prototype.setUnselectedLayersVisibility=function(_ea8){
if(this.setUnselectedLayersVisibilityNoUpdate(_ea8)&&this.attachWin){
this.attachWin.build();
if(!this.bHiddenSlider){
this.setSliderPosition(Math.round(this.transparency*100));
}
}
};
SIX.Service.prototype.setUnselectedLayersVisibilityNoUpdate=function(_ea9){
var _eaa=false;
this.bShowUnselectedLayers=_ea9;
var _eab=document.getElementById(this.showHideUnselectedLayersUid);
if(_eab){
this.sShowHideUnselectedLayersLabel=(this.bShowUnselectedLayers?this.sHideUnselectedLayersLabel:this.sShowHiddenLayersLabel);
_eab.value=this.sShowHideUnselectedLayersLabel;
}
var map=this.catalog.maps[0];
_eaa=map.hiddenLayers(this,!this.bShowUnselectedLayers);
return _eaa;
};
SIX.Service.prototype.layerQuery=function(i){
var _eae=this.layers[i];
_eae.doQuery=!_eae.doQuery;
var _eaf=document[_eae.queryUid];
if(_eaf){
if(_eae.doQuery){
_eaf.src=SIX.App.imageUrl("images/query_on");
}else{
_eaf.src=SIX.App.imageUrl("images/query");
}
}
};
SIX.Service.prototype.setLayerMetadataUrl=function(_eb0,url){
this.aLayerMetadataUrls[_eb0]=url;
};
SIX.Service.prototype.layerMeta=function(_eb2){
if(this.bMetadata){
if(_eb2.sMetadataUrl!=""){
SIX.App.metadataPopupWin.populate("<iframe src=\""+_eb2.sMetadataUrl+"\" width=\""+(SIX.App.width/2-20)+"\" height=\""+(SIX.App.height/2-20)+"\" scrolling=\"auto\" frameborder=\"1\"></iframe>");
SIX.App.metadataPopupWin.setSize(SIX.App.width/2,SIX.App.height/2);
SIX.App.metadataPopupWin.offsetX=45;
SIX.App.metadataPopupWin.offsetY=15;
SIX.App.metadataPopupWin.autoHide();
SIX.App.metadataPopupWin.showPopup(_eb2.metadataUid);
}
}else{
var _eb3=" class='query'";
var _eb4=" class='queryField'";
var msg="<table border=0 cellpadding=0 cellspacing=0>";
if(this.service.length){
msg+="<tr><td colspan=2 "+_eb3+">Service</td></tr>"+"<tr><td colspan=2 "+_eb4+">"+this.service+"</td></tr>";
}
msg+="<tr><td colspan=2 "+_eb3+">Protocol</td></tr>"+"<tr><td colspan=2 "+_eb4+">"+this.access.name+"</td></tr>"+"<tr><td colspan=2 "+_eb3+">SIX.Layer Name</td></tr>"+"<tr><td colspan=2 "+_eb4+">"+_eb2.name+"</td></tr>";
if(_eb2.tlLatitude||_eb2.tlLongitude||_eb2.brLatitude||_eb2.brLongitude){
msg+="<tr><td colspan=2 "+_eb3+">SIX.Layer Extents</td></tr>"+"<tr><td"+_eb4+">"+SIX.Util.latitudeToString(_eb2.tlLatitude)+"</td>"+"<td"+_eb4+">"+SIX.Util.longitudeToString(_eb2.tlLongitude)+"</td></tr>"+"<tr><td"+_eb4+">"+SIX.Util.latitudeToString(_eb2.brLatitude)+"&nbsp;</td>"+"<td"+_eb4+">"+SIX.Util.longitudeToString(_eb2.brLongitude)+"</td></tr>";
}
if(_eb2.minScale){
msg+="<tr><td colspan=2 "+_eb3+">SIX.Layer Min Scale</td></tr>"+"<tr><td colspan=2 "+_eb4+">1:"+_eb2.minScale+"</td></tr>";
}
if(_eb2.maxScale){
msg+="<tr><td colspan=2 "+_eb3+">SIX.Layer Max Scale</td></tr>"+"<tr><td colspan=2 "+_eb4+">1:"+_eb2.maxScale+"</td></tr>";
}
msg+="</table>";
this.setQueryText(msg);
}
};
SIX.Service.prototype.loadLayers=function(map){
if(!this.loaded||!map.loaded||!this.isOnline||this.bFeatureServer){
this.nLayersLoadState=SIX.eLayersLoadState.NOT_LOADED;
if(!this.loaded||!map.loaded||!this.isOnline){
var _eb7=SIX.App.getCurrentChannel();
if(_eb7.console){
var _eb8=_eb7.console;
_eb8.setHealth(this,0);
for(var i=0;i<this.aServices.length;i++){
_eb8.setHealth(this.aServices[i],0);
}
}
}
return;
}
if(this.aServices.length){
this.nLayersLoadState=SIX.eLayersLoadState.LOADING;
for(var i=0;i<this.aServices.length;i++){
this.aServices[i].access.loadLayers(map);
if(this.aServices[i].nLayersLoadState==SIX.eLayersLoadState.NOT_LOADED){
this.nLayersLoadState=SIX.eLayersLoadState.NOT_LOADED;
}
}
}else{
this.access.loadLayers(map);
}
};
SIX.Service.prototype.applyFeatureCount=function(map){
var svc=this;
if(svc.aFeatureLimitedLayers.length){
var _ebc=map.scale;
var _ebd=svc.aFeatureLimitedLayers.length;
for(var i=0;i<svc.aFeatureLimitedLayers.length;i++){
var _ebf=svc.aFeatureLimitedLayers[i];
if(_ebf.minScale&&_ebc<_ebf.minScale){
_ebd--;
continue;
}
_ebf.aLayers=new Array();
_ebf.aLayerIndices=new Array();
var _ec0=false;
for(var j=0;j<svc.layers.length;j++){
var _ec2=svc.layers[j];
for(var k=0;k<_ebf.aLayerIds.length;k++){
if(_ec2.id==_ebf.aLayerIds[k]){
if(_ec2.bInScale&&_ec2.bSelected){
_ec2.maxFeatures=_ebf.aMaxFeatures[k];
_ebf.aLayers[_ebf.aLayers.length]=_ec2;
_ebf.aLayerIndices[_ebf.aLayerIndices.length]=j;
_ec0=true;
}
if(_ebc>_ebf.maxScale){
_ec0=false;
_ec2.bInScale=false;
}
}
}
}
if(_ec0){
_ebf.applyFeatureCount(map,_ec4);
}else{
_ebd--;
}
}
if(_ebd==0){
_ec4();
}
}else{
_ec4();
}
function _ec4(){
svc.access.loadMap(map);
};
};
SIX.Service.prototype.loadMap=function(map){
var _ec6=false;
if(!map.bLoading){
var _ec7=map.getGISOverlayMapsLoadStats(false);
if(!_ec7.nNumGISOverlayMapsLoading){
_ec6=true;
}
}
if(this.aServices.length){
for(var i=0;i<this.aServices.length;i++){
this.aServices[i].applyFeatureCount(map);
}
}else{
if(!this.attachWin){
map.hiddenLayers(this);
}
this.applyFeatureCount(map);
}
if(_ec6&&this.nMapLoadState==SIX.eMapLoadState.LOADING){
map.resetGISOverlayMapsLoadState();
map.getBottomMap().setGISOverlayProgress(0);
}
};
SIX.Service.prototype.updateMap=function(map){
this.access.updateMap(map);
};
SIX.Service.prototype.updateMaps=function(){
if(this.loaded&&this.active){
for(var i=0;i<this.catalog.maps.length;i++){
this.updateMap(this.catalog.maps[i]);
}
}
};
SIX.Service.prototype.online=function(_ecb){
this.isOnline=_ecb;
if(_ecb&&this.active){
this.active=false;
}else{
this.active=true;
}
this.activate();
};
SIX.Service.prototype.meta=function(){
alert("Service meta data");
};
SIX.Service.prototype.hideColor=function(_ecc,_ecd,_ece,_ecf){
if(this.colorMask){
var _ed0=parseInt(_ecc.substr(1),16)&this.colorMask;
_ecc="#"+_ed0.toString(16);
}
if(this.loaded){
for(var i=0;i<this.catalog.maps.length;i++){
var map=this.catalog.maps[i];
map.setLayerTransparency(this.uid,_ecc,_ecd/100);
}
}
if(this.colors[_ecc]){
delete this.colors[_ecc];
}
if(_ecd!=100){
var item=new Object();
item.color=_ecc;
item.percent=_ecd;
item.scale=_ece;
item.userColor=_ecf;
this.colors[_ecc]=item;
}
};
SIX.Service.prototype.hideColors=function(_ed4){
for(var i=0;i<_ed4.length;i++){
for(var j=0;j<this.aServices.length;j++){
this.aServices[j].hideColor(_ed4[i],0,0,false);
}
this.hideColor(_ed4[i],0,0,false);
}
};
SIX.Service.prototype.setSupportedEPSGCodes=function(_ed7){
if(!this.aSupportedEPSGCodes){
this.aSupportedEPSGCodes=new Object();
}
for(var i=0;i<_ed7.length;i++){
this.aSupportedEPSGCodes["#"+_ed7[i]]=true;
}
};
SIX.Service.prototype.setUnsupportedEPSGCodes=function(_ed9){
if(!this.aUnsupportedEPSGCodes){
this.aUnsupportedEPSGCodes=new Object();
}
for(var i=0;i<_ed9.length;i++){
this.aUnsupportedEPSGCodes["#"+_ed9[i]]=true;
}
};
SIX.Service.prototype.supportsEPSG=function(_edb){
var _edc=false;
if(GDTEPSGMappings.getDatumProjection(_edb)){
_edc=true;
if((this.aSupportedEPSGCodes&&!this.aSupportedEPSGCodes["#"+_edb])||(this.aUnsupportedEPSGCodes&&this.aUnsupportedEPSGCodes["#"+_edb])){
_edc=false;
}
}
return _edc;
};
SIX.Service.prototype.setLegendUrl=function(url){
this.legendUrl=url;
if(this.currentTab==1&&this.attachWin){
this.attachWin.build();
}
};
SIX.Service.prototype.setQueryText=function(txt){
this.queryText=txt;
if(this.attachWin){
if(this.currentTab==3){
this.attachWin.build();
}else{
this.setTab(3);
}
}
};
SIX.Service.prototype.needLegend=function(){
if(!this.attachWin||this.currentTab!=1){
return false;
}else{
return true;
}
};
SIX.Service.prototype.action=function(_edf,_ee0,x,y){
if(!this.attachWin||_edf!=5||!this.bSliderEnabled){
return;
}
var _ee3=0;
var _ee4=document.getElementById(this.sliderUid);
if(_ee4){
var _ee5=_ee4.offsetWidth;
_ee5=_ee5?_ee5:100;
var _ee6=SIX.Util.findPosX(_ee4);
if(_ee6>0){
_ee3=Math.round(100*(x-_ee6)/_ee5);
}else{
_ee3=Math.round(100*(x-(this.attachWin.left+50))/_ee5);
}
if(_ee3>100){
_ee3=100;
}else{
if(_ee3<0){
_ee3=0;
}
}
}
this.setSliderPosition(_ee3);
this.setTransparency(_ee3);
};
SIX.Service.prototype.setSliderPosition=function(_ee7){
if(_ee7<0){
_ee7=0;
}else{
if(_ee7>100){
_ee7=100;
}
}
var _ee8=document.getElementById(this.ptrUid);
var _ee9=document.getElementById(this.sliderUid);
if(_ee8&&_ee9){
this.nSliderPointerLeft=Math.round(_ee7*_ee9.offsetWidth/100)-5;
_ee8.style.left=this.nSliderPointerLeft+"px";
}
};
SIX.Service.prototype.setSliderEnabled=function(_eea){
this.bSliderEnabled=_eea;
var _eeb=document.getElementById(this.ptrUid);
var _eec=document.getElementById(this.sliderUid);
if(_eeb&&_eec){
_eeb.src=SIX.App.imageUrl("images/"+(_eea?"slider_ptr":"slider_ptr_disabled"));
_eec.src=SIX.App.imageUrl("images/"+(_eea?"slider_line":"slider_line_disabled"));
if(!_eea){
_eeb.style.left=this.nSliderPointerLeft=_eec.offsetWidth-5;
}
}
var _eed=document.getElementById(this.sliderLabelUid);
var _eee=document.getElementById(this.sliderLabelDisabledUid);
if(_eed&&_eee){
_eed.style.display=(_eea?"":"none");
_eee.style.display=(_eea?"none":"");
}
};
SIX.Service.prototype.setTransparency=function(_eef){
this.transparency=_eef/100;
if(this.loaded){
if(this.access instanceof SIX.Access.ECWP){
var _ef0;
var _ef1=0;
for(var i=0;i<this.layers.length;i++){
var _ef3=this.layers[this.layersOrder[i]];
if(_ef3.loaded){
if(!_ef0){
_ef0=_ef3;
}else{
for(var j=0;j<this.catalog.maps.length;j++){
var map=this.catalog.maps[j];
map.setLayerTransparency(_ef3.uid,"#",1);
for(var k=0;k<_ef3.aLayers.length;k++){
map.setLayerTransparency(_ef3.aLayers[k].uid,"#",1);
}
}
}
_ef1++;
}
}
if(_ef0){
this.transparency=(_ef1>1?this.transparency:1);
for(var j=0;j<this.catalog.maps.length;j++){
var map=this.catalog.maps[j];
map.setLayerTransparency(_ef0.uid,"#",this.transparency);
for(var k=0;k<_ef0.aLayers.length;k++){
map.setLayerTransparency(_ef0.aLayers[k].uid,"#",this.transparency);
}
}
}
}else{
for(var j=0;j<this.catalog.maps.length;j++){
var map=this.catalog.maps[j];
map.setLayerTransparency(this.uid,"#",this.transparency);
}
}
}
};
SIX.Service.prototype.setTab=function(_ef7){
var _ef8=this.currentTab;
this.currentTab=_ef7;
if(!this.attachWin){
return;
}
if(this.attachWin==this.catalog.viewWin){
this.catalog.currentTab=this.currentTab;
}
if(_ef7!=_ef8){
this.attachWin.build();
}
if(this.legendUrl==""&&this.access.hasLegend&&this.catalog.maps.length&&_ef7==1){
this.loadMap(this.catalog.maps[0]);
}
};
SIX.Service.prototype.reorderLayer=function(_ef9){
var _efa=this.layersIndices[_ef9.uid];
var i=this.getLayerOrder(_efa);
if(!this.bCanReorder||i<1||i>=this.layers.length){
return;
}
var _efc=this.layersOrder[i];
for(j=i;j>0;j--){
this.layersOrder[j]=this.layersOrder[j-1];
}
this.layersOrder[0]=_efc;
if(this.attachWin){
this.attachWin.build();
}
for(var j=0;j<this.catalog.maps.length;j++){
this.access.orderLayers(this.catalog.maps[j]);
this.updateMap(this.catalog.maps[j]);
}
};
SIX.Service.prototype.setLayerNameAlias=function(sId,_eff,_f00){
var _f01=new Object();
_f01.sId=sId;
_f01.sName=_eff;
_f01.sAlias=_f00;
this.aLayerNameAliases[this.aLayerNameAliases.length]=_f01;
};
SIX.Service.prototype.getLayerByName=function(_f02){
for(var i=0;i<this.layers.length;i++){
var _f04=this.layers[i].getLayerByName(_f02);
if(_f04!=null){
return _f04;
}
}
return null;
};
SIX.Service.prototype.getLayerNameAlias=function(sId,_f06){
var _f07=_f06;
for(var i=0;i<this.aLayerNameAliases.length;i++){
var _f09=this.aLayerNameAliases[i];
if(_f09.sId!=""){
if(_f09.sId.toLowerCase()==sId.toLowerCase()){
_f07=_f09.sAlias;
break;
}
}else{
if(_f09.sName.toLowerCase()==_f06.toLowerCase()){
_f07=_f09.sAlias;
break;
}
}
}
return _f07;
};
SIX.Service.prototype.setLayerFilterDefaults=function(_f0a,_f0b,_f0c,_f0d){
this.bFilterDefaultLayersInList=_f0a;
this.bFilterIgnoreDefaultLayerSelections=(arguments.length<2?false:_f0b);
this.bFilterDefaultLayersSelected=(arguments.length<3?false:_f0c);
this.filterDefaultParams=_f0d;
};
SIX.Service.prototype.addLayerFilter=function(_f0e,_f0f,_f10,_f11,_f12,_f13){
var _f14=new Object();
_f14.sIdKey=_f0e.toLowerCase();
_f14.sNameKey=(arguments.length<2?"":_f0f.toLowerCase());
_f14.bExcludeMatch=(arguments.length<4?false:_f11);
_f14.bSelected=(arguments.length<5?false:_f12);
_f14.params=_f13;
if(_f10){
this.aLayerExactMatchFilters[this.aLayerExactMatchFilters.length]=_f14;
}else{
this.aLayerPartialMatchFilters[this.aLayerPartialMatchFilters.length]=_f14;
}
};
SIX.Service.prototype.filterLayer=function(_f15,_f16){
var _f17=new Object();
_f17.params=this.filterDefaultParams;
if(!this.aLayerPartialMatchFilters.length&&!this.aLayerExactMatchFilters.length){
_f17.bInList=true;
_f17.bSelected=false;
return _f17;
}
_f17.bInList=this.bFilterDefaultLayersInList;
_f17.bSelected=this.bFilterDefaultLayersSelected;
var _f18=false;
var _f19=_f15.toLowerCase();
var _f1a=_f16.toLowerCase();
for(var i=0;i<this.aLayerExactMatchFilters.length;i++){
var _f1c=this.aLayerExactMatchFilters[i];
if(((_f19==_f1c.sIdKey)&&(_f1c.sIdKey!=""))||((_f1a==_f1c.sNameKey)&&(_f1c.sNameKey!=""))){
_f18=true;
_f17.bInList=!_f1c.bExcludeMatch;
_f17.bSelected=_f1c.bSelected;
_f17.params=_f1c.params;
break;
}
}
if(!_f18){
for(var i=0;i<this.aLayerPartialMatchFilters.length;i++){
var _f1c=this.aLayerPartialMatchFilters[i];
if(((_f19.indexOf(_f1c.sIdKey)>-1)&&(_f1c.sIdKey!=""))||((_f1a.indexOf(_f1c.sNameKey)>-1)&&(_f1c.sNameKey!=""))){
_f17.bInList=!_f1c.bExcludeMatch;
_f17.bSelected=_f1c.bSelected;
_f17.params=_f1c.params;
}
}
}
return _f17;
};
SIX.Service.prototype.getScale=function(map){
return (this.access.getScale(map));
};
SIX.Service.prototype.getMapDimensions=function(map){
var _f1f=new Array();
var _f20=map.width;
var _f21=map.height;
var _f22=map.width*map.height;
if(_f22>this.nMaxMapSize){
var _f23=Math.sqrt(this.nMaxMapSize/_f22);
if(map.width>map.height){
_f20=Math.floor(_f23*map.width);
_f21=Math.floor(_f20*map.height/map.width);
}else{
_f21=Math.floor(_f23*map.height);
_f20=Math.floor(_f21*map.width/map.height);
}
}
_f1f[0]=_f20;
_f1f[1]=_f21;
return _f1f;
};
SIX.Catalog=function(win,_f25){
SIX.addRef(this);
this.name="Catalog";
_f25.cats[_f25.cats.length]=this;
this.channel=_f25;
this.win=win;
this.services=new Array();
this.servicesOrder=new Array();
this.maps=new Array();
this.servicePanes=new Array();
this.viewService=0;
this.viewWin=0;
this.currentTab=0;
this.currentSearchService=0;
this.currentQueryService=0;
this.bDisplayBest=false;
this.fnBuildSearch=null;
};
SIX.Catalog.prototype.buildSearch=function(){
var _f26=0;
var txt="";
var _f28="";
var _f29=true;
for(var i=0;i<this.services.length;i++){
var _f2b=this.services[this.servicesOrder[i]];
if(_f2b.active&&_f2b.searches&&(_f2b.bFeatureServer||_f2b.access.hasSearch)){
for(var j=0;j<_f2b.searches.length;j++){
if(_f2b.searches[j].win){
_f28+="<option value='"+_f2b.searches[j].uid+"'";
if((this.currentSearchService==_f2b)&&(_f2b.currentSearch==j)){
this.currentSearch=_f26;
_f29=false;
_f28+=" selected";
}
_f28+=">"+_f2b.searches[j].name+"</option>";
_f26++;
}
}
}
}
if(_f28==""){
_f28+="<option value=''>No Searches Available for this selection</option>";
}
txt+="<div id='"+this.attachWin.searchContainerUid+"' class='searchListContainer'>";
txt+="<form id='"+this.attachWin.searchFormUid+"' name='"+this.attachWin.searchFormUid+"'>";
txt+="<select name='"+this.attachWin.searchListUid+"' class='searchList' id='"+this.attachWin.searchListUid+"'"+" size="+_f26+" onChange='javascript:"+this.myself+".setCurrentSearch(this[this.selectedIndex].value)'>";
txt+=_f28;
txt+="</select>";
txt+="</form>";
txt+="</div>";
return txt;
};
SIX.Catalog.prototype.setCurrentSearch=function(_f2d){
for(var i=0;i<this.services.length;i++){
var _f2f=false;
var _f30=this.services[i];
for(var j=0;j<_f30.searches.length;j++){
if(_f2d==_f30.searches[j].uid){
_f30.setCurrentSearch(_f2d);
_f2f=true;
break;
}
}
if(_f2f){
break;
}
}
};
SIX.Catalog.prototype.addService=function(_f32){
if(_f32.bDisplayBest&&_f32.access instanceof SIX.Access.ECWP){
this.bDisplayBest=true;
}
this.servicesOrder[this.servicesOrder.length]=this.services.length;
this.services[this.services.length]=_f32;
_f32.setCatalog(this);
return _f32;
};
SIX.Catalog.prototype.init=function(){
return "";
};
SIX.Catalog.prototype.build=function(){
if(!this.viewWin){
if(this.fnBuildSearch){
return this.fnBuildSearch();
}else{
return this.buildSearch();
}
}else{
if(this.services.length&&!this.viewService){
this.services[0].setCurrent();
}
var _f33=2;
var txt="<table border=0 cellspacing='"+_f33+"' cellpadding='"+_f33+"' width='100%'>";
var _f35=false;
for(var i=this.services.length-1;i>=0;i--){
var _f37=this.services[this.servicesOrder[i]];
var _f38="";
if(_f37.active){
_f38="_on";
}
if(_f37.access instanceof SIX.Access.ECWP){
_f35=false;
}
var _f39=(this.viewService==_f37?"legendActive":"legend");
var _f3a=this.myself+".services["+this.servicesOrder[i]+"]";
if(!_f37.hidden){
txt+="<tr bgcolor='#E6E6E6'>"+"<td><img"+SIX.App.imageSrc("images/tick"+_f38)+" alt='Turn service on or off' title='Turn service on or off' name='"+_f37.activeUid+"' "+"onclick='"+_f3a+".activate()'></td>"+"<td><img"+SIX.App.imageSrc("images/busy")+"name='"+_f37.busyUid+"'></td>"+"<td><img"+SIX.App.imageSrc("images/"+(_f35?"up_on":"up"))+" alt='Move service up in map stack order' title='Move service up in map stack order' name='"+_f37.upUid+"'";
if(_f35){
txt+=" onclick='"+this.myself+".reorderService("+i+")'";
}
txt+="></td>"+"<td width='100%'>"+"<a class='"+_f39+"' id='"+_f37.listUid+"' href='javascript:"+_f3a+".setCurrent()'>&nbsp;"+_f37.name+"</a></td>"+"</tr>";
_f35=true;
}
}
txt+="</table>";
return txt;
}
};
SIX.Catalog.prototype.attach=function(item){
if(item.constructor==SIX.Map){
this.maps[this.maps.length]=item;
item.catalog=this;
}else{
if(item.constructor==SIX.Window){
this.viewWin=item;
}
}
};
SIX.Catalog.prototype.setMapsCatalog=function(){
for(var i=0;i<this.maps.length;i++){
if(this.maps[i].catalog!=this){
this.maps[i].catalog=this;
}
}
};
SIX.Catalog.prototype.reorderService=function(_f3d,_f3e){
var i=parseInt(_f3d);
if(i<0||i>=(this.services.length)){
return;
}
i=parseInt(_f3e);
if(i<0||i>=(this.services.length)){
return;
}
var temp=this.servicesOrder[_f3d];
this.servicesOrder[_f3d]=this.servicesOrder[_f3e];
this.servicesOrder[_f3e]=temp;
for(var j=0;j<this.maps.length;j++){
this.services[0].access.orderLayers(this.maps[j]);
}
};
SIX.Catalog.prototype.removeService=function(_f42){
for(var i=0;i<this.services.length;i++){
if(_f42==this.services[i].uid){
this.services[i].setVisibleLayersSelectionState(false);
this.services.splice(i,1);
var _f44;
for(j=0;j<this.servicesOrder.length;j++){
if(this.servicesOrder[j]==i){
_f44=j;
}else{
if(this.servicesOrder[j]>=i){
this.servicesOrder[j]=this.servicesOrder[j]-1;
}
}
}
this.servicesOrder.splice(_f44,1);
break;
}
}
};
SIX.Catalog.prototype.getServiceIndex=function(_f45){
for(var i=0;i<this.services.length;i++){
if(_f45==this.services[i].uid){
return i;
}
}
return -1;
};
SIX.Catalog.prototype.getServiceOrderIndex=function(_f47){
var _f48=this.getServiceIndex(_f47);
if(_f48!=-1){
for(var j=0;j<this.servicesOrder.length;j++){
if(this.servicesOrder[j]==_f48){
return j;
}
}
}
};
SIX.Catalog.prototype.getServiceOrder=function(_f4a){
var _f4b=this.getServiceIndex(_f4a);
if(_f4b!=-1){
return this.servicesOrder[_f4b];
}else{
return -1;
}
};
SIX.Catalog.prototype.setServiceOrder=function(_f4c,_f4d){
var _f4e=this.getServiceIndex(_f4c);
if(_f4e!=-1){
this.servicesOrder[_f4d]=_f4e;
}
};
SIX.Catalog.prototype.insertServiceOrder=function(_f4f,_f50){
var _f51=this.getServiceIndex(_f4f);
if(_f51!=-1){
for(var i=this.servicesOrder.length-1;i>=_f50;i--){
if(i==_f50){
this.servicesOrder[i]=_f51;
}else{
if(i>_f50){
this.servicesOrder[i]=this.servicesOrder[i-1];
}
}
}
}
};
SIX.Indicator=function(uid,_f54,_f55,_f56,_f57,_f58,_f59){
this.uid=uid;
this.incrementUid=uid+"_increment";
this.containerUid=_f54;
this.parameters=new SIX.Parameters(_f59?_f59:"");
this.aCompleteColors=null;
this.sCompleteColor=this.parameters.getParameter("completecolor","string","#00FF00");
this.sIncompleteColor=this.parameters.getParameter("incompletecolor","string","#FF0000");
this.sBackgroundColor=this.parameters.getParameter("backgroundcolor","string","transparent");
this.nIncrements=_f55;
this.nIncrementSpacing=(this.nIncrements==1)?0:_f58;
this.nBorderWidth=this.parameters.getParameter("borderwidth","number",0);
this.nBorderColor=this.parameters.getParameter("bordercolor","string","#000000");
this.nIncrementWidth=(_f56<2)?2:_f56;
this.nIncrementHeight=(_f57<2)?2:_f57;
this.nBarWidth=this.nIncrements*this.nIncrementWidth+(this.nIncrements-1)*this.nIncrementSpacing+(this.nIncrementSpacing?(2*this.nBorderWidth*this.nIncrements):2*this.nBorderWidth);
this.aTopLabels=new Array();
this.aBottomLabels=new Array();
};
SIX.Indicator.prototype.build=function(){
var text="";
text+="<div id='"+this.containerUid+"'>";
var _f5b=this.nBarWidth;
for(var i=0;i<this.aTopLabels.length;i++){
var _f5d=Math.floor(_f5b+_f5b/this.aTopLabels[i].length);
var _f5e=Math.floor(_f5d/this.aTopLabels[i].length);
text+="<div class='indicatorLabelsContainer' style='width:"+_f5d+"px;'>";
for(var j=0;j<this.aTopLabels[i].length;j++){
text+="<div class='indicatorLabel' style='width:"+_f5e+"px;'>"+this.aTopLabels[i][j]+"</div>";
}
text+="</div>";
}
text+="<div id='"+this.uid+"' class='indicatorBar' style='width:"+_f5b+"px;background-color:"+this.sBackgroundColor+"'>";
for(var i=0;i<this.nIncrements;i++){
var _f60=0;
var _f61=0;
var _f62=0;
var _f63=this.nBorderWidth;
var _f64=this.nBorderWidth;
if(this.nIncrementSpacing||(i==0)){
_f61=this.nBorderWidth;
}
if(i>0){
_f60=this.nIncrementSpacing;
}
if(this.nIncrementSpacing||(i==(this.nIncrements-1))){
_f62=this.nBorderWidth;
}
text+="<div id='"+this.incrementUid+i+"' class='indicatorIncrement' "+" style='border-left:"+this.nBorderColor+" "+_f61+"px solid"+";border-right:"+this.nBorderColor+" "+_f62+"px solid"+";border-top:"+this.nBorderColor+" "+_f63+"px solid"+";border-bottom:"+this.nBorderColor+" "+_f64+"px solid"+";width:"+this.nIncrementWidth+"px; height:"+this.nIncrementHeight+"px; background-color:"+this.sIncompleteColor+"'>&nbsp;</div>";
if(this.nIncrementSpacing&&(i<(this.nIncrements-1))){
text+="<div class='indicatorIncrement' "+" style='width:"+this.nIncrementSpacing+"px; height:"+this.nIncrementHeight+"px; background-color:transparent'>&nbsp;</div>";
}
}
text+="</div>";
for(var i=0;i<this.aBottomLabels.length;i++){
var _f5d=_f5b+_f5b/this.aBottomLabels[i].length;
var _f5e=Math.floor(_f5d/this.aBottomLabels[i].length);
text+="<div class='indicatorLabelsContainer' style='width:"+_f5d+"px;'>";
for(var j=0;j<this.aBottomLabels[i].length;j++){
text+="<div class='indicatorLabel' style='width:"+_f5e+"px;'>"+this.aBottomLabels[i][j]+"</div>";
}
text+="</div>";
}
text+="</div>";
if(this.containerUid){
var _f65=document.getElementById(this.containerUid);
if(_f65){
_f65.innerHTML=text;
}
}
return text;
};
SIX.Indicator.prototype.setCompleteColors=function(_f66){
if(_f66.length==this.nIncrements){
this.aCompleteColors=_f66;
}else{
this.aCompleteColors=SIX.Util.interpolateHexColorsArray(_f66,this.nIncrements);
}
};
SIX.Indicator.prototype.setValue=function(_f67){
if(_f67<0){
_f67=0;
}
if(_f67>100){
_f67=100;
}
var _f68=(_f67*this.nIncrements/100)-1;
for(var i=0;i<this.nIncrements;i++){
var elem=document.getElementById(this.incrementUid+i);
if(elem){
var _f6b=this.aCompleteColors?this.aCompleteColors[i]:this.sCompleteColor;
elem.style.backgroundColor=((_f68>=i)?_f6b:this.sIncompleteColor);
}
}
};
SIX.Indicator.prototype.addTopLabels=function(_f6c){
this.aTopLabels[this.aTopLabels.length]=_f6c;
};
SIX.Indicator.prototype.addBottomLabels=function(_f6d){
this.aBottomLabels[this.aBottomLabels.length]=_f6d;
};
SIX.eConsoleTabs={MESSAGES:0,BANDWIDTH:1,HEALTH:2,PROGRESS:3};
SIX.ConsoleMessage=function(_f6e,_f6f,_f70){
this.uid=SIX.Uid.getUid("ConsoleMessage");
this.sSummary=_f6e;
this.sDetail=arguments.length>=2?_f6f:"";
this.requestResponse=arguments.length>=3?_f70:null;
this.sSummary=this.sSummary.replace(/\r/g,"");
this.sSummary=this.sSummary.replace(/\n/g,"");
this.sSummary=this.sSummary.replace(/\t/g,"");
this.sClass="";
if(this.requestResponse){
this.sClass=(this.requestResponse.nStatus==SIXConfig.eRequestResponseStatus.SUCCESS)?"consoleMessageSuccess":"consoleMessageFailure";
}
};
SIX.Console=function(_f71){
SIX.addRef(this);
this.name="Console";
this.channel=_f71;
this.channel.setConsole(this);
this.aServices=new Object();
this.messagesPaneUid=SIX.Uid.getUid("messagesPane");
this.messagesTabUid=SIX.Uid.getUid("messagesTab");
this.messagesTableUid=SIX.Uid.getUid("messagesTable");
aTagExclusionsByTableId[this.messagesTableUid]=new Array();
this.messagesSummaryUid=SIX.Uid.getUid("messagesSummary");
this.messagesDetailUid=SIX.Uid.getUid("messagesDetail");
this.messagesDetailContentsUid=SIX.Uid.getUid("messagesDetailContents");
this.messagesDetailTitleBarUid=SIX.Uid.getUid("messagesDetailTitleBar");
this.messagesDetailTitleBarTextUid=SIX.Uid.getUid("messagesDetailTitleBarText");
this.aMessages=new Object();
this.aMessagesOrder=new Array();
this.nIndexLastMessageDeleted=-1;
this.bandwidthPaneUid=SIX.Uid.getUid("bandwidthPane");
this.bandwidthTabUid=SIX.Uid.getUid("bandwidthTab");
this.bandwidthBusyTextUid=SIX.Uid.getUid("bandwidthBusyText");
this.bandwidthResultsUid=SIX.Uid.getUid("bandwidthResults");
this.bandwidthImageContainerUid=SIX.Uid.getUid("ImageContainer");
this.bandwidthIndicatorContainerUid=SIX.Uid.getUid("indicatorContainer");
this.bandwidthIndicatorUid=SIX.Uid.getUid("indicator");
this.bandwidthSpeedUid=SIX.Uid.getUid("bandwidthSpeed");
this.bandwidthStatusUid=SIX.Uid.getUid("bandwidthStatus");
this.bandwidthSummaryUid=SIX.Uid.getUid("bandwidthSummary");
this.healthPaneUid=SIX.Uid.getUid("healthPane");
this.healthTabUid=SIX.Uid.getUid("healthTab");
this.healthTableUid=SIX.Uid.getUid("healthTable");
this.healthUid=SIX.Uid.getUid("health");
this.statisticsTitleBarUid=SIX.Uid.getUid("statisticsTitleBar");
this.statisticsTitleBarTextUid=SIX.Uid.getUid("statisticsTitleBarText");
this.statisticsUid=SIX.Uid.getUid("statistics");
this.statisticsContentsUid=SIX.Uid.getUid("statisticsContents");
this.progressPaneUid=SIX.Uid.getUid("progressPane");
this.progressTabUid=SIX.Uid.getUid("progressTab");
this.aTabsVisibility=new Array();
this.aTabsVisibility[SIX.eConsoleTabs.MESSAGES]=true;
this.aTabsVisibility[SIX.eConsoleTabs.BANDWIDTH]=true;
this.aTabsVisibility[SIX.eConsoleTabs.HEALTH]=true;
this.aTabsVisibility[SIX.eConsoleTabs.PROGRESS]=true;
this.aTabIds=new Array();
this.aTabIds[SIX.eConsoleTabs.MESSAGES]=this.messagesTabUid;
this.aTabIds[SIX.eConsoleTabs.BANDWIDTH]=this.bandwidthTabUid;
this.aTabIds[SIX.eConsoleTabs.HEALTH]=this.healthTabUid;
this.aTabIds[SIX.eConsoleTabs.PROGRESS]=this.progressTabUid;
this.activeTab=SIX.eConsoleTabs.PROGRESS;
this.aHealthIndicators=new Object();
this.ECWJP2ProgressUid=SIX.Uid.getUid("ECWJP2Progress");
this.GISOverlayProgressUid=SIX.Uid.getUid("GISOverlayProgress");
this.ECWJP2ProgressBar=new NCSProgressbar3(this.ECWJP2ProgressUid,null,350,20,20,true,"Images :",65,35);
this.ECWJP2ProgressBar.setProgressCompleteColor("#00ff00");
this.ECWJP2ProgressBar.setProgressIncompleteColor("#ff0000");
this.GISOverlayProgressBar=new NCSProgressbar3(this.GISOverlayProgressUid,null,350,20,20,true,"Themes :",65,35);
this.GISOverlayProgressBar.setProgressCompleteColor("#00ff00");
this.GISOverlayProgressBar.setProgressIncompleteColor("#ff0000");
this.objDownloadSpeedIndicator=new SIX.Indicator(this.bandwidthIndicatorUid,this.bandwidthIndicatorContainerUid,40,4,20,2,"borderwidth=0;completecolor=#FF9900;incompletecolor=#FFFFFF");
this.objDownloadSpeedIndicator.addBottomLabels(SIXConfig.aBandwidthSpeedLabels);
this.objDownloadSpeedIndicator.addBottomLabels(SIXConfig.aBandwidthStatus);
this.objDownloadSpeedIndicator.setCompleteColors(["#FF0000","#FF0000","#FF9900","#FF9900","#FFFF00","#FFFF00","#00FF00","#00FF00"]);
};
SIX.Console.prototype.init=function(){
return "";
};
SIX.Console.prototype.buildFixed=function(){
var txt="<div class='consoleTabRowBackground'>&nbsp;</div>"+"<img class='consoleCloseButton' "+SIX.App.imageSrc("images/close")+" border='0' onclick='"+this.channel.myself+".hideConsole();'>"+"<div class='consoleTabRow'>"+"<div style='cursor:"+(SIX.App.isIE?"hand":"pointer")+(this.aTabsVisibility[SIX.eConsoleTabs.PROGRESS]?"":";display:none")+"' class='consoleTab"+(this.activeTab==SIX.eConsoleTabs.PROGRESS?"On":"Off")+"' id='"+this.progressTabUid+"' onclick='"+this.myself+".setTab("+SIX.eConsoleTabs.PROGRESS+");'><div class='consoleTabTitle'>Progress</div></div>"+"<div style='cursor:"+(SIX.App.isIE?"hand":"pointer")+(this.aTabsVisibility[SIX.eConsoleTabs.BANDWIDTH]?"":";display:none")+"' class='consoleTab"+(this.activeTab==SIX.eConsoleTabs.BANDWIDTH?"On":"Off")+"' id='"+this.bandwidthTabUid+"' onclick='"+this.myself+".setTab("+SIX.eConsoleTabs.BANDWIDTH+");'><div class='consoleTabTitle'>Bandwidth</div></div>"+"<div style='cursor:"+(SIX.App.isIE?"hand":"pointer")+(this.aTabsVisibility[SIX.eConsoleTabs.HEALTH]?"":";display:none")+"' class='consoleTab"+(this.activeTab==SIX.eConsoleTabs.HEALTH?"On":"Off")+"' id='"+this.healthTabUid+"' onclick='"+this.myself+".setTab("+SIX.eConsoleTabs.HEALTH+");'><div class='consoleTabTitle'>Health</div></div>"+"<div style='cursor:"+(SIX.App.isIE?"hand":"pointer")+(this.aTabsVisibility[SIX.eConsoleTabs.MESSAGES]?"":";display:none")+"' class='consoleTab"+(this.activeTab==SIX.eConsoleTabs.MESSAGES?"On":"Off")+"' id='"+this.messagesTabUid+"' onclick='"+this.myself+".setTab("+SIX.eConsoleTabs.MESSAGES+");'><div class='consoleTabTitle'>Messages</div></div>"+"</div>";
return txt;
};
SIX.Console.prototype.build=function(){
var _f73="<div id='"+this.messagesPaneUid+"' class='consoleMessages' "+(this.activeTab==SIX.eConsoleTabs.MESSAGES?"":"style='display:none'")+">"+"<div  id='"+this.messagesSummaryUid+"' class='consoleMessagesSummary'>"+"<table class='sortable' cellspacing='0' cellpadding='2'"+(SIX.App.isIE?"":"style='width:100%'")+" name='"+this.messagesTableUid+"' id='"+this.messagesTableUid+"'>"+"<tr>"+"<td "+(SIX.App.isIE?"":"width='50%'")+" class='consoleTableHeading' title='Click to sort'>Message</td>"+"<td "+(SIX.App.isIE?"":"width='50%'")+" class='consoleTableHeading' title='Click to sort'>Time</td>"+(SIX.App.isIE?"":"<td style='visibility:hidden;'>&nbsp;</td>")+"</tr>"+"</table>"+"</div>"+"<div id='"+this.messagesDetailUid+"' class='consoleMessagesDetail' style='display:none'>"+"<div id='"+this.messagesDetailTitleBarUid+"' class='consoleMessagesDetailTitleBar'>"+"<div id='"+this.messagesDetailTitleBarTextUid+"' class='consoleMessagesDetailTitleBarText'>Message Detail</div>"+"<img class='consoleMessagesDetailCloseButton' "+SIX.App.imageSrc("images/close")+" border='0' onclick='"+this.myself+".hideMessageDetail();'>"+"</div>"+"<div class='consoleMessagesDetailContentsOuter'>"+"<div id='"+this.messagesDetailContentsUid+"' class='consoleMessagesDetailContentsInner'>&nbsp;</div>"+"</div>"+"</div>"+"</div>"+"<div id='"+this.healthPaneUid+"' class='consoleHealthPane' "+(this.activeTab==SIX.eConsoleTabs.HEALTH?"":"style='display:none'")+">"+"<div id='"+this.healthUid+"' class='consoleHealth'>"+"<table class='sortable' cellspacing='1' cellpadding='2'"+(SIX.App.isIE?"":"style='width:100%'")+" name='"+this.healthTableUid+"' id='"+this.healthTableUid+"'>"+"<tr>"+"<td "+(SIX.App.isIE?"":"width='25%'")+" class='consoleHealthServiceNameHeading' title='Click to sort'>Service Name</td>"+"<td "+(SIX.App.isIE?"":"width='25%'")+" class='consoleHealthServerNameHeading' title='Click to sort'>Server Name</td>"+"<td "+(SIX.App.isIE?"":"width='25%'")+" class='consoleTableHeading' title='Click to sort'>Health</td>"+"<td "+(SIX.App.isIE?"":"width='25%'")+" class='consoleHealthStatisticsHeading' title='Click to sort'>Statistics</td>"+(SIX.App.isIE?"":"<td style='visibility:hidden;'>&nbsp;</td>")+"</tr>"+"</table>"+"</div>"+"<div id='"+this.statisticsUid+"' class='consoleStatistics'  style='display:none'>"+"<div id='"+this.statisticsTitleBarUid+"' class='consoleStatisticsTitleBar'>"+"<div id='"+this.statisticsTitleBarTextUid+"' class='consoleStatisticsTitleBarText'>&nbsp;</div>"+"<img class='consoleStatisticsCloseButton' "+SIX.App.imageSrc("images/close")+" border='0' onclick='"+this.myself+".hideStatistics();'>"+"</div>"+"<div id='"+this.statisticsContentsUid+"' style='height:100%;border-bottom:solid 1px #ffffff'>&nbsp</div>"+"</div>"+"</div>"+"<div id='"+this.progressPaneUid+"' class='consoleProgress' "+(this.activeTab==SIX.eConsoleTabs.PROGRESS?"":"style='display:none'")+">"+"<div class='consoleProgressBarOuter'>"+"<div class='consoleProgressBarInner'>"+"<div class='consoleProgressBar'>"+this.ECWJP2ProgressBar.build()+"</div>"+"<div class='consoleProgressBar'>"+this.GISOverlayProgressBar.build()+"</div>"+"</div>"+"</div>"+"</div>"+"<div id='"+this.bandwidthPaneUid+"' class='consoleBandwidth' style='"+(this.activeTab==SIX.eConsoleTabs.BANDWIDTH?"":"display:none;")+"'>";
if(SIXConfig.aBandwidthTests.length==1){
_f73+="<div class='consoleBandwidthTestButtonContainer'>"+"<input name='Test Bandwidth' value='Test Bandwidth' type='button' class='consoleBandwidthTestButtonContainer' onclick='"+this.myself+".testBandwidth(0)'>"+"</div>";
}else{
_f73+="<table align=center>"+"<tr>"+"<td class='consoleBandwidthTableHeading'>Test Size</th>"+"<td class='consoleBandwidthTableHeading' style='text-align:left'>Suitable For</th>"+"</tr>";
for(var i=0;i<SIXConfig.aBandwidthTests.length;i++){
var _f75=SIXConfig.aBandwidthTests[i];
_f73+="<tr><td class='consoleBandwidthTableCell'>"+"<a href='#' class='consoleBandwidthText' onclick='"+this.myself+".testBandwidth("+i+")'>"+_f75.sName+"</a></td>"+"<td class='consoleBandwidthTableCell' style='text-align:left'>"+_f75.sSuitability+"</td></tr>";
}
_f73+="</table>";
}
_f73+="<div id='"+this.bandwidthBusyTextUid+"' class='consoleBandwidthResults' style='display:none;'>&nbsp;</div>"+"<div id='"+this.bandwidthResultsUid+"' class='consoleBandwidthResults' style='text-align:center;margin-left:0px;margin-right:0px;display:none;'>"+"<div id='"+this.bandwidthIndicatorContainerUid+"' style='text-align:center;margin-left:auto;margin-right:auto;display:block;width:100%;height:60px;'>&nbsp;</div>"+"<div id='"+this.bandwidthSpeedUid+"' style='text-align:center;margin-left:auto;margin-right:auto;display:block;width:100%;'>&nbsp;</div>"+"<div id='"+this.bandwidthSummaryUid+"'  style='text-align:center;margin-left:auto;margin-right:auto;display:block;width:100%;'>&nbsp;</div>"+"<div id='"+this.bandwidthImageContainerUid+"' style='text-align:center;margin-left:auto;margin-right:auto;display:block;' align='center' class='consoleBandwidthImageContainer'>&nbsp;</div>"+"</div>"+"</div>";
return _f73;
};
SIX.Console.prototype.setTab=function(tab){
if(tab!=this.activeTab){
var _f77=document.getElementById(this.aTabIds[this.activeTab]);
if(_f77){
_f77.setAttribute("class","consoleTabOff");
_f77.setAttribute("className","consoleTabOff");
}
var _f78=document.getElementById(this.aTabIds[tab]);
if(_f78){
_f78.setAttribute("class","consoleTabOn");
_f78.setAttribute("className","consoleTabOn");
}
var _f79=null;
switch(this.activeTab){
case SIX.eConsoleTabs.MESSAGES:
_f79=document.getElementById(this.messagesPaneUid);
break;
case SIX.eConsoleTabs.HEALTH:
_f79=document.getElementById(this.healthPaneUid);
break;
case SIX.eConsoleTabs.BANDWIDTH:
_f79=document.getElementById(this.bandwidthPaneUid);
break;
case SIX.eConsoleTabs.PROGRESS:
_f79=document.getElementById(this.progressPaneUid);
break;
default:
break;
}
if(_f79){
_f79.style.display="none";
}
var _f7a=null;
switch(tab){
case SIX.eConsoleTabs.MESSAGES:
_f7a=document.getElementById(this.messagesPaneUid);
break;
case SIX.eConsoleTabs.HEALTH:
_f7a=document.getElementById(this.healthPaneUid);
break;
case SIX.eConsoleTabs.BANDWIDTH:
_f7a=document.getElementById(this.bandwidthPaneUid);
break;
case SIX.eConsoleTabs.PROGRESS:
_f7a=document.getElementById(this.progressPaneUid);
break;
default:
break;
}
if(_f7a){
_f7a.style.display="block";
}
this.activeTab=tab;
}
};
SIX.Console.prototype.setTabVisibility=function(eTab,_f7c){
this.aTabsVisibility[eTab]=_f7c;
};
SIX.Console.prototype.setActiveTab=function(eTab,_f7e){
this.activeTab=eTab;
};
SIX.Console.prototype.addMessage=function(_f7f){
var _f80=document.getElementById(this.messagesTableUid);
if(_f80){
var _f81=_f80.getElementsByTagName("tbody").item(0);
var _f82=_f81.getElementsByTagName("tr");
if(_f82.length>SIXConfig.MAX_CONSOLE_ENTRIES){
this.nIndexLastMessageDeleted++;
var _f83=document.getElementById(this.aMessagesOrder[this.nIndexLastMessageDeleted]);
if(_f83){
var _f84=getParent(_f83,"tr");
if(_f84){
_f81.removeChild(_f84);
}
}
}
var _f84=document.createElement("tr");
if(_f7f.sClass!=""){
_f84.setAttribute("class",_f7f.sClass);
_f84.setAttribute("className",_f7f.sClass);
}
var tNow=new Date();
this.aMessages[_f7f.uid]=_f7f;
this.aMessagesOrder[this.aMessagesOrder.length]=_f7f.uid;
var _f86=this;
var _f87=document.createElement("a");
_f87.setAttribute("class","consoleText");
_f87.setAttribute("className","consoleText");
_f87.setAttribute("name",_f7f.uid);
_f87.setAttribute("id",_f7f.uid);
_f87.setAttribute("href","#");
_f87.setAttribute("title","Click for details");
_f87.onclick=function(_f88){
with(_f86){
_f86.showMessageDetail(this.name);
}
return false;
};
var _f89=document.createElement("td");
_f89.setAttribute("class","consoleText");
_f89.setAttribute("className","consoleText");
var _f8a=this.aliasServerNames(_f7f.sSummary);
_f8a=(_f8a.length<SIXConfig.MAX_CONSOLE_ENTRY_SUMMARY_LENGTH)?_f8a:(_f8a.substring(0,SIXConfig.MAX_CONSOLE_ENTRY_SUMMARY_LENGTH-3)+"...");
var _f8b=document.createTextNode(_f8a);
_f87.appendChild(_f8b);
_f89.appendChild(_f87);
_f84.appendChild(_f89);
var _f8c=document.createElement("td");
_f8c.setAttribute("class","consoleTableCell");
_f8c.setAttribute("className","consoleTableCell");
var _f8d=document.createTextNode(tNow);
_f8c.appendChild(_f8d);
_f84.appendChild(_f8c);
_f81.appendChild(_f84);
}
};
SIX.Console.prototype.hideMessageDetail=function(){
var _f8e=document.getElementById(this.messagesDetailUid);
if(_f8e){
_f8e.style.display="none";
}
var _f8f=document.getElementById(this.messagesSummaryUid);
if(_f8f){
_f8f.style.height="100%";
}
};
SIX.Console.prototype.showMessageDetail=function(_f90){
if(this.aMessages[_f90]){
var _f91=document.getElementById(this.messagesDetailUid);
if(_f91){
_f91.style.display="block";
var _f92=document.getElementById(this.messagesDetailContentsUid);
if(_f92){
_f92.innerHTML=this.aliasServerNames(this.aMessages[_f90].sDetail);
}
}
var _f93=document.getElementById(this.messagesSummaryUid);
if(_f93){
_f93.style.height="50%";
}
}
};
SIX.Console.prototype.aliasServerNames=function(_f94){
for(var i=0;i<SIXConfig.aServerAliases.length;i++){
var re=new RegExp(SIXConfig.aServerAliases[i].sName,"gi");
_f94=_f94.replace(re,SIXConfig.aServerAliases[i].sAlias);
}
return _f94;
};
SIX.Console.prototype.addService=function(svc){
if(!this.aServices[svc.uid]){
this.aServices[svc.uid]=svc;
}
this.addHealthIndicator(svc);
};
SIX.Console.prototype.updateHealth=function(svc){
if(svc.parentService){
this.updateHealth(svc.parentService);
}
if(this.aServices[svc.uid]){
var _f99=0;
var _f9a=0;
var _f9b=svc.statistics.aRequestsByType;
var _f9c=svc.statistics.aAllRequests;
if(_f9c.length){
var _f9d=_f9c[_f9c.length-1].date.getTime();
var _f9e=_f9d-SIXConfig.STATISTICS_CALCULATION_PERIOD;
for(var j in _f9b){
if(_f9b.hasOwnProperty(j)){
var _fa0=_f9b[j];
var _fa1=_fa0.length;
var _fa2=SIX.Util.searchObjectArray(_fa0,"nTimeStamp",_f9e);
var _fa1=(_fa2<0?_fa0.length+_fa2+1:_fa0.length-_fa2);
if(j==("#"+SIXConfig.eRequestResponseStatus.SUCCESS)){
_f99+=_fa1;
}else{
_f9a+=_fa1;
}
}
}
var _fa3=100;
if(_f99||_f9a){
_fa3=Math.floor(100*_f99/(_f99+_f9a));
}
this.setHealth(svc,_fa3);
}
}
};
SIX.Console.prototype.setHealth=function(svc,_fa5){
if(this.aServices[svc.uid]){
this.aHealthIndicators[svc.uid].setValue(_fa5);
}
};
SIX.Console.prototype.addHealthIndicator=function(svc){
if(!this.aHealthIndicators[svc.uid]){
var _fa7=document.getElementById(this.healthTableUid);
if(_fa7){
var _fa8=_fa7.getElementsByTagName("tbody").item(0);
var _fa9=document.createElement("tr");
var _faa=document.createElement("td");
_faa.setAttribute("class","consoleHealthServiceNameCell");
_faa.setAttribute("className","consoleHealthServiceNameCell");
var _fab=document.createTextNode(svc.name);
_faa.appendChild(_fab);
_fa9.appendChild(_faa);
var _fac=document.createElement("td");
_fac.setAttribute("class","consoleHealthServerNameCell");
_fac.setAttribute("className","consoleHealthServerNameCell");
var _fad=(svc.access instanceof SIX.Access.ECWP)?SIXConfig.ECWP_SERVER:svc.host;
var _fae=document.createTextNode(_fad?this.aliasServerNames(_fad):"");
_fac.appendChild(_fae);
_fa9.appendChild(_fac);
var _faf=SIX.Uid.getUid("healthContainer");
var _fb0=SIX.Uid.getUid("health");
var _fb1=document.createElement("td");
_fb1.setAttribute("id",_faf);
_fb1.setAttribute("class","consoleTableCell");
_fb1.setAttribute("className","consoleTableCell");
var _fb2=new SIX.Indicator(_fb0,_faf,10,10,15,2,"borderwidth=0;completecolor=#00FF00;incompletecolor=#FF0000");
_fa9.appendChild(_fb1);
var _fb3=document.createElement("td");
_fb3.setAttribute("class","consoleHealthStatisticsCell");
_fb3.setAttribute("className","consoleHealthStatisticsCell");
var _fb4=document.createElement("a");
_fb4.setAttribute("name",svc.uid);
_fb4.setAttribute("href","#");
_fb4.setAttribute("title","Statistics...");
var _fb5=this;
_fb4.onclick=function(_fb6){
with(_fb5){
_fb5.showStatistics(this.name);
}
return false;
};
var _fb7=document.createTextNode("Statistics...");
_fb4.appendChild(_fb7);
_fb3.appendChild(_fb4);
_fa9.appendChild(_fb3);
_fa8.appendChild(_fa9);
_fb2.build();
_fb2.setValue(100);
this.aHealthIndicators[svc.uid]=_fb2;
}
}
};
SIX.Console.prototype.hideStatistics=function(){
var _fb8=document.getElementById(this.statisticsUid);
if(_fb8){
_fb8.style.display="none";
}
var _fb9=document.getElementById(this.healthUid);
if(_fb9){
_fb9.style.height="100%";
}
};
SIX.Console.prototype.showStatistics=function(_fba){
if(this.aServices[_fba]){
var _fbb=this.aServices[_fba];
var _fbc=document.getElementById(this.statisticsTitleBarTextUid);
if(_fbc){
_fbc.innerHTML=_fbb.name+" Service Statistics";
}
var _fbd=document.getElementById(this.statisticsUid);
if(_fbd){
_fbd.style.display="block";
var _fbe=document.getElementById(this.statisticsContentsUid);
if(_fbe){
_fbe.innerHTML=_fbb.buildStatistics();
}
}
var _fbf=document.getElementById(_fbb.statistics.uid);
if(_fbf){
ts_makeSortable(_fbf);
}
_fbb.updateStatistics();
var _fc0=document.getElementById(this.healthUid);
if(_fc0){
_fc0.style.height="50%";
}
}
};
SIX.Console.prototype.setGISOverlayProgress=function(_fc1){
this.GISOverlayProgressBar.setProgress(_fc1);
};
SIX.Console.prototype.setECWJP2Progress=function(_fc2){
this.ECWJP2ProgressBar.setProgress(_fc2);
};
SIX.Console.prototype.writeImageTag=function(_fc3,sUrl,_fc5,_fc6){
var _fc7=(new Date()).getTime();
var _fc8=document.getElementById(_fc3);
_fc8.innerHTML="<img src='"+sUrl+"?start="+encodeURIComponent(_fc7)+"' "+_fc6+" onload='"+this.myself+".onLoadImage("+_fc7+","+_fc5+")'>";
};
SIX.Console.prototype.onLoadImage=function(_fc9,_fca){
var nEnd=(new Date()).getTime();
var _fcc=(nEnd-_fc9)/1000;
var _fcd=_fca/1024;
var _fce=_fcd/1024;
var _fcf=_fca/_fcc;
var _fd0=_fcd/_fcc;
var _fd1=_fce/_fcc;
var _fd2=_fcf*8;
var _fd3=_fd0*8;
var _fd4=_fd1*8;
var _fd5=document.getElementById(this.bandwidthSpeedUid);
_fd5.innerHTML="Speed: "+_fd3.toFixed(0)+" kbps";
var _fd6="";
var _fd7=0;
if(_fd2<=SIXConfig.aBandwidthSpeeds[0]){
_fd7=0;
}else{
if(_fd2>=SIXConfig.aBandwidthSpeeds[SIXConfig.aBandwidthSpeeds.length-1]){
_fd7=100;
}else{
for(var i=0;i<SIXConfig.aBandwidthSpeeds.length-1;i++){
if((_fd2>=SIXConfig.aBandwidthSpeeds[i])&&(_fd2<SIXConfig.aBandwidthSpeeds[i+1])){
var _fd9=100/(SIXConfig.aBandwidthSpeeds.length-1);
_fd7=Math.round(_fd9*(i+(_fd2-SIXConfig.aBandwidthSpeeds[i])/(SIXConfig.aBandwidthSpeeds[i+1]-SIXConfig.aBandwidthSpeeds[i])));
break;
}
}
}
}
for(var i=0;i<SIXConfig.aBandwidthThresholds.length;i++){
if(_fd2>=SIXConfig.aBandwidthThresholds[i]){
if((i+1)==SIXConfig.aBandwidthThresholds.length){
if(_fd2>=SIXConfig.aBandwidthThresholds[i]){
_fd6=SIXConfig.aBandwidthStatus[i];
break;
}
}else{
if((_fd2>=SIXConfig.aBandwidthThresholds[i])&&(_fd2<SIXConfig.aBandwidthThresholds[i+1])){
_fd6=SIXConfig.aBandwidthStatus[i];
break;
}
}
}
}
var _fda=document.getElementById(this.bandwidthSummaryUid);
if(_fcd<1024){
_fda.innerHTML=""+_fcd.toFixed(0)+" KB downloaded in "+_fcc+" seconds.";
}else{
_fda.innerHTML=""+_fce.toFixed(2)+" MB downloaded in "+_fcc+" seconds.";
}
this.objDownloadSpeedIndicator.build();
this.objDownloadSpeedIndicator.setValue(_fd7);
this.showResults();
};
SIX.Console.prototype.showResults=function(){
var _fdb=document.getElementById(this.bandwidthBusyTextUid);
if(_fdb){
_fdb.style.display="none";
}
var _fdc=document.getElementById(this.bandwidthResultsUid);
_fdc.style.display="block";
};
SIX.Console.prototype.showBusyText=function(_fdd){
var _fde=document.getElementById(this.bandwidthResultsUid);
_fde.style.display="none";
var _fdf=document.getElementById(this.bandwidthBusyTextUid);
if(_fdf){
_fdf.style.display="block";
_fdf.innerHTML=_fdd;
}
};
SIX.Console.prototype.showImageContainer=function(_fe0){
var _fe1=document.getElementById(this.bandwidthImageContainerUid);
if(_fe1&&(_fe0==this.bandwidthImageContainerUid)){
_fe1.style.display="block";
}else{
_fe1.style.display="none";
}
};
SIX.Console.prototype.testBandwidth=function(_fe2){
var _fe3=SIXConfig.aBandwidthTests[_fe2];
this.showImageContainer(this.bandwidthImageContainerUid);
this.showBusyText("Downloading image...");
this.writeImageTag(this.bandwidthImageContainerUid,_fe3.sImagePath,_fe3.nSize,"alt='"+_fe3.sImageDescription+"'");
};
SIX.Service.prototype.getRequestResponseStatus=function(_fe4){
var _fe5=SIXConfig.eRequestResponseStatus.FAILURE;
if(_fe4&&typeof _fe4=="string"){
var _fe6=_fe4.toLowerCase();
for(var i=0;i<aRequestResponseStatus.length;i++){
var _fe8=aRequestResponseStatus[i].sErrorString.toLowerCase();
if(_fe6.indexOf(_fe8)!=-1){
_fe5=i;
break;
}
}
}
return _fe5;
};
SIX.Service.prototype.onSelectDisplayBest=function(){
this.catalog.bDisplayBest=this.bDisplayBest=!this.bDisplayBest;
var _fe9=document.getElementById(this.displayBestSelectedUid);
var _fea=document.getElementById(this.displayBestUnselectedUid);
if(_fe9){
_fe9.style.display=this.bDisplayBest?"":"none";
}
if(_fea){
_fea.style.display=this.bDisplayBest?"none":"";
}
var map=this.catalog.maps[0];
if(this.bDisplayBest){
if(map.hiddenLayers(this)){
this.attachWin.build();
this.updateMap(map);
this.access.orderLayers(map);
}else{
this.attachWin.build();
}
}else{
this.attachWin.build();
}
};
SIX.Service.prototype.sortLayersInBestOrder=function(map){
var _fed=new Array();
for(var i=0;i<this.layers.length;i++){
var _fef=new Object();
_fef.layer=this.layers[this.layersOrder[i]];
_fef.nOrder=this.layersOrder[i];
_fef.bSelected=(_fef.layer.nBestIndex<0?this.layers[this.layersOrder[i]].bSelected:this.layers[this.layersOrder[i]].bInScale);
_fed[i]=_fef;
}
var _ff0=false;
var _ff1=function(_ff2,_ff3){
var _ff4=0;
if(_ff2.layer.nBestIndex<0&&_ff3.layer.nBestIndex>=0){
_ff4=-1;
}else{
if(_ff2.layer.nBestIndex>=0&&_ff3.layer.nBestIndex<0){
_ff4=1;
}else{
if(_ff2.layer.nBestIndex<0&&_ff3.layer.nBestIndex<0){
if(_ff2.nOrder<_ff3.nOrder){
_ff4=-1;
}else{
if(_ff2.nOrder>_ff3.nOrder){
_ff4=1;
}
}
}else{
if(!_ff2.bSelected&&_ff3.bSelected){
_ff4=1;
}else{
if(_ff2.bSelected&&!_ff3.bSelected){
_ff4=-1;
}else{
if(_ff2.layer.nBestIndex<_ff3.layer.nBestIndex){
_ff4=1;
}else{
if(_ff2.layer.nBestIndex>_ff3.layer.nBestIndex){
_ff4=-1;
}
}
}
}
}
}
}
return _ff4;
};
_fed.sort(_ff1);
var _ff5=-1;
for(var i=0;i<this.layers.length;i++){
var _ff6=_fed[i].layer;
if(_ff5!=-1){
_fed[i].bSelected=false;
}else{
if(_fed[i].bSelected){
if(map.loaded&&_ff6.nBestIndex>=0){
if(_ff6.envelopeLL&&i>0){
for(var j=i-1;j>=0;j--){
var _ff8=_fed[j];
if(_ff8.bSelected&&_ff8.layer.nBestIndex>=0&&_ff8.layer.envelopeLL&&_ff8.layer.envelopeLL.contains(_ff6.envelopeLL)){
_fed[i].bSelected=false;
break;
}
}
}
if(_fed[i].bSelected){
var _ff9=new SIX.Point(map.getTopLeftLongitude(),map.getTopLeftLatitude());
var _ffa=new SIX.Point(map.getTopRightLongitude(),map.getTopRightLatitude());
var _ffb=new SIX.Point(map.getBottomRightLongitude(),map.getBottomRightLatitude());
var _ffc=new SIX.Point(map.getBottomLeftLongitude(),map.getBottomLeftLatitude());
var _ffd=new Array();
_ffd[_ffd.length]=_ff9;
_ffd[_ffd.length]=_ffa;
_ffd[_ffd.length]=_ffb;
_ffd[_ffd.length]=_ffc;
if(_ff6.containsPoints(_ffd)){
if(_ff6.aLayers.length){
for(var j=0;j<_ff6.aLayers.length;j++){
var _ffe=_ff6.aLayers[j];
var _fff=true;
if(_ffe.envelopeLL&&_ffe.envelopeLL.containsPoints(_ffd)){
if((SIX.App.bDHTMLControl&&(!_ffe.aClipRegion.length||map.inLayerClipRegion(_ffe)))||(!SIX.App.bDHTMLControl&&!_ffe.aImageRegion.length)){
_ff5=_fed[i].nOrder;
break;
}
}
}
}else{
_ff5=_fed[i].nOrder;
}
}
}
}
}
}
}
_fed.sort(_ff1);
for(var i=0;i<this.layers.length;i++){
if((_fed[i].nOrder!=this.layersOrder[i])||(_fed[i].bSelected!=this.layers[this.layersOrder[i]].bSelected)){
_ff0=true;
}
this.layersOrder[i]=_fed[i].nOrder;
this.layers[this.layersOrder[i]].setSelected(_fed[i].bSelected);
}
return _ff0;
};
SIX.Service.prototype.setLayerZIndex=function(_1000,_1001,_1002){
var sId=(_1000!=null?_1000:"");
var sName=(_1001!=null?_1001:"");
if(sId!=""||sName!=""){
this.aLayerZIndices[this.aLayerZIndices.length]={id:sId,name:sName,nZIndex:_1002};
}
};
SIX.Service.prototype.getLayerZIndex=function(_1005,_1006){
var _1007=-1;
for(var i=0;i<this.aLayerZIndices.length;i++){
if((_1005!=""&&_1005==this.aLayerZIndices[i].id)||(_1006!=""&&_1006==this.aLayerZIndices[i].name)){
_1007=this.aLayerZIndices[i].nZIndex;
break;
}
}
return _1007;
};
SIX.Service.prototype.sortLayersByZIndex=function(){
var _1009=false;
var _100a=new Array();
for(var i=0;i<this.layers.length;i++){
var _100c=new Object();
_100c.layer=this.layers[this.layersOrder[i]];
_100c.nOrder=this.layersOrder[i];
_100a[i]=_100c;
}
var _100d=function(_100e,_100f){
var _1010=0;
if(_100e.layer.nZIndex<_100f.layer.nZIndex){
_1010=1;
}else{
if(_100e.layer.nZIndex>_100f.layer.nZIndex){
_1010=-1;
}
}
return _1010;
};
_100a.sort(_100d);
for(var i=0;i<this.layers.length;i++){
if(_100a[i].nOrder!=this.layersOrder[i]){
_1009=true;
}
this.layersOrder[i]=_100a[i].nOrder;
}
return _1009;
};
SIX.Service.prototype.addChildServicesSlider=function(_1011){
this.childServicesSlider=_1011;
return _1011;
};
SIX.Service.prototype.childServicesSliderCallback=function(){
if(!this.tSetChildServicesTransparenciesInterval){
this.tSetChildServicesTransparenciesInterval=setInterval(this.myself+".setChildServicesTransparencies()",100);
}
};
SIX.Service.prototype.cancelSetChildServicesTransparencies=function(){
if(this.tSetChildServicesTransparenciesTimeout){
clearTimeout(this.tSetChildServicesTransparenciesTimeout);
this.tSetChildServicesTransparenciesTimeout=null;
}
if(this.tSetChildServicesTransparenciesInterval){
clearInterval(this.tSetChildServicesTransparenciesInterval);
this.tSetChildServicesTransparenciesInterval=null;
}
};
SIX.Service.prototype.setChildServicesTransparencies=function(){
if(this.tSetChildServicesTransparenciesTimeout){
clearTimeout(this.tSetChildServicesTransparenciesTimeout);
}
this.tSetChildServicesTransparenciesTimeout=setTimeout(this.myself+".cancelSetChildServicesTransparencies()",500);
var _1012=this.childServicesSlider.getValue();
if(_1012<0){
_1012=0;
}
if(_1012>100){
_1012=100;
}
var _1013=this.aServices.length*_1012/100;
var _1014=Math.floor(_1013);
var _1015=document.getElementById(this.childServicesSlider.sliderUid);
if(_1015){
var _1016=_1015.offsetWidth/this.aServices.length;
var _1017=_1016-this.childServicesSlider.nTrackX;
var _1018=_1016-(_1015.offsetWidth-this.childServicesSlider.nTrackWidth-this.childServicesSlider.nTrackX);
if(_1014==0){
_1013=(_1016*_1013-this.childServicesSlider.nTrackX)/(_1017*2)+0.5;
}else{
if(_1014==this.aServices.length-1){
_1013=_1014+(_1016*(_1013-_1014))/(_1018*2);
}
}
}
var _1019=50-(_1013-_1014)*100;
var _101a=100-Math.abs(_1019);
var _101b=-1;
if(_101a<100){
if(_1019>0){
if(_1014>0){
_101b=_1014-1;
}
}else{
if(_1019<0){
if(_1014<this.aServices.length-1){
_101b=_1014+1;
}
}
}
}
for(var i=0;i<this.aServices.length;i++){
var _101d=this.aServices[i];
var _101e=(i==_1014||i==_101b);
if(_101e){
var _101f=100;
if(i==_1014){
_101f=_101a;
}else{
if(i==_101b){
_101f=100-_101a;
}
}
if(_101d.transparency!=(_101f/100)){
_101d.setTransparency(_101f);
}
}else{
if(_101d.transparency>0){
_101d.setTransparency(0);
}
}
}
};
SIX.Service.prototype.getLayerOrder=function(_1020){
var _1021=-1;
for(var i=0;i<this.layersOrder.length;i++){
if(_1020==this.layersOrder[i]){
_1021=i;
break;
}
}
return _1021;
};
SIX.Service.prototype.getBestScale=function(map){
return (this.access.getBestScale(map));
};
SIX.Service.prototype.attachService=function(svc){
this.aAttachedServices[this.aAttachedServices.length]=svc;
svc.aServicesAttachedTo[svc.aServicesAttachedTo.length]=this;
};
SIX.Service.prototype.setCopyright=function(_1025){
this.sCopyright=_1025;
};
SIX.SliderEx=function(_1026,_1027,_1028,_1029,_102a,_102b,_102c,_102d,_102e,_102f){
SIX.addRef(this);
this.attachObject=_1026;
this.attachObjectCallback=_1027;
this.barUid=SIX.Uid.getUid("LayerSliderBar");
this.pointerUid=SIX.Uid.getUid("LayerSliderPointer");
this.pointerContainerUid=SIX.Uid.getUid("LayerSliderPointerContainer");
this.aLabels=_1028;
this.sBarImage=_1029;
this.sPointerImage=_102a;
this.nPointerX=_102c;
this.nWidth=_102b;
this.nTrackX=_102c;
this.nTrackY=_102d;
this.nTrackWidth=_102e;
this.sToolTip=_102f;
};
SIX.SliderEx.prototype.action=function(_1030,_1031,x,y){
var _1034=document.getElementById(this.sliderUid);
var _1035=document.getElementById(this.pointerContainerUid);
if(_1034&&_1035){
var _1036=-5;
var _1037=SIX.Util.findPosX(_1034);
var _1038=Math.round(x)-_1037+_1036;
if(_1038>this.nTrackX+this.nTrackWidth){
_1038=this.nTrackX+this.nTrackWidth;
}else{
if(_1038<this.nTrackX){
_1038=this.nTrackX;
}
}
this.nPointerX=_1038;
_1035.style.left=this.nPointerX+"px";
_1035.style.top=this.nTrackY+"px";
this.attachObject[this.attachObjectCallback]();
}
};
SIX.SliderEx.prototype.getValue=function(){
var _1039=0;
var _103a=document.getElementById(this.sliderUid);
if(_103a){
_1039=100*this.nPointerX/_103a.offsetWidth;
}
return _1039;
};
SIX.SliderEx.prototype.setValue=function(_103b){
if(_103b<0){
_103b=0;
}else{
if(_103b>100){
_103b=100;
}
}
this.nPointerX=Math.round(this.nTrackX+this.nTrackWidth*_103b/100);
};
SIX.SliderEx.prototype.build=function(){
var sHTML="<div class='sliderExContainer'>"+"<div id='"+this.sliderUid+"' class='sliderEx'>"+"<img id='"+this.barUid+"' class='sliderExBar' style='width:"+this.nWidth+"px' alt='"+this.sToolTip+"' title='"+this.sToolTip+"' src='"+this.sBarImage+"'>"+"<div id='"+this.pointerContainerUid+"' class='sliderExPointer' style='left:"+this.nPointerX+"px;top:"+this.nTrackY+"px'>"+"<img id='"+this.pointerUid+"' alt='"+this.sToolTip+"' title='"+this.sToolTip+"' class='sliderExPointer' src='"+this.sPointerImage+"'>"+"</div>";
if(this.aLabels&&this.aLabels.length){
var _103d=Math.floor(this.nWidth/this.aLabels.length);
sHTML+="<div class='sliderExLabels' style='width:"+this.nWidth+"px'>";
for(var i=0;i<this.aLabels.length;i++){
var nLeft=Math.floor(i*this.nWidth/this.aLabels.length);
sHTML+="<div class='sliderExLabel' style='left:"+nLeft+"px;width:"+_103d+"px'>"+this.aLabels[i]+"</div>";
}
sHTML+="</div>";
}
sHTML+="</div>";
sHTML+="</div>";
SIX.App.addMouseAction(this.pointerUid,this,0,true);
SIX.App.addMouseAction(this.barUid,this,0,true);
return sHTML;
};
SIX.Slider=function(_1040){
SIX.addRef(this);
this.opacity=(_1040>=0&&_1040<=1)?_1040:1;
this.attachObject=new Array();
this.sliderUid=SIX.Uid.getUid("slider");
this.ptrUid=SIX.Uid.getUid("ptr");
SIX.App.addMouseAction(this.sliderUid,this,1,true);
SIX.App.addMouseAction(this.ptrUid,this,1,true);
};
SIX.Slider.prototype.init=function(){
return "";
};
SIX.Slider.prototype.build=function(){
var _1041="Change Transparency";
var _1042=Math.round(this.opacity*80)-5;
var _1043="<div class='sliderContainer' style='float:none'>"+"<span class='sliderLabel'>Imagery</span>"+"<div class='slider'>"+"<img id='"+this.sliderUid+"' class='sliderBar' alt='"+_1041+"' title='"+_1041+"'"+SIX.App.imageSrc("images/slider_line")+">"+"<img id='"+this.ptrUid+"' alt='"+_1041+"' title='"+_1041+"' class='sliderPointer' style='left:"+_1042+"px'"+SIX.App.imageSrc("images/slider_ptr")+">"+"</div><span class='sliderLabel'>Map</span></div>";
this.setSliderPosition(this.opacity*100);
return _1043;
};
SIX.Slider.prototype.attach=function(_1044,_1045,_1046){
if(!_1044){
return;
}
var item=new Object();
item.source=_1044;
item.targetUid=_1045;
item.fnCallback=_1046;
this.attachObject[this.attachObject.length]=item;
_1044.attachSlider=this;
if(_1046){
_1046(this.opacity);
}
};
SIX.Slider.prototype.action=function(_1048,_1049,x,y){
if(_1048!=1){
return;
}
var _104c=0;
var _104d=document.getElementById(this.sliderUid);
if(_104d){
var _104e=_104d.offsetWidth;
_104e=_104e?_104e:100;
var _104f=SIX.Util.findPosX(_104d);
if(_104f>0){
_104c=Math.round(100*(x-_104f-5)/_104e);
}else{
_104c=Math.round(100*(x-(this.attachWin.left+50)-5)/_104e);
}
}
this.setSliderPosition(_104c);
};
SIX.Slider.prototype.setSliderPosition=function(_1050){
if(_1050<0){
_1050=0;
}else{
if(_1050>99){
_1050=99;
}
}
var _1051=document.getElementById(this.ptrUid);
var _1052=document.getElementById(this.sliderUid);
if(_1051&&_1052){
_1051.style.left=Math.round(_1050*_1052.offsetWidth/100)-5+"px";
}
this.opacity=_1050/100;
for(var i=0;i<this.attachObject.length;i++){
var item=this.attachObject[i];
if(item.targetUid&&(targetElem=document.getElementById(item.targetUid))){
item.source.opacity=_1050/100;
targetElem.style.opacity=_1050/100;
if(targetElem.filters&&targetElem.filters.alpha){
targetElem.filters.alpha.opacity=_1050;
}
}
if(item.fnCallback){
item.fnCallback(_1050/100);
}
}
};
SIX.Status=function(win){
SIX.addRef(this);
this.name="Status";
this.win=win;
this.map=0;
this.scale=0;
this.nCurrentCoordSys=-1;
this.aCoordSysList=new Array();
this.coordsUid=SIX.Uid.getUid("coords");
this.scaleUid=SIX.Uid.getUid("scale");
this.errorUid=SIX.Uid.getUid("error");
this.coord1Uid=SIX.Uid.getUid("coord1");
this.coord1LabelUid=SIX.Uid.getUid("coord1Label");
this.coord2Uid=SIX.Uid.getUid("coord2");
this.coord2LabelUid=SIX.Uid.getUid("coord2Label");
this.tHideCoordSysMenuTimer=null;
this.sSelectedCoordSysMenuItemColor="#FFFFFF";
this.sSelectedCoordSysMenuItemBackgroundColor="#316AC5";
this.progressBarUid=SIX.Uid.getUid("progressBar");
this.progressPercentUid=SIX.Uid.getUid("progressPercent");
this.progressBar=new NCSProgressbar3(this.progressUid,null,80,15,10);
this.progressBar.setProgressCompleteColor("#666666");
this.progressBar.setProgressIncompleteColor("#FFFFFF");
};
SIX.Status.prototype.init=function(){
return "";
};
SIX.Status.prototype.showLastError=function(){
SIX.App.popupAlert(SIX.LastError.sTitle,SIX.LastError.sMessage,SIX.LastError.sErrorText,true);
this.hideErrorIndicator();
};
SIX.Status.prototype.hideErrorIndicator=function(){
var _1056=document.getElementById(this.errorUid);
if(_1056){
_1056.style.display="none";
}
};
SIX.Status.prototype.showErrorIndicator=function(){
var _1057=document.getElementById(this.errorUid);
if(_1057){
_1057.style.display="block";
}
};
SIX.Status.prototype.addCoordSysMenuItem=function(sName,_1059,_105a,bDMS){
var _105c=new Object();
_105c.sName=sName;
_105c.sDatum=_1059.toUpperCase();
_105c.sProjection=_105a.toUpperCase();
_105c.bDMS=bDMS?true:false;
_105c.uid=SIX.Uid.getUid("coordSysMenuItem");
this.aCoordSysList[this.aCoordSysList.length]=_105c;
if(this.nCurrentCoordSys==-1){
this.nCurrentCoordSys=0;
}
};
SIX.Status.prototype.changeCoordinatesFormat=function(_105d){
if((_105d>=0)&&(_105d<this.aCoordSysList.length)){
this.nCurrentCoordSys=_105d;
}else{
this.nCurrentCoordSys=0;
}
if(this.win){
this.win.contents.update();
}
};
SIX.Status.prototype.build=function(){
var _105e="Latitude :";
var _105f="Longitude :";
if(this.aCoordSysList.length){
var _1060=this.aCoordSysList[0];
if(_1060.sProjection!="GEODETIC"){
_105e="Easting :";
_105f="Northing :";
}
}
var txt="<div class='statusContainer'>"+"<div class='statusError' style='display:none' id='"+this.errorUid+"'><a href='#'><img alt='An error has occurred. Click here for details' title='An error has occurred. Click here for details' border=0"+SIX.App.imageSrc("images/error")+"onclick='"+this.myself+".showLastError()'></a></div>"+"<div class='statusCoordinates' id='"+this.coordsUid+"'>"+"<span class='statusLabel' id='"+this.coord1LabelUid+"'>"+_105e+"</span><span id='"+this.coord1Uid+"'></span>"+"<span class='statusLabel' id='"+this.coord2LabelUid+"'>"+_105f+"</span><span id='"+this.coord2Uid+"'></span>"+"<img class='statusCoordinatesChooserIcon' "+SIX.App.imageSrc("images/collapse")+" border='0' onclick='"+this.myself+".showCoordSysMenu()'>"+"</div>"+"<div class='statusButton'>"+"<img "+SIX.App.imageSrc("images/status")+" border='0' onmouseover='this.src = SIX.App.imageUrl(\"images/status_on\")' onmouseout='this.src = SIX.App.imageUrl(\"images/status\")' onclick='"+this.myself+".showHideConsole();'>"+"</div>"+"<div class='statusProgress'>"+"<div class='statusProgressLabel'>Progress :</div>"+"<div class='statusProgressBar'>"+this.progressBar.build()+"</div>"+"<div class='statusProgressPercent' id='"+this.progressPercentUid+"'>0 %</div>"+"</div>"+"<div class='statusScale'>"+"<span class='statusLabel' style='margin-left:2px'>Scale :</span><span>1:</span><span id='"+this.scaleUid+"'> (approx) </span>"+"</div>"+"</div>";
return txt;
};
SIX.Status.prototype.showHideConsole=function(){
var _1062=SIX.App.getCurrentChannel();
_1062.showHideConsole();
};
SIX.Status.prototype.coordSysMenuItemOnClick=function(_1063){
this.changeCoordinatesFormat(_1063);
this.hideCoordSysMenu();
};
SIX.Status.prototype.coordSysMenuItemOnMouseOver=function(_1064){
if(this.tHideCoordSysMenuTimer){
clearTimeout(this.tHideCoordSysMenuTimer);
this.tHideCoordSysMenuTimer=null;
}
this.highlightCoordSysMenuItem(_1064);
};
SIX.Status.prototype.coordSysMenuItemOnMouseOut=function(_1065){
this.tHideCoordSysMenuTimer=setTimeout("SIX.App.hideCoordSysMenu()",250);
};
SIX.Status.prototype.highlightCoordSysMenuItem=function(_1066){
var _1067=document.getElementById(SIX.App.coordSysMenuItemsContainerUid);
if(_1067){
for(var i=0;i<this.aCoordSysList.length;i++){
_1067.childNodes[i].style.color=(i==_1066)?this.sSelectedCoordSysMenuItemColor:"";
_1067.childNodes[i].style.backgroundColor=(i==_1066)?this.sSelectedCoordSysMenuItemBackgroundColor:"";
}
}
};
SIX.Status.prototype.coordSysMenuVisible=function(){
var _1069=false;
var _106a=document.getElementById(SIX.App.coordSysMenuUid);
if(_106a&&_106a.style.display!="none"){
_1069=true;
}
return _1069;
};
SIX.Status.prototype.hideCoordSysMenu=function(){
var _106b=document.getElementById(SIX.App.coordSysMenuUid);
_106b.style.display="none";
};
SIX.Status.prototype.showCoordSysMenu=function(){
var _106c=document.getElementById(SIX.App.coordSysMenuUid);
if(_106c){
this.updateCoordSysMenu(true);
var _106d=0;
var _106e=document.getElementById(this.coordsUid);
if(_106e){
_106d+=(_106e.offsetWidth-20);
}
var _106f=document.getElementById(this.errorUid);
if(_106f&&(_106f.style.display!="none")){
_106d+=_106f.offsetWidth;
}
_106c.style.left=_106d;
_106c.style.display="block";
var _1070=SIX.App.getCurrentChannel();
var _1071=0;
for(var i=0;i<_1070.wins.length;i++){
var _1073=_1070.wins[i].zOrder;
if(_1073>=_1071){
_1071=_1073+1;
}
}
_106c.style.zIndex=_1071;
}
this.highlightCoordSysMenuItem(this.nCurrentCoordSys);
var _1074=document.getElementById(SIX.App.coordSysMenuItemsContainerUid);
if(_1074){
_1074.childNodes[this.nCurrentCoordSys].style.color=this.sSelectedCoordSysMenuItemColor;
_1074.childNodes[this.nCurrentCoordSys].style.backgroundColor=this.sSelectedCoordSysMenuItemBackgroundColor;
}
};
SIX.Status.prototype.setProgress=function(_1075){
this.progressBar.setProgress(_1075);
var _1076=document.getElementById(this.progressPercentUid);
if(_1076){
_1076.innerHTML=""+_1075+" %";
}
};
SIX.Status.prototype.update=function(){
if(!this.map){
return;
}
var map=this.map;
this.updateCoordSysMenu(this.coordSysMenuVisible());
this.scale=Math.floor(map.scale);
var _1078=document.getElementById(this.scaleUid);
if(_1078){
var input=""+this.scale;
var scale="";
var len=input.indexOf(".");
if(len==-1){
len=input.length;
}else{
scale=input.substring(len,input.length);
}
while(len>3){
scale=input.substring(len-3,len)+scale;
scale=","+scale;
len-=3;
}
scale=input.substring(0,len)+scale;
_1078.innerHTML=scale;
}
};
SIX.Status.prototype.updateCoordSysMenu=function(_107c){
if(!this.map||this.map.dMouseWorldX==null||this.map.dMouseWorldY==null){
return;
}
var map=this.map;
var _107e=this;
var _107f=map.datum();
var _1080=map.projection();
var _1081=function(_1082,_1083){
with({theStatus:_107e}){
if(_1083){
var dX=_1083[0][0];
var dY=_1083[0][1];
var _1086="";
var _1087="";
var _1088="";
var _1089="";
if(_1082.sProjection.toLowerCase()=="geodetic"){
_1087="Latitude :";
_1089="Longitude :";
if(dX==null||dY==null||isNaN(dX)||isNaN(dY)){
_1086="Undefined";
_1088="Undefined";
}else{
if(_1082.bDMS){
_1086=SIX.Util.latitudeToString(dY);
_1088=SIX.Util.longitudeToString(dX);
}else{
_1086=dY.toFixed(6);
_1088=dX.toFixed(6);
}
}
}else{
_1087="Easting :";
_1089="Northing :";
if(isNaN(dX)||isNaN(dY)){
_1086="Undefined";
_1088="Undefined";
}else{
_1086=dX.toFixed(2);
_1088=dY.toFixed(2);
}
}
var _108a=document.getElementById(_107e.coord1Uid);
var _108b=document.getElementById(_107e.coord1LabelUid);
var _108c=document.getElementById(_107e.coord2Uid);
var _108d=document.getElementById(_107e.coord2LabelUid);
if(_108a){
_108a.innerHTML=_1086;
}
if(_108b){
_108b.innerHTML=_1087;
}
if(_108c){
_108c.innerHTML=_1088;
}
if(_108d){
_108d.innerHTML=_1089;
}
}
}
};
var _108e=this.aCoordSysList[this.nCurrentCoordSys];
var _108f=(_108e.sDatum!="")?_108e.sDatum:_107f;
var _1090=_108e.sProjection;
if(SIX.App.bDHTMLControl){
if(this.AJAXConvertCoords){
this.AJAXConvertCoords.Cancel();
}
this.AJAXConvertCoords=map.convertCoordsAsync(_108f,_1080,[[map.dMouseWorldX,map.dMouseWorldY]],_108f,_1090,_1081,_108e);
}else{
var _1091=map.convertCoords(_108f,_1080,[[map.dMouseWorldX,map.dMouseWorldY]],_108f,_1090);
_1081(_108e,_1091);
}
if(_107c){
var _1092=function(_1093,_1094){
if(_1094){
var _1095=document.getElementById(_1093.uid);
if(_1095){
var dX=_1094[0][0];
var dY=_1094[0][1];
if(_1093.sProjection.toLowerCase()=="geodetic"){
if(_1093.bDMS){
var _1098=SIX.Util.latitudeToString(dY)+" "+SIX.Util.longitudeToString(dX);
}else{
var _1098=Math.abs(dY).toFixed(6)+(dY>=0?"N":"S")+" "+Math.abs(dX).toFixed(6)+(dX>=0?"E":"W");
}
_1095.innerHTML=_1098;
}else{
_1095.innerHTML=dX.toFixed(2)+"E "+dY.toFixed(2)+"N";
}
}
}
};
var _1099="";
for(var i=0;i<this.aCoordSysList.length;i++){
var _108e=this.aCoordSysList[i];
var _108f=(_108e.sDatum!="")?_108e.sDatum:_107f;
var _1090=_108e.sProjection;
var _109b="Loading...";
_1099+="<div class='coordSysMenuItem'"+" style='cursor:"+(SIX.App.isIE?"hand":"pointer")+"'"+" onmouseover='"+this.myself+".coordSysMenuItemOnMouseOver("+i+")'"+" onclick='"+this.myself+".coordSysMenuItemOnClick("+i+")'>"+"<div class='coordSysMenuItemName'>"+_108e.sName+" :"+"</div>"+"<div class='coordSysMenuItemValue' id='"+_108e.uid+"'>"+_109b+"</div>"+"</div>";
}
var _109c=document.getElementById(SIX.App.coordSysMenuItemsContainerUid);
if(_109c){
_109c.innerHTML=_1099;
}
for(var i=0;i<this.aCoordSysList.length;i++){
var _108e=this.aCoordSysList[i];
var _108f=(_108e.sDatum!="")?_108e.sDatum:_107f;
var _1090=_108e.sProjection;
if(SIX.App.bDHTMLControl){
if(_108e.AJAXConvertCoords){
_108e.AJAXConvertCoords.Cancel();
}
_108e.AJAXConvertCoords=map.convertCoordsAsync(_108f,_1080,[[map.dMouseWorldX,map.dMouseWorldY]],_108f,_1090,_1092,_108e);
}else{
var _1091=map.convertCoords(_108f,_1080,[[map.dMouseWorldX,map.dMouseWorldY]],_108f,_1090);
_1092(_108e,_1091);
}
}
this.highlightCoordSysMenuItem(this.nCurrentCoordSys);
}
};
SIX.eToolTypes={NONE:0,EXCLUSIVE:1,TOGGLE:2};
SIX.ToolbarSpace=function(){
this.containerUid=SIX.Uid.getUid("space");
};
SIX.ToolbarSpace.prototype.init=function(){
var sHTML="<div id='"+this.containerUid+"' style='float:left;width:"+this.nWidth+"px'>&nbsp;</div>";
return sHTML;
};
SIX.ToolbarSpace.prototype.initElement=function(){
var _109e=document.createElement("div");
_109e.setAttribute("id",this.containerUid);
_109e.setAttribute("class","toolbarSpace");
_109e.setAttribute("className","toolbarSpace");
_109e.innerHTML="&nbsp;";
return _109e;
};
SIX.Toolbar=function(win,_10a0){
SIX.addRef(this);
this.toolGroup=new SIX.ToolGroup();
_10a0.addToolGroup(this.toolGroup);
this.win=win;
this.items=new Array();
this.toolbarUid=SIX.Uid.getUid("toolbar");
};
SIX.Toolbar.prototype.addTool=function(tool){
if(this.getToolIndex(tool)==-1){
this.items[this.items.length]=this.toolGroup.addTool(tool);
var _10a2=document.getElementById(this.toolbarUid);
if(_10a2&&!document.getElementById(tool.containerUid)){
var _10a3=tool.initElement();
_10a2.appendChild(_10a3);
}
}
return tool;
};
SIX.Toolbar.prototype.removeTool=function(tool){
var _10a5=this.getToolIndex(tool);
if(_10a5!=-1){
this.items.splice(_10a5,1);
this.toolGroup.removeTool(tool);
var _10a6=document.getElementById(this.toolbarUid);
var _10a7=document.getElementById(tool.containerUid);
if(_10a6&&_10a7){
_10a6.removeChild(_10a7);
}
}
};
SIX.Toolbar.prototype.getToolIndex=function(tool){
var _10a9=-1;
for(var i=0;i<this.items.length;i++){
if(this.items[i]==tool){
_10a9=i;
break;
}
}
return _10a9;
};
SIX.Toolbar.prototype.addSpace=function(){
var _10ab=new SIX.ToolbarSpace();
this.items[this.items.length]=_10ab;
var _10ac=document.getElementById(this.toolbarUid);
if(_10ac){
var _10ad=_10ab.initElement();
_10ac.appendChild(_10ad);
}
};
SIX.Toolbar.prototype.init=function(){
var txt="<div id='"+this.toolbarUid+"' class='toolbar'>";
for(var i=0;i<this.items.length;i++){
txt+=this.initTool(i);
}
txt+="</div>";
return txt;
};
SIX.Toolbar.prototype.initTool=function(_10b0){
var _10b1="";
var item=this.items[_10b0];
_10b1+=item.init();
return _10b1;
};
SIX.Toolbar.prototype.build=function(){
return null;
};
SIX.Window=function(_10b3,type,title,_10b6){
SIX.addRef(this);
if(arguments.length<3){
this.name="";
this.title="";
}else{
this.name=title;
this.title=title;
}
this.parameters=new SIX.Parameters(_10b6?_10b6:"");
this.sCustomBorder1Color=this.parameters.getParameter("border1color","string","#000000");
this.sCustomBorder2Color=this.parameters.getParameter("border2color","string","#000000");
this.sCustomBorderColor=this.parameters.getParameter("bordercolor","string","#000000");
this.nCustomBorder1Width=this.parameters.getParameter("border1width","number",0);
this.nCustomBorder2Width=this.parameters.getParameter("border2width","number",0);
this.nCustomBorderWidth=this.nCustomBorder1Width+this.nCustomBorder2Width;
if(!this.nCustomBorderWidth){
this.nCustomBorderWidth=this.parameters.getParameter("borderwidth","number",0);
}
this.bCollapsible=this.parameters.getParameter("collapsible","boolean",false);
this.nFixedHeight=this.parameters.getParameter("fixedheight","number",0);
this.bShowHideReset=this.parameters.getParameter("showhidereset","boolean",false);
this.bShowUnselectedLayers=this.parameters.getParameter("showunselectedlayers","boolean",true);
this.bShowUnselectedLayersDefault=this.bShowUnselectedLayers;
this.sServiceWindowContentsClass=this.parameters.getParameter("servicewindowcontentsclass","string","serviceWindowContents");
this.isVisible=this.parameters.getParameter("visible","boolean",true);
this.channel=_10b3?_10b3:null;
this.sStyle="";
this.type=type;
this.uid=SIX.Uid.getUid("win");
this.contentsUid=SIX.Uid.getUid("contents");
this.fixedUid=SIX.Uid.getUid("fixed");
this.bInitialized=false;
this.borderLeftWidthCalculatorOuterDivUid=SIX.Uid.getUid("borderwidthcalculator");
this.borderLeftWidthCalculatorInnerDivUid=SIX.Uid.getUid("borderwidthcalculator");
this.borderRightWidthCalculatorOuterDivUid=SIX.Uid.getUid("borderwidthcalculator");
this.borderRightWidthCalculatorInnerDivUid=SIX.Uid.getUid("borderwidthcalculator");
this.borderTopWidthCalculatorOuterDivUid=SIX.Uid.getUid("borderwidthcalculator");
this.borderTopWidthCalculatorInnerDivUid=SIX.Uid.getUid("borderwidthcalculator");
this.borderBottomWidthCalculatorOuterDivUid=SIX.Uid.getUid("borderwidthcalculator");
this.borderBottomWidthCalculatorInnerDivUid=SIX.Uid.getUid("borderwidthcalculator");
this.searchContainerUid=SIX.Uid.getUid("searchContainer");
this.searchFormUid=SIX.Uid.getUid("searchForm");
this.searchListUid=SIX.Uid.getUid("searchList");
this.expandCollapseUid=SIX.Uid.getUid("expandCollapse");
this.aSubPanes=new Array();
this.nCurrentTab=0;
this.imageShow=new Image();
this.imageShow.src=SIX.App.imageUrl("images/show");
this.imageHide=new Image();
this.imageHide.src=SIX.App.imageUrl("images/hide");
this.imageReset=new Image();
this.imageReset.src=SIX.App.imageUrl("images/reset");
this.MIN_WIDTH=10;
this.MIN_HEIGHT=10;
this.nMinOpenHeight=100;
this.zOrder=0;
this.isMin=false;
this.showTitle=true;
this.x=0;
this.y=0;
this.framed=true;
this.moveUid=SIX.Uid.getUid("move");
this.minUid=SIX.Uid.getUid("min");
this.closeUid=SIX.Uid.getUid("close");
this.resizeUid=SIX.Uid.getUid("resize");
this.resizeContainerUid=SIX.Uid.getUid("resizeContainer");
this.expandCollapseUid=SIX.Uid.getUid("expandcollapse");
this.titleUid=SIX.Uid.getUid("title");
this.showHideUid=SIX.Uid.getUid("showHide");
this.resetUid=SIX.Uid.getUid("reset");
this.resizeMapHeightUid=SIX.Uid.getUid("resizeMapHeight");
this.nTitleHeight=19;
this.contents=0;
this.attachObject=new Array();
this.overflow="hidden";
this.backgroundColor="";
this.transparencySliderUid=SIX.Uid.getUid("transparencySlider");
this.transparencyPtrUid=SIX.Uid.getUid("transparencyPtr");
this.transparencyTargetUid=this.parameters.getParameter("transparencytargetuid","string","");
this.bTransparent=false;
this.sToggleTransparencyToolTip="Double-click to toggle background transparency";
this.fnOnShowCallback=null;
this.fnOnHideCallback=null;
SIX.App.addMouseAction(this.moveUid,this,SIX.eWindowMouseActionTypes.MOVE,true);
SIX.App.addMouseAction(this.resizeUid,this,SIX.eWindowMouseActionTypes.RESIZE,true);
SIX.App.addMouseAction(this.minUid,this,SIX.eWindowMouseActionTypes.MIN,false);
SIX.App.addMouseAction(this.closeUid,this,SIX.eWindowMouseActionTypes.TOGGLE,false);
SIX.App.addMouseAction(this.expandCollapseUid,this,SIX.eWindowMouseActionTypes.EXPANDCOLLAPSE,false);
this.isResizable=false;
this.bDefaultSize=false;
if(type=="toolbar"){
this.isResizable=false;
this.overflow="visible";
this.showTitle=false;
this.top=580;
this.left=0;
this.width=SIX.App.width-SIX.App.rightMargin;
this.height=SIX.App.toolbarHeight;
this.nTitleHeight=0;
}else{
if(type=="status"){
this.top=580;
this.left=0;
this.width=SIX.App.width-SIX.App.rightMargin;
this.height=SIX.App.statusHeight;
this.showTitle=false;
this.nTitleHeight=0;
}else{
if(type=="legend"){
this.top=580;
this.left=0;
this.width=SIX.App.width-SIX.App.paneWidth;
this.height=SIX.App.propertiesHeight;
this.framed=false;
this.isResizable=true;
this.isMin=true;
this.overflow="auto";
}else{
if(type=="query"){
this.top=580;
this.left=0;
this.width=SIX.App.width-SIX.App.paneWidth;
this.height=SIX.App.propertiesHeight;
this.framed=false;
this.isResizable=true;
this.isMin=true;
}else{
if(type=="pane"){
this.isResizable=true;
for(var i=0;i<SIX.App.channels.length;i++){
if(!this.channel||(this.channel==SIX.App.channels[i])){
if(!SIX.App.channels[i].panes.length){
this.isResizable=false;
}
SIX.App.channels[i].panes[SIX.App.channels[i].panes.length]=this;
}
}
this.top=SIX.App.paneTop+(SIX.App.paneHeight*((this.channel?this.channel:SIX.App.getCurrentChannel()).panes.length-1));
this.left=SIX.App.width-SIX.App.paneWidth;
this.width=SIX.App.paneWidth;
this.height=SIX.App.paneHeight;
this.overflow="auto";
}else{
if(type=="map"){
this.showTitle=false;
this.nTitleHeight=0;
this.top=SIX.App.topMargin;
this.left=SIX.App.leftMargin;
this.width=500;
this.height=400;
}else{
if(type=="console"){
this.showTitle=false;
this.top=580;
this.left=0;
this.width=SIX.App.width;
this.height=SIX.App.nConsoleHeight;
this.isMin=true;
this.isVisible=false;
this.nTitleHeight=0;
}else{
if(type=="popup"){
this.top=this.parameters.getParameter("top","number",0);
this.left=this.parameters.getParameter("left","number",0);
this.width=this.parameters.getParameter("width","number",300);
this.height=this.parameters.getParameter("height","number",300);
this.framed=false;
this.isResizable=true;
}
}
}
}
}
}
}
}
this.nContentsTop=this.nTitleHeight+this.nFixedHeight+this.nCustomBorderWidth;
this.nContentsLeft=this.nCustomBorderWidth;
this.nContentsBottom=this.nCustomBorderWidth;
this.nContentsRight=this.nCustomBorderWidth;
this.hCallbackManagers=new SIX.Hash();
};
SIX.eWindowCallbacks={ONRESIZE:1,ONCHANGETRANSPARENCY:2};
SIX.Window.prototype.executeCallbacks=function(nType){
if(this.hCallbackManagers.hasItem(nType)){
var _10b9=this.hCallbackManagers.getItem(nType);
var _10ba=arguments.length>1?Array.prototype.slice.call(arguments,1,arguments.length):new Array();
_10b9.executeCallbacks.apply(_10b9,_10ba);
}
};
SIX.Window.prototype.addCallback=function(nType,_10bc,data){
var _10be=this.hCallbackManagers.hasItem(nType)?this.hCallbackManagers.getItem(nType):new SIX.CallbackManager();
_10be.addCallback(new SIX.Callback(this,_10bc,(arguments.length>=3?data:null)));
this.hCallbackManagers.setItem(nType,_10be);
};
SIX.Window.prototype.setStyle=function(_10bf){
this.sStyle=_10bf;
};
SIX.Window.prototype.init=function(){
if(this.bInitialized){
return "";
}
var _10c0=SIX.App.getCurrentChannel();
var _10c1=(this.isVisible&&(!this.channel||(this.channel==_10c0)));
this.bInitialized=true;
var txt="";
var _10c3=((this.channel&&this.type=="pane")?this.channel.sStyle:"");
var _10c4=((this.sStyle!="")?this.sStyle:_10c3);
var _10c5=_10c4+this.type+"Window";
var _10c6="visibility:hidden;top:0px;left:0px;width:100px;height:100px;";
var _10c7="position:absolute;top:0px;left:0px;padding:0px;margin:0px;border-width:0px;width:100%;height:100%;overflow:hidden;visibility:hidden;";
txt+="<div class='"+_10c5+"' id='"+this.borderLeftWidthCalculatorOuterDivUid+"' style='"+_10c6+"border-right-width:0px;'>";
txt+="<div id='"+this.borderLeftWidthCalculatorInnerDivUid+"' style='"+_10c7+"'>";
txt+="</div></div>";
txt+="<div class='"+_10c5+"' id='"+this.borderRightWidthCalculatorOuterDivUid+"' style='"+_10c6+"border-left-width:0px;'>";
txt+="<div id='"+this.borderRightWidthCalculatorInnerDivUid+"' style='"+_10c7+"'>";
txt+="</div></div>";
txt+="<div class='"+_10c5+"' id='"+this.borderTopWidthCalculatorOuterDivUid+"' style='"+_10c6+"border-bottom-width:0px;'>";
txt+="<div id='"+this.borderTopWidthCalculatorInnerDivUid+"' style='"+_10c7+"'>";
txt+="</div></div>";
txt+="<div class='"+_10c5+"' id='"+this.borderBottomWidthCalculatorOuterDivUid+"' style='"+_10c6+"border-top-width:0px;'>";
txt+="<div id='"+this.borderBottomWidthCalculatorInnerDivUid+"' style='"+_10c7+"'>";
txt+="</div></div>";
var _10c8=document.createElement("div");
_10c8.innerHTML=txt;
document.body.appendChild(_10c8);
this.nLeftBorderWidth=this.getLeftBorderWidth();
this.nRightBorderWidth=this.getRightBorderWidth();
this.nTopBorderWidth=this.getTopBorderWidth();
this.nBottomBorderWidth=this.getBottomBorderWidth();
document.body.removeChild(_10c8);
txt+="<div class='"+_10c5+"' id='"+this.uid+"' "+"style='padding:"+this.nCustomBorderWidth+"px;"+(_10c1?"visibility:visible;display:block":"visibility:hidden;display:none")+";top:"+this.top+"px;left:"+this.left+"px;width:"+this.width+"px;height:"+this.height+"px;z-index:"+this.zOrder+";'>";
if(this.type=="popup"){
txt+="<div class='popupWindowBackground'>&nbsp;</div>";
}
var _10c9=10;
if(this.type=="map"){
var _10ca=this.nContentsTop+this.top;
var _10cb=this.nContentsLeft+this.left;
if(_10ca<2){
this.nContentsTop=2-this.top;
}
if(_10cb<2){
this.nContentsLeft=2-this.left;
}
if(this.nContentsRight<_10c9){
this.nContentsRight=_10c9;
}
}
if(this.nCustomBorderWidth){
if(this.nCustomBorder1Width&&this.nCustomBorder2Width){
var _10cc=(this.nCustomBorder1Width<this.nCustomBorder2Width)?this.nCustomBorder1Width:this.nCustomBorder2Width;
var _10cd=Math.floor(0.5*_10cc);
var _10ce=_10cd;
var _10cf=SIX.Util.interpolateHexColor(this.sCustomBorder1Color,this.sCustomBorder2Color,50);
var _10d0=SIX.Util.interpolateHexColors(this.sCustomBorder1Color,_10cf,_10cd+2);
var _10d1=SIX.Util.interpolateHexColors(this.sCustomBorder2Color,_10cf,_10ce+2);
var _10d2=SIX.Util.interpolateHexColors(_10cf,this.sCustomBorder1Color,_10cd+2);
var _10d3=SIX.Util.interpolateHexColors(_10cf,this.sCustomBorder2Color,_10ce+2);
var _10d4=new Array();
_10d4[0]=[["top","left"],["top","right"]];
_10d4[1]=[["right","top"],["right","bottom"]];
_10d4[2]=[["bottom","right"],["bottom","left"]];
_10d4[3]=[["left","bottom"],["left","top"]];
for(var i=0;i<4;i++){
var _10d6=((i==1)||(i==2));
var _10d7=((i==1)||(i==3));
var _10d8=_10d6?this.sCustomBorder2Color:this.sCustomBorder1Color;
var _10d9=_10d6?this.nCustomBorder2Width:this.nCustomBorder1Width;
var _10da=_10d6?_10ce:_10cd;
var _10db=_10d9-_10da;
var _10dc=_10d6?_10d1:_10d0;
var _10dd=_10d6?this.sCustomBorder1Color:this.sCustomBorder2Color;
var _10de=_10d6?this.nCustomBorder1Width:this.nCustomBorder2Width;
var _10df=_10d6?_10cd:_10ce;
var _10e0=_10de-_10df;
var _10e1=_10d6?_10d2:_10d3;
var _10e2=((i%2)==1)?"1px":"66%";
var _10e3=((i%2)==1)?"66%":"1px";
for(var j=0;j<_10de;j++){
var _10e5=(j<_10df)?_10e1[j+1]:_10dd;
txt+="<div style='"+_10d4[i][0][0]+":"+(j+_10d9)+"px;"+_10d4[i][0][1]+":"+(j+_10d9+_10df+1)+"px;height:"+_10e3+";width:"+_10e2+";background-color:"+_10e5+"' class='windowBorder'></div>";
txt+="<div style='"+_10d4[i][1][0]+":"+(j+_10d9)+"px;"+_10d4[i][1][1]+":"+(j+_10d9+_10df+1)+"px;height:"+_10e3+";width:"+_10e2+";background-color:"+_10e5+"' class='windowBorder'></div>";
var _10e6=SIX.Util.interpolateHexColor(_10e5,_10d8,50);
var _10e7=(_10d7?_10e6:_10e5);
txt+="<div style='"+_10d4[i][0][0]+":"+(j+_10d9)+"px;"+_10d4[i][0][1]+":"+(j+_10d9)+"px;height:1px;width:1px;background-color:"+_10e7+"' class='windowBorder'></div>";
for(var k=0;k<_10df;k++){
var _10e9=SIX.Util.interpolateHexColor(_10e6,_10e5,100*(k+1)/(_10df+1));
txt+="<div style='"+_10d4[i][(_10d7?1:0)][0]+":"+(j+_10d9)+"px;"+_10d4[i][(_10d7?1:0)][1]+":"+(j+_10d9+k+1)+"px;height:1px;width:1px;background-color:"+_10e5+"' class='windowBorder'></div>";
txt+="<div style='"+_10d4[i][(_10d7?0:1)][0]+":"+(j+_10d9)+"px;"+_10d4[i][(_10d7?0:1)][1]+":"+(j+_10d9+k+1)+"px;height:1px;width:1px;background-color:"+_10e9+"' class='windowBorder'></div>";
}
}
for(var j=0;j<_10d9;j++){
var _10e5=(j>=_10db)?_10dc[j-_10db+1]:_10d8;
txt+="<div style='"+_10d4[i][0][0]+":"+j+"px;"+_10d4[i][0][1]+":"+(j+_10da+1)+"px;height:"+_10e3+";width:"+_10e2+";background-color:"+_10e5+"' class='windowBorder'></div>";
txt+="<div style='"+_10d4[i][1][0]+":"+j+"px;"+_10d4[i][1][1]+":"+(j+_10da+1)+"px;height:"+_10e3+";width:"+_10e2+";background-color:"+_10e5+"' class='windowBorder'></div>";
var _10e6=SIX.Util.interpolateHexColor(_10e5,_10dd,50);
var _10e7=(_10d7?_10e6:_10e5);
txt+="<div style='"+_10d4[i][0][0]+":"+j+"px;"+_10d4[i][0][1]+":"+j+"px;height:1px;width:1px;background-color:"+_10e7+"' class='windowBorder'></div>";
for(var k=0;k<_10da;k++){
var _10e9=SIX.Util.interpolateHexColor(_10e6,_10e5,100*(k+1)/(_10da+1));
txt+="<div style='"+_10d4[i][(_10d7?1:0)][0]+":"+j+"px;"+_10d4[i][(_10d7?1:0)][1]+":"+(j+k+1)+"px;height:1px;width:1px;background-color:"+_10e5+"' class='windowBorder'></div>";
txt+="<div style='"+_10d4[i][(_10d7?0:1)][0]+":"+j+"px;"+_10d4[i][(_10d7?0:1)][1]+":"+(j+k+1)+"px;height:1px;width:1px;background-color:"+_10e9+"' class='windowBorder'></div>";
}
}
}
}else{
txt+="<div style='top:0px;left:0px;height:"+this.nCustomBorderWidth+"px;background-color:"+this.sCustomBorderColor+"' class='windowBorder'></div>";
txt+="<div style='top:0px;left:0px;width:"+this.nCustomBorderWidth+"px;background-color:"+this.sCustomBorderColor+"' class='windowBorder'></div>";
txt+="<div style='bottom:0px;left:0px;height:"+this.nCustomBorderWidth+"px;background-color:"+this.sCustomBorderColor+"' class='windowBorder'></div>";
txt+="<div style='bottom:0px;right:0px;width:"+this.nCustomBorderWidth+"px;background-color:"+this.sCustomBorderColor+"' class='windowBorder'></div>";
}
}
if(this.showTitle&&this.nTitleHeight){
txt+="<div class='windowBar'>";
var _10ea="";
var _10eb="";
if(!this.framed){
if(!this.isMin){
_10ea=this.sToggleTransparencyToolTip;
}
_10eb="ondblclick='"+this.myself+".toggleTransparency();'";
}
txt+="<img "+(this.framed?"":"id='"+this.moveUid+"'")+" class='windowMoveBar'"+" src='"+SIX.App.imageUrl("images/"+(this.framed?"windowBar":"windowBarNoLeftBevel"))+"' width='100%' height='"+this.nTitleHeight+"' alt='"+_10ea+"' title='"+_10ea+"' "+_10eb+">";
}
if(this.framed){
if(this.isResizable){
txt+="<div class='windowPaneResize'"+(SIX.App.isIE?"":" id='"+this.resizeUid+"'")+">";
txt+="<img style='padding:0px;margin:0px;border:0px'"+(SIX.App.isIE?" id='"+this.resizeUid+"'":"")+" border='0' width='100%' height='4px'"+SIX.App.imageSrc("images/transparent")+">";
txt+="</div>";
}
}
if(this.showTitle&&this.nTitleHeight){
if(!((this.type=="toolbar")&&!this.framed)){
txt+="<div class='windowTitle' id='"+this.titleUid+"'>"+this.title+"</div>";
}
txt+="</div>";
}
if(this.nFixedHeight){
txt+="<div class='"+_10c4+"windowContents' id='"+this.fixedUid+"' "+"style='overflow:hidden;width:"+(this.width-this.nContentsLeft-this.nContentsRight)+"px;height:"+this.nFixedHeight+"px'>";
txt+="</div>";
}
txt+="<div class='"+_10c4+"windowContents' id='"+this.contentsUid+"' "+"style='position:relative;overflow:"+this.overflow+";width:"+(this.width-this.nContentsLeft-this.nContentsRight)+"px;height:"+(this.height-this.nContentsTop-this.nContentsBottom)+"px'>";
var _10ec=_10c0.getActiveQueryWindow();
var _10ed=SIX.App.height-(SIX.App.bMaxMapHeight?0:SIX.App.propertiesHeight)-(_10c0.toolbarWin?SIX.App.toolbarHeight:0)-((_10c0.consoleWin&&_10c0.consoleWin.isVisible)?SIX.App.nConsoleHeight:0)-(SIX.App.bottomMargin+SIX.App.statusHeight);
if(this.contents&&this.contents.init&&this.type!="map"){
txt+=this.contents.init();
}
if(this.type=="map"&&this.contents&&this.contents.init){
if(this.contents.childMap){
txt+="<div style='position:absolute;top:0px;left:0px;width:100%;height:100%'>"+this.contents.init()+"</div>";
}else{
txt+=this.contents.init();
}
}
if(this.type=="map"&&this.contents.childMap&&this.contents.childMap.init){
var _10ee=this.contents.childMap;
while(_10ee){
txt+="<div style='position:absolute;top:0px;left:0px;width:100%;height:100%'>"+_10ee.init()+"</div>";
_10ee=_10ee.childMap;
}
}
txt+="</div>";
if(this.type=="map"){
txt+="<div class='resizeWidthOuter'>"+"<div class='resizeWidthInner'"+(SIX.App.isIE?"":" onmouseover='this.style.cursor = \"auto\";'")+">"+"<img name='expandCollapsePanes' "+SIX.App.imageSrc("images/collapsePanes")+"alt='Collapse panes' title='Collapse panes' border='0'"+" onmouseover='this.src = (SIX.App.bMaxMapWidth ? SIX.App.imageUrl(\"images/expandPanes_on\") : SIX.App.imageUrl(\"images/collapsePanes_on\"))'"+" onmouseout='this.src = (SIX.App.bMaxMapWidth ? SIX.App.imageUrl(\"images/expandPanes\") : SIX.App.imageUrl(\"images/collapsePanes\"))'"+" onclick='if (SIX.App.bMaxMapWidth) {this.src = SIX.App.imageUrl(\"images/collapsePanes_on\"); this.alt = this.title = \"Collapse panes\"; SIX.App.showPanes();} else {this.src = SIX.App.imageUrl(\"images/expandPanes_on\"); this.alt = this.title = \"Expand panes\"; SIX.App.hidePanes();}'"+">"+"</div>"+"</div>";
txt+="<div id='"+this.resizeMapHeightUid+"' class='resizeHeightOuter'"+(SIX.App.isIE?"":" onmouseover='this.style.cursor = \"auto\";'")+">"+"<div class='resizeHeightInner'>"+"<img style='vertical-align:top' "+SIX.App.imageSrc("images/maxMapHeight")+"alt='Maximize map height' title='Maximize map height' border='0'"+" onmouseover='this.src = (SIX.App.bMaxMapHeight ? SIX.App.imageUrl(\"images/minMapHeight_on\") : SIX.App.imageUrl(\"images/maxMapHeight_on\"))'"+" onmouseout='this.src = (SIX.App.bMaxMapHeight ? SIX.App.imageUrl(\"images/minMapHeight\") : SIX.App.imageUrl(\"images/maxMapHeight\"))'"+" onclick='if (SIX.App.bMaxMapHeight) {this.src = SIX.App.imageUrl(\"images/maxMapHeight_on\"); this.alt = this.title = \"Maximize map height\"; SIX.App.minMapHeight();} else {this.src = SIX.App.imageUrl(\"images/minMapHeight_on\"); this.alt = this.title = \"\"; SIX.App.maxMapHeight();}'"+"></div></div>";
}
if(this.bShowHideReset){
txt+="<a href='#'>"+"<img id='"+this.showHideUid+"' class='windowShowHide' src='"+(this.bShowUnselectedLayers?this.imageHide.src:this.imageShow.src)+"' alt='Show/hide unselected layers' title='Show/hide unselected layers'"+" onclick='"+this.myself+".toggleUnselectedLayers();return false;' border='0'></a>";
txt+="<a href='#'>"+"<img id='"+this.resetUid+"' class='windowReset' src='"+this.imageReset.src+"' alt='Reset layers' title='Reset layers'"+" onclick='"+this.myself+".resetServices();return false;' border='0'></a>";
}
if(!this.framed){
if(this.type=="popup"){
txt+="<img class='windowMin'"+SIX.App.imageSrc("images/close")+" onclick='"+this.myself+".hideWin()'>";
}else{
txt+="<img id='"+this.expandCollapseUid+"' class='windowMin'"+SIX.App.imageSrc(this.isMin?"images/expand":"images/collapse")+">";
}
if(this.isResizable){
txt+="<div id='"+this.resizeContainerUid+"' style='display:"+(this.isMin?"none":"block")+"'>";
txt+="<img id='"+this.resizeUid+"' class='windowResize'"+SIX.App.imageSrc("images/"+(this.isMin?"resize_off":"resize"))+">";
txt+="</div>";
}
}else{
if(this.bCollapsible){
txt+="<img name='"+this.minUid+"' id='"+this.minUid+"' class='windowMin'"+SIX.App.imageSrc(this.isMin?"images/expand":"images/collapse")+"border='0'>";
}
}
txt+="</div>";
return txt;
};
SIX.Window.prototype.setTitle=function(title){
if(this.showTitle){
document.getElementById(this.titleUid).innerHTML=title;
}
};
SIX.Window.prototype.toggleVisibleLayersSelectionState=function(_10f0){
this.aSubPanes[_10f0].bSelected=!this.aSubPanes[_10f0].bSelected;
var _10f1=document.getElementById(this.aSubPanes[_10f0].layersSelectedUid);
if(_10f1){
_10f1.src=SIX.App.imageUrl("images/"+(this.aSubPanes[_10f0].bSelected?"service_tick_on":"service_tick"));
}
setTimeout(this.attachObject[_10f0].myself+".setVisibleLayersSelectionState("+(this.aSubPanes[_10f0].bSelected?"true":"false")+")",100);
};
SIX.Window.prototype.toggleUnselectedLayers=function(){
this.setUnselectedLayersVisibility(!this.bShowUnselectedLayers);
};
SIX.Window.prototype.setUnselectedLayersVisibility=function(_10f2){
var _10f3=document.getElementById(this.showHideUid);
if(_10f3){
var _10f4=((this.bShowUnselectedLayers==_10f2)?false:true);
this.bShowUnselectedLayers=_10f2;
_10f3.src=(this.bShowUnselectedLayers?this.imageHide.src:this.imageShow.src);
for(var i=0;i<this.attachObject.length;i++){
if((typeof this.attachObject[i]=="object")&&(this.attachObject[i].constructor==SIX.Service)){
if(this.attachObject[i].setUnselectedLayersVisibilityNoUpdate(this.bShowUnselectedLayers)){
_10f4=true;
}
}
}
if(_10f4){
this.build();
}
}
};
SIX.Window.prototype.resetServices=function(){
var _10f6=((this.bShowUnselectedLayers==this.bShowUnselectedLayersDefault)?false:true);
var _10f7=false;
var _10f8=document.getElementById(this.showHideUid);
if(_10f8){
this.bShowUnselectedLayers=this.bShowUnselectedLayersDefault;
_10f8.src=(this.bShowUnselectedLayers?this.imageHide.src:this.imageShow.src);
}
for(var i=0;i<this.attachObject.length;i++){
if((typeof this.attachObject[i]=="object")&&(this.attachObject[i].constructor==SIX.Service)){
if(this.aSubPanes.length>i){
this.aSubPanes[i].bSelected=true;
}
var _10fa=this.attachObject[i];
if(_10fa.transparency!=_10fa.transparencyDefault){
_10f7=true;
_10fa.transparency=_10fa.transparencyDefault;
}
for(var j=0;j<_10fa.layers.length;j++){
var layer=_10fa.layers[j];
if(layer.bSelected!=layer.bSelectedDefault){
_10f7=true;
layer.setSelected(layer.bSelectedDefault);
}
layer.bInList=this.bHideOutOfScaleLayers?(layer.bInScale?layer.bSelectedDefault:false):layer.bSelectedDefault;
layer.bHidden=!layer.bInList;
}
if(_10fa.setUnselectedLayersVisibilityNoUpdate(this.bShowUnselectedLayers)){
_10f7=true;
}
}
}
if(_10f6||_10f7){
this.build();
}
if(_10f7){
for(var i=0;i<this.attachObject.length;i++){
if((typeof this.attachObject[i]=="object")&&(this.attachObject[i].constructor==SIX.Service)){
var _10fa=this.attachObject[i];
if(_10fa.loaded&&_10fa.active){
for(var j=0;j<_10fa.catalog.maps.length;j++){
_10fa.access.updateMap(_10fa.catalog.maps[j]);
}
}
}
}
}
};
SIX.Window.prototype.build=function(){
var _10fd=null;
var _10fe=null;
var _10ff=true;
if(this.contents){
if(this.nFixedHeight&&this.contents.buildFixed){
_10fd=this.contents.buildFixed();
}
if(this.contents.build){
_10fe=this.contents.build();
}
}else{
if(this.attachObject){
var _1100=false;
if(this.attachObject.length>1){
_1100=true;
}
for(var j=0;j<this.attachObject.length;j++){
if((typeof this.attachObject[j]=="object")&&(this.attachObject[j].constructor==SIX