/**
*	Copyright (C)2008 Mapsolute GmbH
*	All rights reserved
*	Filesize: 312561 byte
*/
function Callable(obj,method,arg_defaults,arg_names){
this.__constructor=function(obj,method,arg_defaults,arg_names){
if(typeof obj=="undefined")obj=null;if((obj!=null)&&!(obj instanceof Object))throw new Map24.Exceptions.InvalidArgument("The given parameter 'obj' is no object and not null!",obj,"Callable","__constructor");if(typeof method!="function")throw new Map24.Exceptions.InvalidArgument("The given parameter 'method' is no function!",method,"Callable","__constructor");if((typeof arg_defaults=="undefined")||(arg_defaults==null))
arg_defaults=new Array();if(!(arg_defaults instanceof Array)){
if((arg_defaults instanceof Object)&&((typeof arg_names=="undefined")||(arg_names==null)))
{
arg_names=Map24.arrayKeys(arg_defaults);arg_defaults=Map24.arrayValues(arg_defaults);}else
throw new Map24.Exceptions.InvalidArgument("The given parameter 'arg_defaults' is no array and not null!",arg_defaults,"Callable","__constructor");}
if((typeof arg_names=="undefined")||(arg_names==null))
arg_names=new Array();if(!(arg_names instanceof Array))throw new Map24.Exceptions.InvalidArgument("The given parameter 'arg_names' is no array and not null!",arg_names,"Callable","__constructor");if(arg_defaults.length<arg_names.length)
for(var i=arg_defaults.length;i<arg_names.length;i++)
arg_defaults.push(null);this.Instance=obj;this.Method=method;this.ArgumentNames=arg_names;this.ArgumentDefaults=arg_defaults;}
this.invokeEx=function(args){
if((typeof args=="undefined")||(args==null))args={};if(!(args instanceof Object))throw new Map24.Exceptions.InvalidArgument("The given parameter 'args' is no hashtable and not null!",args,"Callable","invoke");var argList=Map24.clone(this.ArgumentDefaults);if(args instanceof Array){
for(var i=0;i<args.length;i++){
if(i<argList.length)
argList[i]=args[i];else
argList.push(args[i]);}
}else{
var argsSet={};var argName="";for(var i=0;i<this.ArgumentNames.length;i++){
argName=this.ArgumentNames[i];if(typeof args[argName]!="undefined"){
argList[i]=args[argName];argsSet[argName]=true;}
}
for(argName in args){
if(typeof argsSet[argName]=="undefined")
argList.push(args[argName]);}
}
if(this.Instance==null)
return Map24.invokeEx(this.Method,argList);else
return Map24.invokeEx(new Array(this.Instance,this.Method),argList);}
this.invoke=function(){
var args=new Array();for(var i=0;i<arguments.length;i++)args.push(arguments[i]);return this.invokeEx(args);}
this.forkEx=function(args){
if((typeof args=="undefined")||(args==null))args={};if(!(args instanceof Object))throw new Map24.Exceptions.InvalidArgument("The given parameter 'args' is no hashtable and not null!",args,"Callable","invoke");var argList=Map24.clone(this.ArgumentDefaults);if(args instanceof Array){
for(var i=0;i<args.length;i++){
if(i<argList.length)
argList[i]=args[i];else
argList.push(args[i]);}
}else{
var argsSet={};var argName="";for(var i=0;i<this.ArgumentNames.length;i++){
argName=this.ArgumentNames[i];if(typeof args[argName]!="undefined"){
argList[i]=args[argName];argsSet[argName]=true;}
}
for(argName in args){
if(typeof argsSet[argName]=="undefined")argList.push(args[argName]);}
}
if(this.Instance==null)
return Map24.forkEx(this.Method,argList);else
return Map24.forkEx(new Array(this.Instance,this.Method),argList);}
this.fork=function(){
var args=new Array();for(var i=0;i<arguments.length;i++)args.push(arguments[i]);return this.forkEx(args);}
this.__constructor(obj,method,arg_defaults,arg_names);this.setTimeoutEx=function(timeout,args){
if((typeof args=="undefined")||(args==null))args=new Array();if(!(args instanceof Array))throw new Map24.Exceptions.InvalidArgument("The given parameter 'args' is invalid, no array and not null",args,"Callable","setTimeoutEx");if(typeof timeout=="undefined")timeout=1;if(typeof timeout=="string")timeout=parseInt(timeout);if(!Map24.isNumeric(timeout)||timeout<=0)throw new Map24.Exceptions.InvalidArgument("The given timeout is invalid, no number or less then 1",timeout,"Callable","setTimeoutEx");var id=Map24.makeUniqueId();Callable._TimeoutList[id]=this;Callable._TimeoutArgs[id]=args;setTimeout("Callable._timeoutHandler(\""+id+"\")",timeout);return true;}
this.setTimeout=function(timeout){
var args=new Array();for(var i=1;i<arguments.length;i++)args.push(arguments[i]);return this.setTimeoutEx(timeout,args);}
}
Callable._TimeoutList=new Hashtable();Callable._TimeoutArgs=new Hashtable();Callable._timeoutHandler=function(item_id){
if(typeof item_id!="string")return;var callable=Callable._TimeoutList[item_id];if(callable instanceof Callable){
var callable_args=Callable._TimeoutArgs[item_id];delete Callable._TimeoutList[item_id];delete Callable._TimeoutArgs[item_id];callable.invokeEx(callable_args);}
}
function Hashtable(){}
function md5(msg)
{
var l,s,k,ka,kb,kc,kd;md5_init();for(k=0;k<msg.length;k++){
l=msg.charAt(k);md5_update(md5_ascii.lastIndexOf(l));}
md5_finish();ka=kb=kc=kd=0;for(i=0;i<4;i++)ka+=md5_shl(md5_digestBits[15-i],(i*8));for(i=4;i<8;i++)kb+=md5_shl(md5_digestBits[15-i],((i-4)*8));for(i=8;i<12;i++)kc+=md5_shl(md5_digestBits[15-i],((i-8)*8));for(i=12;i<16;i++)kd+=md5_shl(md5_digestBits[15-i],((i-12)*8));s=md5_hexa(kd)+md5_hexa(kc)+md5_hexa(kb)+md5_hexa(ka);return s;}
function md5_array(n){
for(i=0;i<n;i++)this[i]=0;this.length=n;}
function md5_integer(n){return n%(0xffffffff+1);}
function md5_shr(a,b){
a=md5_integer(a);b=md5_integer(b);if(a-0x80000000>=0){
a=a%0x80000000;a>>=b;a+=0x40000000>>(b-1);}else
a>>=b;return a;}
function md5_shl1(a){
a=a%0x80000000;if(a&0x40000000==0x40000000)
{
a-=0x40000000;a*=2;a+=0x80000000;}else
a*=2;return a;}
function md5_shl(a,b){
a=md5_integer(a);b=md5_integer(b);for(var i=0;i<b;i++)a=md5_shl1(a);return a;}
function md5_and(a,b){
a=md5_integer(a);b=md5_integer(b);var t1=(a-0x80000000);var t2=(b-0x80000000);if(t1>=0)
if(t2>=0)
return((t1&t2)+0x80000000);else
return(t1&b);else
if(t2>=0)
return(a&t2);else
return(a&b);}
function md5_or(a,b){
a=md5_integer(a);b=md5_integer(b);var t1=(a-0x80000000);var t2=(b-0x80000000);if(t1>=0)
if(t2>=0)
return((t1|t2)+0x80000000);else
return((t1|b)+0x80000000);else
if(t2>=0)
return((a|t2)+0x80000000);else
return(a|b);}
function md5_xor(a,b){
a=md5_integer(a);b=md5_integer(b);var t1=(a-0x80000000);var t2=(b-0x80000000);if(t1>=0)
if(t2>=0)
return(t1^t2);else
return((t1^b)+0x80000000);else
if(t2>=0)
return((a^t2)+0x80000000);else
return(a^b);}
function md5_not(a){
a=md5_integer(a);return(0xffffffff-a);}
var md5_state=new md5_array(4);var md5_count=new md5_array(2);md5_count[0]=0;md5_count[1]=0;var md5_buffer=new md5_array(64);var md5_transformBuffer=new md5_array(16);var md5_digestBits=new md5_array(16);var md5_S11=7;var md5_S12=12;var md5_S13=17;var md5_S14=22;var md5_S21=5;var md5_S22=9;var md5_S23=14;var md5_S24=20;var md5_S31=4;var md5_S32=11;var md5_S33=16;var md5_S34=23;var md5_S41=6;var md5_S42=10;var md5_S43=15;var md5_S44=21;function md5_F(x,y,z){
return md5_or(md5_and(x,y),md5_and(md5_not(x),z));}
function md5_G(x,y,z){
return md5_or(md5_and(x,z),md5_and(y,md5_not(z)));}
function md5_H(x,y,z){
return md5_xor(md5_xor(x,y),z);}
function md5_I(x,y,z){
return md5_xor(y,md5_or(x,md5_not(z)));}
function md5_rotateLeft(a,n){
return md5_or(md5_shl(a,n),(md5_shr(a,(32 - n))));}
function md5_FF(a,b,c,d,x,s,ac){
a=a+md5_F(b,c,d)+ x + ac;a=md5_rotateLeft(a,s);a=a+b;return a;}
function md5_GG(a,b,c,d,x,s,ac){
a=a+md5_G(b,c,d)+x + ac;a=md5_rotateLeft(a,s);a=a+b;return a;}
function md5_HH(a,b,c,d,x,s,ac){
a=a+md5_H(b,c,d)+ x + ac;a=md5_rotateLeft(a,s);a=a+b;return a;}
function md5_II(a,b,c,d,x,s,ac){
a=a+md5_I(b,c,d)+ x + ac;a=md5_rotateLeft(a,s);a=a+b;return a;}
function md5_transform(buf,offset){
var a=0,b=0,c=0,d=0;var x=md5_transformBuffer;a=md5_state[0];b=md5_state[1];c=md5_state[2];d=md5_state[3];for(i=0;i<16;i++){
x[i]=md5_and(buf[i*4+offset],0xff);for(j=1;j<4;j++){
x[i]+=md5_shl(md5_and(buf[i*4+j+offset],0xff),j * 8);}
}
a=md5_FF(a,b,c,d,x[ 0],md5_S11,0xd76aa478);d=md5_FF(d,a,b,c,x[ 1],md5_S12,0xe8c7b756);c=md5_FF(c,d,a,b,x[ 2],md5_S13,0x242070db);b=md5_FF(b,c,d,a,x[ 3],md5_S14,0xc1bdceee);a=md5_FF(a,b,c,d,x[ 4],md5_S11,0xf57c0faf);d=md5_FF(d,a,b,c,x[ 5],md5_S12,0x4787c62a);c=md5_FF(c,d,a,b,x[ 6],md5_S13,0xa8304613);b=md5_FF(b,c,d,a,x[ 7],md5_S14,0xfd469501);a=md5_FF(a,b,c,d,x[ 8],md5_S11,0x698098d8);d=md5_FF(d,a,b,c,x[ 9],md5_S12,0x8b44f7af);c=md5_FF(c,d,a,b,x[10],md5_S13,0xffff5bb1);b=md5_FF(b,c,d,a,x[11],md5_S14,0x895cd7be);a=md5_FF(a,b,c,d,x[12],md5_S11,0x6b901122);d=md5_FF(d,a,b,c,x[13],md5_S12,0xfd987193);c=md5_FF(c,d,a,b,x[14],md5_S13,0xa679438e);b=md5_FF(b,c,d,a,x[15],md5_S14,0x49b40821);a=md5_GG(a,b,c,d,x[ 1],md5_S21,0xf61e2562);d=md5_GG(d,a,b,c,x[ 6],md5_S22,0xc040b340);c=md5_GG(c,d,a,b,x[11],md5_S23,0x265e5a51);b=md5_GG(b,c,d,a,x[ 0],md5_S24,0xe9b6c7aa);a=md5_GG(a,b,c,d,x[ 5],md5_S21,0xd62f105d);d=md5_GG(d,a,b,c,x[10],md5_S22,0x2441453);c=md5_GG(c,d,a,b,x[15],md5_S23,0xd8a1e681);b=md5_GG(b,c,d,a,x[ 4],md5_S24,0xe7d3fbc8);a=md5_GG(a,b,c,d,x[ 9],md5_S21,0x21e1cde6);d=md5_GG(d,a,b,c,x[14],md5_S22,0xc33707d6);c=md5_GG(c,d,a,b,x[ 3],md5_S23,0xf4d50d87);b=md5_GG(b,c,d,a,x[ 8],md5_S24,0x455a14ed);a=md5_GG(a,b,c,d,x[13],md5_S21,0xa9e3e905);d=md5_GG(d,a,b,c,x[ 2],md5_S22,0xfcefa3f8);c=md5_GG(c,d,a,b,x[ 7],md5_S23,0x676f02d9);b=md5_GG(b,c,d,a,x[12],md5_S24,0x8d2a4c8a);a=md5_HH(a,b,c,d,x[ 5],md5_S31,0xfffa3942);d=md5_HH(d,a,b,c,x[ 8],md5_S32,0x8771f681);c=md5_HH(c,d,a,b,x[11],md5_S33,0x6d9d6122);b=md5_HH(b,c,d,a,x[14],md5_S34,0xfde5380c);a=md5_HH(a,b,c,d,x[ 1],md5_S31,0xa4beea44);d=md5_HH(d,a,b,c,x[ 4],md5_S32,0x4bdecfa9);c=md5_HH(c,d,a,b,x[ 7],md5_S33,0xf6bb4b60);b=md5_HH(b,c,d,a,x[10],md5_S34,0xbebfbc70);a=md5_HH(a,b,c,d,x[13],md5_S31,0x289b7ec6);d=md5_HH(d,a,b,c,x[ 0],md5_S32,0xeaa127fa);c=md5_HH(c,d,a,b,x[ 3],md5_S33,0xd4ef3085);b=md5_HH(b,c,d,a,x[ 6],md5_S34,0x4881d05);a=md5_HH(a,b,c,d,x[ 9],md5_S31,0xd9d4d039);d=md5_HH(d,a,b,c,x[12],md5_S32,0xe6db99e5);c=md5_HH(c,d,a,b,x[15],md5_S33,0x1fa27cf8);b=md5_HH(b,c,d,a,x[ 2],md5_S34,0xc4ac5665);a=md5_II(a,b,c,d,x[ 0],md5_S41,0xf4292244);d=md5_II(d,a,b,c,x[ 7],md5_S42,0x432aff97);c=md5_II(c,d,a,b,x[14],md5_S43,0xab9423a7);b=md5_II(b,c,d,a,x[ 5],md5_S44,0xfc93a039);a=md5_II(a,b,c,d,x[12],md5_S41,0x655b59c3);d=md5_II(d,a,b,c,x[ 3],md5_S42,0x8f0ccc92);c=md5_II(c,d,a,b,x[10],md5_S43,0xffeff47d);b=md5_II(b,c,d,a,x[ 1],md5_S44,0x85845dd1);a=md5_II(a,b,c,d,x[ 8],md5_S41,0x6fa87e4f);d=md5_II(d,a,b,c,x[15],md5_S42,0xfe2ce6e0);c=md5_II(c,d,a,b,x[ 6],md5_S43,0xa3014314);b=md5_II(b,c,d,a,x[13],md5_S44,0x4e0811a1);a=md5_II(a,b,c,d,x[ 4],md5_S41,0xf7537e82);d=md5_II(d,a,b,c,x[11],md5_S42,0xbd3af235);c=md5_II(c,d,a,b,x[ 2],md5_S43,0x2ad7d2bb);b=md5_II(b,c,d,a,x[ 9],md5_S44,0xeb86d391);md5_state[0] +=a;md5_state[1] +=b;md5_state[2] +=c;md5_state[3] +=d;}
function md5_init(){
md5_count[0]=md5_count[1]=0;md5_state[0]=0x67452301;md5_state[1]=0xefcdab89;md5_state[2]=0x98badcfe;md5_state[3]=0x10325476;for(i=0;i<md5_digestBits.length;i++)
md5_digestBits[i]=0;}
function md5_update(b){
var index,i;index=md5_and(md5_shr(md5_count[0],3),0x3f);if(md5_count[0]<0xffffffff-7)
md5_count[0] +=8;else{
md5_count[1]++;md5_count[0]-=0xffffffff+1;md5_count[0]+=8;}
md5_buffer[index]=md5_and(b,0xff);if(index>=63){
md5_transform(md5_buffer,0);}
}
function md5_finish(){
var bits=new md5_array(8);var padding;var i=0,index=0,padLen=0;for(i=0;i<4;i++){
bits[i]=md5_and(md5_shr(md5_count[0],(i * 8)),0xff);}
for(i=0;i<4;i++){
bits[i+4]=md5_and(md5_shr(md5_count[1],(i * 8)),0xff);}
index=md5_and(md5_shr(md5_count[0],3),0x3f);padLen=(index<56)?(56 - index):(120 - index);padding=new md5_array(64);padding[0]=0x80;for(i=0;i<padLen;i++)
md5_update(padding[i]);for(i=0;i<8;i++)
md5_update(bits[i]);for(i=0;i<4;i++){
for(j=0;j<4;j++){
md5_digestBits[i*4+j]=md5_and(md5_shr(md5_state[i],(j * 8)),0xff);}
}
}
function md5_hexa(n){
var hexa_h="0123456789abcdef";var hexa_c="";var hexa_m=n;for(hexa_i=0;hexa_i<8;hexa_i++){
hexa_c=hexa_h.charAt(Math.abs(hexa_m)%16)+hexa_c;hexa_m=Math.floor(hexa_m/16);}
return hexa_c;}
var md5_ascii="01234567890123456789012345678901" +
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"+
"[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";function Map24(){}
Map24.AllowAPIUsageOnArbitraryUrl=false;Map24.VERSION="1.2.6#51b";Map24.DOCTYPE="QuirksMode";if((typeof document.compatMode=="undefined")||(document.compatMode==null)){
Map24.DOCTYPE="QuirksMode";}else
if((document.compatMode=="BackCompat")||(document.compatMode=="QuirksMode")){
Map24.DOCTYPE="QuirksMode";}else
{
Map24.DOCTYPE="CSS1Compat";}
Map24._Initialized=false;Map24._Mutex=0;Map24.Ready=false;Map24._Compress=false;Map24._HtmlEntitiesToCharacter=new Hashtable();Map24._HtmlEntitiesToCharacter["&nbsp;"]=" ";Map24._HtmlEntitiesToCharacter["&iexcl;"]="??";Map24._HtmlEntitiesToCharacter["&cent;"]="??";Map24._HtmlEntitiesToCharacter["&pound;"]="??";Map24._HtmlEntitiesToCharacter["&curren;"]="??";Map24._HtmlEntitiesToCharacter["&yen;"]="??";Map24._HtmlEntitiesToCharacter["&brvbar;"]="??";Map24._HtmlEntitiesToCharacter["&sect;"]="??";Map24._HtmlEntitiesToCharacter["&uml;"]="??";Map24._HtmlEntitiesToCharacter["&copy;"]="??";Map24._HtmlEntitiesToCharacter["&ordf;"]="??";Map24._HtmlEntitiesToCharacter["&laquo;"]="??";Map24._HtmlEntitiesToCharacter["&not;"]="??";Map24._HtmlEntitiesToCharacter["&shy;"]="??";Map24._HtmlEntitiesToCharacter["&reg;"]="??";Map24._HtmlEntitiesToCharacter["&macr;"]="??";Map24._HtmlEntitiesToCharacter["&deg;"]="??";Map24._HtmlEntitiesToCharacter["&plusmn;"]="??";Map24._HtmlEntitiesToCharacter["&sup2;"]="??";Map24._HtmlEntitiesToCharacter["&sup3;"]="??";Map24._HtmlEntitiesToCharacter["&acute;"]="??";Map24._HtmlEntitiesToCharacter["&micro;"]="??";Map24._HtmlEntitiesToCharacter["&para;"]="??";Map24._HtmlEntitiesToCharacter["&middot;"]="??";Map24._HtmlEntitiesToCharacter["&cedil;"]="??";Map24._HtmlEntitiesToCharacter["&sup1;"]="??";Map24._HtmlEntitiesToCharacter["&ordm;"]="??";Map24._HtmlEntitiesToCharacter["&raquo;"]="??";Map24._HtmlEntitiesToCharacter["&frac14;"]="??";Map24._HtmlEntitiesToCharacter["&frac12;"]="??";Map24._HtmlEntitiesToCharacter["&frac34;"]="??";Map24._HtmlEntitiesToCharacter["&iquest;"]="??";Map24._HtmlEntitiesToCharacter["&Agrave;"]="??";Map24._HtmlEntitiesToCharacter["&Aacute;"]="??";Map24._HtmlEntitiesToCharacter["&Acirc;"]="??";Map24._HtmlEntitiesToCharacter["&Atilde;"]="??";Map24._HtmlEntitiesToCharacter["&Auml;"]="??";Map24._HtmlEntitiesToCharacter["&Aring;"]="??";Map24._HtmlEntitiesToCharacter["&AElig;"]="??";Map24._HtmlEntitiesToCharacter["&Ccedil;"]="??";Map24._HtmlEntitiesToCharacter["&Egrave;"]="??";Map24._HtmlEntitiesToCharacter["&Eacute;"]="??";Map24._HtmlEntitiesToCharacter["&Ecirc;"]="??";Map24._HtmlEntitiesToCharacter["&Euml;"]="??";Map24._HtmlEntitiesToCharacter["&Igrave;"]="??";Map24._HtmlEntitiesToCharacter["&Iacute;"]="??";Map24._HtmlEntitiesToCharacter["&Icirc;"]="??";Map24._HtmlEntitiesToCharacter["&Iuml;"]="??";Map24._HtmlEntitiesToCharacter["&ETH;"]="??";Map24._HtmlEntitiesToCharacter["&Ntilde;"]="??";Map24._HtmlEntitiesToCharacter["&Ograve;"]="??";Map24._HtmlEntitiesToCharacter["&Oacute;"]="??";Map24._HtmlEntitiesToCharacter["&Ocirc;"]="??";Map24._HtmlEntitiesToCharacter["&Otilde;"]="??";Map24._HtmlEntitiesToCharacter["&Ouml;"]="??";Map24._HtmlEntitiesToCharacter["&times;"]="??";Map24._HtmlEntitiesToCharacter["&Oslash;"]="??";Map24._HtmlEntitiesToCharacter["&Ugrave;"]="??";Map24._HtmlEntitiesToCharacter["&Uacute;"]="??";Map24._HtmlEntitiesToCharacter["&Ucirc;"]="??";Map24._HtmlEntitiesToCharacter["&Uuml;"]="??";Map24._HtmlEntitiesToCharacter["&Yacute;"]="??";Map24._HtmlEntitiesToCharacter["&THORN;"]="??";Map24._HtmlEntitiesToCharacter["&szlig;"]="??";Map24._HtmlEntitiesToCharacter["&agrave;"]="??";Map24._HtmlEntitiesToCharacter["&aacute;"]="??";Map24._HtmlEntitiesToCharacter["&acirc;"]="??";Map24._HtmlEntitiesToCharacter["&atilde;"]="??";Map24._HtmlEntitiesToCharacter["&auml;"]="??";Map24._HtmlEntitiesToCharacter["&aring;"]="??";Map24._HtmlEntitiesToCharacter["&aelig;"]="??";Map24._HtmlEntitiesToCharacter["&ccedil;"]="??";Map24._HtmlEntitiesToCharacter["&egrave;"]="??";Map24._HtmlEntitiesToCharacter["&eacute;"]="??";Map24._HtmlEntitiesToCharacter["&ecirc;"]="??";Map24._HtmlEntitiesToCharacter["&euml;"]="??";Map24._HtmlEntitiesToCharacter["&igrave;"]="??";Map24._HtmlEntitiesToCharacter["&iacute;"]="??";Map24._HtmlEntitiesToCharacter["&icirc;"]="??";Map24._HtmlEntitiesToCharacter["&iuml;"]="??";Map24._HtmlEntitiesToCharacter["&eth;"]="??";Map24._HtmlEntitiesToCharacter["&ntilde;"]="??";Map24._HtmlEntitiesToCharacter["&ograve;"]="??";Map24._HtmlEntitiesToCharacter["&oacute;"]="??";Map24._HtmlEntitiesToCharacter["&ocirc;"]="??";Map24._HtmlEntitiesToCharacter["&otilde;"]="??";Map24._HtmlEntitiesToCharacter["&ouml;"]="??";Map24._HtmlEntitiesToCharacter["&divide;"]="??";Map24._HtmlEntitiesToCharacter["&oslash;"]="??";Map24._HtmlEntitiesToCharacter["&ugrave;"]="??";Map24._HtmlEntitiesToCharacter["&uacute;"]="??";Map24._HtmlEntitiesToCharacter["&ucirc;"]="??";Map24._HtmlEntitiesToCharacter["&uuml;"]="??";Map24._HtmlEntitiesToCharacter["&yacute;"]="??";Map24._HtmlEntitiesToCharacter["&thorn;"]="??";Map24._HtmlEntitiesToCharacter["&yuml;"]="??";Map24._HtmlEntitiesToCharacter["&quot;"]="\"";Map24._HtmlEntitiesToCharacter["&lt;"]="<";Map24._HtmlEntitiesToCharacter["&gt;"]=">";Map24._HtmlEntitiesToCharacter["&amp;"]="&";Map24._CharacterToHtmlEntities=new Hashtable();Map24._CharacterToHtmlEntities[" "]="&nbsp;";Map24._CharacterToHtmlEntities["??"]="&iexcl;";Map24._CharacterToHtmlEntities["??"]="&cent;";Map24._CharacterToHtmlEntities["??"]="&pound;";Map24._CharacterToHtmlEntities["??"]="&curren;";Map24._CharacterToHtmlEntities["??"]="&yen;";Map24._CharacterToHtmlEntities["??"]="&brvbar;";Map24._CharacterToHtmlEntities["??"]="&sect;";Map24._CharacterToHtmlEntities["??"]="&uml;";Map24._CharacterToHtmlEntities["??"]="&copy;";Map24._CharacterToHtmlEntities["??"]="&ordf;";Map24._CharacterToHtmlEntities["??"]="&laquo;";Map24._CharacterToHtmlEntities["??"]="&not;";Map24._CharacterToHtmlEntities["??"]="&shy;";Map24._CharacterToHtmlEntities["??"]="&reg;";Map24._CharacterToHtmlEntities["??"]="&macr;";Map24._CharacterToHtmlEntities["??"]="&deg;";Map24._CharacterToHtmlEntities["??"]="&plusmn;";Map24._CharacterToHtmlEntities["??"]="&sup2;";Map24._CharacterToHtmlEntities["??"]="&sup3;";Map24._CharacterToHtmlEntities["??"]="&acute;";Map24._CharacterToHtmlEntities["??"]="&micro;";Map24._CharacterToHtmlEntities["??"]="&para;";Map24._CharacterToHtmlEntities["??"]="&middot;";Map24._CharacterToHtmlEntities["??"]="&cedil;";Map24._CharacterToHtmlEntities["??"]="&sup1;";Map24._CharacterToHtmlEntities["??"]="&ordm;";Map24._CharacterToHtmlEntities["??"]="&raquo;";Map24._CharacterToHtmlEntities["??"]="&frac14;";Map24._CharacterToHtmlEntities["??"]="&frac12;";Map24._CharacterToHtmlEntities["??"]="&frac34;";Map24._CharacterToHtmlEntities["??"]="&iquest;";Map24._CharacterToHtmlEntities['??']="&Agrave;";Map24._CharacterToHtmlEntities["??"]="&Aacute;";Map24._CharacterToHtmlEntities["??"]="&Acirc;";Map24._CharacterToHtmlEntities["??"]="&Atilde;";Map24._CharacterToHtmlEntities["??"]="&Auml;";Map24._CharacterToHtmlEntities["??"]="&Aring;";Map24._CharacterToHtmlEntities["??"]="&AElig;";Map24._CharacterToHtmlEntities["??"]="&Ccedil;";Map24._CharacterToHtmlEntities["??"]="&Egrave;";Map24._CharacterToHtmlEntities["??"]="&Eacute;";Map24._CharacterToHtmlEntities["??"]="&Ecirc;";Map24._CharacterToHtmlEntities["??"]="&Euml;";Map24._CharacterToHtmlEntities["??"]="&Igrave;";Map24._CharacterToHtmlEntities["??"]="&Iacute;";Map24._CharacterToHtmlEntities["??"]="&Icirc;";Map24._CharacterToHtmlEntities["??"]="&Iuml;";Map24._CharacterToHtmlEntities["??"]="&ETH;";Map24._CharacterToHtmlEntities["??"]="&Ntilde;";Map24._CharacterToHtmlEntities["??"]="&Ograve;";Map24._CharacterToHtmlEntities["??"]="&Oacute;";Map24._CharacterToHtmlEntities["??"]="&Ocirc;";Map24._CharacterToHtmlEntities["??"]="&Otilde;";Map24._CharacterToHtmlEntities["??"]="&Ouml;";Map24._CharacterToHtmlEntities["??"]="&times;";Map24._CharacterToHtmlEntities["??"]="&Oslash;";Map24._CharacterToHtmlEntities["??"]="&Ugrave;";Map24._CharacterToHtmlEntities["??"]="&Uacute;";Map24._CharacterToHtmlEntities["??"]="&Ucirc;";Map24._CharacterToHtmlEntities["??"]="&Uuml;";Map24._CharacterToHtmlEntities["??"]="&Yacute;";Map24._CharacterToHtmlEntities["??"]="&THORN;";Map24._CharacterToHtmlEntities["??"]="&szlig;";Map24._CharacterToHtmlEntities["??"]="&agrave;";Map24._CharacterToHtmlEntities["??"]="&aacute;";Map24._CharacterToHtmlEntities["??"]="&acirc;";Map24._CharacterToHtmlEntities["??"]="&atilde;";Map24._CharacterToHtmlEntities["??"]="&auml;";Map24._CharacterToHtmlEntities["??"]="&aring;";Map24._CharacterToHtmlEntities["??"]="&aelig;";Map24._CharacterToHtmlEntities["??"]="&ccedil;";Map24._CharacterToHtmlEntities["??"]="&egrave;";Map24._CharacterToHtmlEntities["??"]="&eacute;";Map24._CharacterToHtmlEntities["??"]="&ecirc;";Map24._CharacterToHtmlEntities["??"]="&euml;";Map24._CharacterToHtmlEntities["??"]="&igrave;";Map24._CharacterToHtmlEntities["??"]="&iacute;";Map24._CharacterToHtmlEntities["??"]="&icirc;";Map24._CharacterToHtmlEntities["??"]="&iuml;";Map24._CharacterToHtmlEntities["??"]="&eth;";Map24._CharacterToHtmlEntities["??"]="&ntilde;";Map24._CharacterToHtmlEntities["??"]="&ograve;";Map24._CharacterToHtmlEntities["??"]="&oacute;";Map24._CharacterToHtmlEntities["??"]="&ocirc;";Map24._CharacterToHtmlEntities["??"]="&otilde;";Map24._CharacterToHtmlEntities["??"]="&ouml;";Map24._CharacterToHtmlEntities["??"]="&divide;";Map24._CharacterToHtmlEntities["??"]="&oslash;";Map24._CharacterToHtmlEntities["??"]="&ugrave;";Map24._CharacterToHtmlEntities["??"]="&uacute;";Map24._CharacterToHtmlEntities["??"]="&ucirc;";Map24._CharacterToHtmlEntities["??"]="&uuml;";Map24._CharacterToHtmlEntities["??"]="&yacute;";Map24._CharacterToHtmlEntities["??"]="&thorn;";Map24._CharacterToHtmlEntities["??"]="&yuml;";Map24._CharacterToHtmlEntities["\""]="&quot;";Map24._CharacterToHtmlEntities["<"]="&lt;";Map24._CharacterToHtmlEntities[">"]="&gt;";Map24._CharacterToHtmlEntities["&"]="&amp;";Map24._ClassesShared={
"Map24.Object":true,"Map24.Map":true
};Map24._ClassesSharedURL=new Hashtable();Map24._ScriptsShared=new Hashtable();Map24._ScriptsSharedURL=new Hashtable();Map24._WaitFor=new Array();Map24.waitFor=function(className,scriptName,listener){
var waitObject={};if(!(listener instanceof Callable))throw new Map24.Exceptions.InvalidArgument("Invalid argument 'listener' given, no instance of Callable!",listener,"Map24","waitFor");waitObject.Listener=listener;if(typeof className=="string")className=new Array(className);if(className==null)className=new Array();if(!(className instanceof Array))throw new Map24.Exceptions.InvalidArgument("Invalid argument 'className' given, no string or array and not null!",className,"Map24","waitFor");waitObject.Classes=className;if(typeof scriptName=="string")scriptName=new Array(scriptName);if(scriptName==null)scriptName=new Array();if(!(scriptName instanceof Array))throw new Map24.Exceptions.InvalidArgument("Invalid argument 'scriptName' given, no string or array and not null!",scriptName,"Map24","waitFor");waitObject.Scripts=scriptName;Map24._WaitFor.push(waitObject);Map24._triggerListener();}
Map24._triggerListener=function(){
while(Map24._Mutex>0){};Map24._Mutex++;var newWaitFor=new Array();var trigger=new Array();var currentWaitFor=null;for(var i=0;i<Map24._WaitFor.length;i++){
currentWaitFor=Map24._WaitFor[i];var allClassesReady=true;for(var j=0;j<currentWaitFor.Classes.length;j++){
if(typeof Map24._ClassesShared[currentWaitFor.Classes[j]]!="boolean"||Map24._ClassesShared[currentWaitFor.Classes[j]]==false)
{
allClassesReady=false;break;}
}
if(!allClassesReady){
newWaitFor.push(currentWaitFor);continue;}
var allScriptsReady=true;for(var j=0;j<currentWaitFor.Scripts.length;j++){
if(typeof Map24._ScriptsShared[currentWaitFor.Scripts[j]]!="boolean"||Map24._ScriptsShared[currentWaitFor.Scripts[j]]==false)
{
allScriptsReady=false;break;}
}
if(!allScriptsReady){
newWaitFor.push(currentWaitFor);continue;}
trigger.push(currentWaitFor);}
Map24._Mutex--;var result=null;for(var i=0;i<trigger.length;i++){
try{
var e=new Map24.Event.ShareReady(trigger[i].Classes,trigger[i].Scripts);trigger[i].Listener.invokeEx({event:e});}catch(e){
Map24.dump(e,null,2);}
}
}
Map24.Arguments=new Hashtable();Map24.findScriptByName=function(name)
{
var url="";var test=document.getElementsByTagName("script");for(var i=0;i<test.length;i++){
try{
var src=test[i].getAttribute("src");if(src)
if(src.indexOf(name)!=-1){
if(src.substr(0,7)=="http://"){
url=src;}else{
url=document.URL.substr(0,document.URL.lastIndexOf("/"))+ "/" + src;}
return url;}
}catch(e){
}
}
return url;}
Map24.splitUrl=function(url)
{
var result=new Array();var tmp=url.split("?",2);result.push(tmp[0]);var url_args={};if(tmp.length>1){
var args=tmp[1].split("&");var arg=null;for(var i=0;i<args.length;i++){
arg=args[i].split("=",2);if(arg.length==1){
url_args[arg[0]]=null;}else
if(arg.length==2){
url_args[arg[0]]=arg[1];}
arg=null;}
}
result.push(url_args);return result;}
Map24.dirname=function(url)
{
if(typeof url!="string")return "";var lastIndex=url.lastIndexOf("/");if(lastIndex==-1)return url+"/";return url.substr(0,lastIndex+1);}
Map24.htmlentities=function(string){
var result="";var entity=null;for(i=0;i<string.length;i++){
entity=Map24._CharacterToHtmlEntities[ string.charAt(i)];if(entity!=null)
result +=entity;else
result +=string.charAt(i);}
return result;}
Map24.html_entity_decode=function(string){
var result="";var entity="";for(i=0;i<string.length;i++){
if(string.charAt(i)=="&"){
entity +=string.charAt(i);}else
if(entity.length==0){
result +=string.charAt(i);}else
if(string.charAt(i)==";"){
entity +=';';var translated=Map24._HtmlEntitiesToCharacter[ entity ];if(translated!=null)
result +=translated;else
result +=entity;entity="";}else
entity +=string.charAt(i);}
if(entity.length>0)result+=entity;return result;}
Map24.isApplicationKey=function(key)
{
if(typeof key!="string")return false;if(key.length!=35)return false;if(key.substring(1,3)!="JX")return false;return true;}
Map24._include=function(url){
var script=document.createElement('script');script.defer=true;script.src=url;document.getElementsByTagName('head')[0].appendChild(script);}
Map24._declude=function(url){
var head=document.getElementsByTagName('head')[0];var script=null;for(var i=0;i<head.childNodes.length;i++){
script=head.childNodes[i];if(script.src==url){
head.removeChild(script);break;}
}
}
Map24.shares=function(name,listener){
if((typeof name!="string")||(name.length<=0))throw new Map24.Exceptions.InvalidArgument("The given classname is no string or an empty string!",name,"Map24","shares");if(typeof Map24._ClassesShared[name]!="boolean"){
Map24._ClassesShared[name]=false;Map24._ClassesSharedURL[name]=Map24.CONST["HTTP_ROOT"]+"?file="+Map24.urlencode(name.replace(new RegExp("[.]","g"),"/")+".js")+"&version="+Map24.VERSION+(Map24._Compress?"":"&viewsource");Map24.Ready=false;if(Map24._Initialized)Map24._include(Map24._ClassesSharedURL[name]);}
if(listener instanceof Callable)Map24.waitFor(name,null,listener);}
Map24.sharesByURL=function(url,listener){
if((typeof url!="string")||(url.length<=0))throw new Map24.Exceptions.InvalidArgument("The given URL is no string or an empty string!",url,"Map24","sharesByURL");if(typeof Map24._ClassesShared[url]!="boolean")
{
if(url.indexOf("http://")<0){
var baseURL=Map24.splitUrl(document.URL);url=Map24.dirname(baseURL[0])+ url;}
var name=Map24.splitUrl(url)[0];Map24._ClassesShared[name]=false;Map24._ClassesSharedURL[name]=url;Map24.Ready=false;if(Map24._Initialized)Map24._include(Map24._ClassesSharesURL[name]);}
if(listener instanceof Callable)Map24.waitFor(name,null,listener);}
Map24.sharesScript=function(url,listener){
if((typeof url!="string")||(url.length<=0))throw new Map24.Exceptions.InvalidArgument("The given URL is no string or an empty string!",url,"Map24","sharesScript");if(url.indexOf("http://")<0){
var baseURL=Map24.splitUrl(document.URL);url=Map24.dirname(baseURL[0])+ url;}
var name=Map24.splitUrl(url)[0];Map24._ScriptsShared[name]=false;Map24._ClassesSharedURL[name]=url;if(Map24._Initialized)Map24._include(url);if(listener instanceof Callable)Map24.waitFor(null,name,listener);}
Map24.sharesScriptOnce=function(url,listener){
if((typeof url!="string")||(url.length<=0))throw new Map24.Exceptions.InvalidArgument("The given URL is no string or an empty string!",url,"Map24","sharesScriptOnce");if(url.indexOf("http://")<0){
var baseURL=Map24.splitUrl(document.URL);url=Map24.dirname(baseURL[0])+ url;}
var name=Map24.splitUrl(url)[0];if(typeof Map24._ScriptsShared[name]!="boolean")Map24.sharesScript(url);if(listener instanceof Callable)Map24.waitFor(null,url,listener);}
Map24.isShared=function(name){
if((typeof name!="string")||(name.length<=0))throw new Map24.Exceptions.InvalidArgument("The given classname is invalid (no string or empty string)!",name,"Map24","isShared");return(typeof Map24._ClassesShared[name]=="boolean");}
Map24.notifyClassReady=function(name){
if((typeof name!="string")||(name.lenght<=0))throw new Map24.Exceptions.InvalidArgument("The given name is no string or an empty string!",name,"Map24","notifyClassReady");Map24._ClassesShared[name]=true;Map24._triggerListener();}
Map24.notifyScriptReady=function(url){
if((typeof url!="string")||(url.lenght<=0))throw new Map24.Exceptions.InvalidArgument("The given URL is no string or an empty string!",url,"Map24","notifyScriptReady");if(url.indexOf("http://")<0){
var baseURL=Map24.splitUrl(document.URL);url=Map24.dirname(baseURL[0])+ url;}
var name=Map24.splitUrl(url)[0];Map24._ScriptsShared[name]=true;Map24._triggerListener();}
Map24.listShares=function(){
return Map24.clone(Map24._ClassesShared);}
Map24.makeUniqueId=function(len){
if(typeof len=="undefined")len=32;if((typeof len!="number")||(len<=0)||(len>256))throw new Map24.Exceptions.InvalidArgument("The given parameter 'len' is no number, less then 1 or greater then 256!",len,"Map24","makeUniqueId");var unique_id="";while(unique_id.length<len)
unique_id +=md5(""+((new Date()).getTime())+""+Math.random());if(unique_id.length==len)return unique_id;return unique_id.substr(0,len);}
Map24.isObject=function(obj,interfacename){
if(typeof interfacename=="undefined")interfacename=null;if((obj==null)||((!(obj instanceof Object))&&((typeof obj).substr(0,6)!="object")))return false;if(interfacename==null)return true;if(typeof interfacename!="string")interfacename="IUnknown";return((obj.Interfaces instanceof Object)&&(typeof obj.Interfaces[interfacename]!="undefined")&&((obj.Interfaces[interfacename] instanceof Callable)||obj.Interfaces[interfacename]==null));}
Map24.isDocument=function(doc){
if(!Map24.isObject(doc))return false;if(Map24.Browser.OPERA)
return((typeof doc.nodeName=="string")&&(doc.nodeName=="#document"));else
if(Map24.Browser.IE)
return(typeof doc.createElement=="object");else
return(typeof doc.createElement=="function");}
Map24.isImage=function(img){
if(!Map24.isObject(img))return false;if(Map24.Browser.IE){
if(typeof img.tagName!="string")return false;return(img.tagName=="IMG");}else
return(img instanceof Image);}
Map24.isNumeric=function(value){
try{
if(typeof value=="number")return true;if(typeof value=="string"){
var rexp=new RegExp("^([+-]{0,1}[0-9]+)([.]{0,1}[0-9]{0,})$");var s=rexp.exec(value);if(!(s instanceof Object))return false;return(s[0]==value);}
}catch(e){}
return false;}
Map24.isNumber=function(value){return Map24.isNumeric(value);}
Map24.isNull=function(value){
if(value==null)return true;switch(typeof value){
case "undefined":case "null":return true;}
return false;}
Map24.empty=function(value){
if(value==null)return true;switch(typeof value){
case "undefined":case "null":return true;case "number":return(value==0);case "boolean":return(value==false);case "string":value=Map24.trim(value);if(value.length<=0)return true;if(value=="0")return true;if(value=="+0")return true;if(value=="-0")return true;return false;}
return false;}
Map24.arrayKeyExists=function(key,array){
if(typeof key!="string")return false;if(!(array instanceof Object))return false;if(typeof array[key]=="undefined")return false;return true;}
Map24.arrayKeys=function(hashtable){
if(!(hashtable instanceof Object))throw new Map24.Exceptions.InvalidArgument("The given hashtable is no object!",hashtable,"Map24","arrayKeys");var result=new Array();for(key in hashtable){result.push(key);}
return result;}
Map24.arrayValues=function(hashtable){
if(!(hashtable instanceof Object))throw new Map24.Exceptions.InvalidArgument("The given hashtable is no object!",hashtable,"Map24","arrayKeys");var result=new Array();for(key in hashtable){result.push(hashtable[key]);}
return result;}
Map24.arraySearch=function(value,array){
if(!(array instanceof Object))return null;if(array instanceof Array){
for(var i=0;i<array.length;i++){
if(array[i]==value)return i;}
}else{
for(var key in array){
if(array[key]==value)return key;}
}
return null;}
Map24.arrayMerge=function(array1,array2){
var type=null;var result=null;if(array1 instanceof Array){
type="Array";result=new Array();}else
if(array1 instanceof Object){
type="Hashtable";result={};}else
throw new Map24.Exceptions.InvalidArgument("The first argument is neither Array nor Hashtable!",array1,"Map24","arrayMerge");for(var i=0;i<arguments.length;i++){
if(!(arguments[i] instanceof Object))throw new Map24.Exceptions.InvalidArgument("The "+i+". argument is neither Array nor Hashtable!",argument[i],"Map24","arrayMerge");if(type=="Array"&&!(arguments[i] instanceof Array))throw new Map24.Exceptions.InvalidArgument("The "+i+". argument is no Array where array is required!",argument[i],"Map24","arrayMerge");if(type=="Hashtable"&&(arguments[i] instanceof Array))throw new Map24.Exceptions.InvalidArgument("The "+i+". argument is an Array where a Hashtable is required!",argument[i],"Map24","arrayMerge");if(type=="Array"){
for(var j=0;j<arguments[i].length;j++)result.push(arguments[i][j]);}else{
for(var key in arguments[i])result[key]=arguments[i][key];}
}
return result;}
Map24.hashtableToQueryString=function(hashtable){
var result="";if(hashtable instanceof Object)
for(var key in hashtable){
if(hashtable[key] instanceof Array)
{
for(var i=0;i<hashtable[key].length;i++){
var value=hashtable[key][i];if(value==null)
result +="&"+key+"=";else
switch(typeof value){
case "number":case "string":result +="&"+key+i+"="+Map24.rawurlencode(value);break;case "boolean":result +="&"+key+i+"="+(value?'true':'false');break;case "undefined":result +="&"+key+i+"=";break;default:result +="&"+key+i+"="+(typeof value);break;}
}
}else{
if(hashtable[key]==null)
result +="&"+key+"=";else
switch(typeof hashtable[key]){
case "number":case "string":result +="&"+key+"="+Map24.rawurlencode(hashtable[key]);break;case "boolean":result +="&"+key+"="+(hashtable[key]?'true':'false');break;case "undefined":result +="&"+key+"=";break;default:result +="&"+key+"="+typeof hashtable[key];break;}
}
}
return result;}
Map24.count=function(obj){
if(!(obj instanceof Object))return 0;if(obj instanceof Array)return obj.length;var count=0;for(var name in obj)count++;return count;}
Map24.urlencode=function(string){
if(typeof string!="string")return string;return escape(string);}
Map24.hexValues=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");Map24.dec2hex=function(dec){
if(typeof dec=="string"){
try{dec=parseInt(dec);}catch(e){}
}
if(typeof dec!="number")throw new Map24.Exceptions.InvalidArgument("The given decimal number if invalid (no number)!",dec,"Map24","dec2hex");var result="";if(dec==0)return "0";while(dec>=1){
result=Map24.hexValues[dec % 16] + result;dec=dec / 16;}
return result;}
Map24.rawurlencode=function(string){
if(typeof string!="string")return string;var newString="";var i;for(i=0;i<string.length;i++)
{
if(string.charCodeAt(i)==32){
newString +="%20";}else
if(string.charCodeAt(i)==43){
newString +="%2B";}else
if(string.charCodeAt(i)==124){
newString +="|";}else
if(string.charCodeAt(i)<128){
newString +=escape(string.charAt(i));}else
if(string.charCodeAt(i)<256){
newString +="%";newString +=hexValues[(string.charCodeAt(i)>>4)];newString +=hexValues[(string.charCodeAt(i)&15)];}else
newString +=escape(string.charAt(i));}
return newString;}
Map24.trim=function(text){
if(typeof text!="string")return text;return text.replace(/\n/ig,"").replace(/\r/ig,"").replace(/^ /i,"").replace(/ $/i,"");}
Map24.millitime=function(){
return new Date().getTime();}
Map24.time=function(){
return Math.round((new Date().getTime())/1000);}
Map24.DEBUG=false;Map24.DumpDefaultMaximalRecursions=1;Map24.DumpFunctions=false;Map24._DebugConsole={
hWin:null,History:new Array(),HistoryBufferSize:50,Left:0,Top:0,Width:500,Height:500,OldOldKeyDownHandler:null
}
Map24.dump=function(obj,maxrecursions,tabchar){
if((maxrecursions==null)&&Map24.isNumber(tabchar)){
maxrecursions=tabchar;if(arguments.length>=4)tabchar=arguments[3];}
if(!Map24.DEBUG)return;if(typeof tabchar!="string")tabchar="\t";if(typeof maxrecursions!="number")
maxrecursions=Map24.DumpDefaultMaximalRecursions;var s=Map24.dump_type(obj,"",maxrecursions,tabchar);if(Map24._DebugConsole.History.length>(Map24._DebugConsole.HistoryBufferSize+10)){
Map24._DebugConsole.History.splice(0,10);}
Map24._DebugConsole.History.push(s);Map24.writeToDebugConsole(s,false);}
Map24.writeToDebugConsole=function(s,setFocus){
if(typeof setFocus!="boolean")setFocus=false;if((typeof s!="string")&&(typeof s!="number"))return;if(Map24._DebugConsole.hWin!=null)
{
try{
var myXMP=document.createElement("xmp");var myText=document.createTextNode(s);myXMP.appendChild(myText);if(navigator.userAgent.search(/Opera/)>=0||navigator.appName=="Microsoft Internet Explorer"){
var tmp=Map24._DebugConsole.hWin.document.getElementById("debug");if(navigator.userAgent.search(/Opera/)){
tmp.innerHTML=tmp.innerHTML + "<xmp>"+s+"</xmp>";}else
tmp.innerHTML=Map24.html_entity_decode(tmp.innerHTML)+ "<xmp>"+s+"</xmp>";}else{
Map24._DebugConsole.hWin.document.getElementById("debug").appendChild(myXMP);}
if(setFocus)Map24._DebugConsole.hWin.focus();}catch(e){}
}
}
Map24.clearDebugConsoleHistory=function(){
Map24._DebugConsole.History=new Array();}
Map24.openDebugConsole=function(){
if(Map24.DEBUG==false)Map24.DEBUG=true;if(Map24._DebugConsole.hWin==null){
try{
Map24._DebugConsole.hWin=window.open("","Map24AJAXAPIDebug","left="+Map24._DebugConsole.Left+",top="+Map24._DebugConsole.Top+",width="+Map24._DebugConsole.Width+",height="+Map24._DebugConsole.Height+",toolbar=no,status=no,menubar=no,location=no,resizable=yes,scrollbars=yes");Map24._DebugConsole.hWin.document.open("text/html");Map24._DebugConsole.hWin.document.writeln("<html><head><title>Dump page</title></head><body><div id=\"debug\"></div></body></html>");Map24._DebugConsole.hWin.document.close();for(var i=0;i<Map24._DebugConsole.History.length;i++)
Map24.writeToDebugConsole(Map24._DebugConsole.History[i],false);Map24._DebugConsole.hWin.focus();}catch(e){}
}
}
Map24.closeDebugConsole=function(){
if(Map24._DebugConsole.hWin!=null){
try{
var hWin=Map24._DebugConsole.hWin;Map24._DebugConsole.Left=(typeof hWin.screenX=="number"?hWin.screenX:hWin.left);Map24._DebugConsole.Top=(typeof hWin.screenY=="number"?hWin.screenY:hWin.top);Map24._DebugConsole.Width=(typeof hWin.outerWidth=="number"?hWin.outerWidth:hWin.width);Map24._DebugConsole.Height=(typeof hWin.outerHeight=="number"?hWin.outerHeight:hWin.height);Map24._DebugConsole.hWin.close();}catch(e){}
Map24._DebugConsole.hWin=null;}
}
Map24.isDebugConsoleOpen=function(){
return(Map24._DebugConsole.hWin!=null);}
Map24.dump_type=function(obj,tabs,maxrecursions,tabchar){
var s="";switch(typeof obj){
case "function":if(Map24.DumpFunctions)s="function()\r\n";break;case "undefined":s="undefined\r\n";break;case "null":s="null\r\n";break;case "number":s="number("+obj+")\r\n";break;case "boolean":s=(obj?"true":"false")+"\r\n";break;case "string":s="\""+obj+"\"\r\n";break;case "object":s=Map24.dump_object(obj,tabs,maxrecursions,tabchar,1);break;default:s="native object\r\n";}
return s;}
Map24.dump_object=function(obj,tabs,maxrecursions,tabchar,recursion_deepth){
var members=0;tabs +=tabchar;var s="";var objectname="object";for(var key in obj)
{
if(key=="Class"){
objectname=obj.Package + "." + obj.Class;continue;}
if(key=="Package")continue;if(key.substr(0,6)=="DOM_VK")continue;members++;switch(typeof obj[key]){
case "function":if(Map24.DumpFunctions)s +=tabs+"[\""+key+"\"] => function()\r\n";break;case "undefined":s +=tabs+"[\""+key+"\"] => undefined\r\n";break;case "null":s +=tabs+"[\""+key+"\"] => null\r\n";break;case "number":s +=tabs+"[\""+key+"\"] => number("+obj[key]+")\r\n";break;case "boolean":s +=tabs+"[\""+key+"\"] => "+(obj[key]?"true":"false")+"\r\n";break;case "string":s +=tabs+"[\""+key+"\"] => \""+obj[key]+"\"\r\n";break;case "object":if(obj[key]==null){
s +=tabs+"[\""+key+"\"] => null\r\n";break;}else
switch(key){
case "Parent":case "parent":s +=tabs+"[\""+key+"\"] => {... skiped, reference to parent object ...}\r\n";break;case "ownerElement":s +=tabs+"[\""+key+"\"] => {... skiped, high possibility of beeing already displayed ...}\r\n";break;case "previousSibling":case "nextSibling":s +=tabs+"[\""+key+"\"] => {... same as childNodes of parent, therefore skiped ...}\r\n";break;case "parentNode":case "parentBox":case "offsetParent":s +=tabs+"[\""+key+"\"] => {... parent already displayed or not interessting ...}\r\n";break;case "firstChild":case "lastChild":s +=tabs+"[\""+key+"\"] => {... see childNodes ...}\r\n";break;default:try{
if(recursion_deepth<=maxrecursions)
s +=tabs+"[\""+key+"\"] => "+Map24.dump_object(obj[key],tabs,maxrecursions,tabchar,(recursion_deepth+1));else
s +=tabs+"[\""+key+"\"] => object(?)\r\n";break;}catch(e){
s +=tabs+"[\""+key+"\"] => native object\r\n";}
}
break;default:s +=tabs+"[\""+key+"\"] => native object\r\n";}
}
if(tabs.length>0)tabs=tabs.substr(0,tabs.length-tabchar.length);return objectname+"("+members+") {\n"+s+tabs+"}\r\n";}
Map24.appendUrl=function(url,args,url_encode){
if(typeof url!="string")return url;if(typeof url_encode!="boolean")url_encode=true;if(typeof args!="string"){
var s="";for(var key in args){
if(url_encode==true)
s +="&"+key+"="+Map24.urlencode(args[key]);else
s +="&"+key+"="+args[key];}
args=s.substr(1);}
if(args.length<=0)return url;while(args.length>0&&(args.charAt(0)=="?"||args.charAt(0)=="&"))args=args.substr(1);var hasQuestionMark=(url.indexOf("?")>=0);if(hasQuestionMark)
url +="&"+args;else
url +="?"+args;return url;}
Map24.sleep=function(waittime){
if(typeof Map24.SLEEP_SCRIPT!="string")throw new Map24.Exceptions.Exception("No sleep script defined, set the constant Map24.SLEEP_SCRIPT!",0,null,"Map24","sleep");if((typeof waittime!="number"))throw new Map24.Exceptions.InvalidArgument("The given waittime is no number!",waittime,"Map24","sleep");}
Map24.clone=function(obj,deep){
if(typeof deep!="boolean")deep=true;if(obj instanceof Array){
var clone=new Array();for(var i=0;i<obj.length;i++){
if(deep)
clone.push(Map24.clone(obj[i]));else
clone.push(obj[i]);}
return clone;}
if(!(obj instanceof Object))return obj;var objectClone=new obj.constructor();for(var property in obj)
{
if(!deep)
objectClone[property]=obj[property];else
if(typeof obj[property]=="object")
objectClone[property]=Map24.clone(obj[property]);else
objectClone[property]=obj[property];}
return objectClone;}
Map24.enableDebug=function(capture){
if(typeof capture!="boolean")capture=false;if(capture==true)
try{
window.onerror=function(errormsg,filename,line){
if(Map24.DEBUG)Map24.dump("'"+errormsg+'" in "'+filename+'", line '+line);return true;}
}catch(e){
}
Map24.DEBUG=true;}
Map24.suppressErrors=function(){
try{
window.onerror=function(errormsg,filename,line){
if(Map24.DEBUG)Map24.dump('"'+errormsg+'" in "'+filename+'", line '+line);return true;}
Map24.DEBUG=false;}catch(e){
}
}
Map24.isCallable=function(func){
if(typeof func=="function")return true;if(func instanceof Callable)return true;return((func instanceof Array)&&(func.length==2)&&(func[0] instanceof Object)&&(typeof func[1]=="function"));}
Map24.invokeEx=function(func,args){
if(func instanceof Callable)return func.invokeEx(args);if(!Map24.isCallable(func))throw new Map24.Exceptions.InvalidArgument("The given parameter func is no callable!",url,"Map24","invoke");if(!(args instanceof Array))args=new Array();var result=null;var args_text="";for(var i=0;i<args.length;i++){
if((i+1)<args.length)
args_text +="args["+i+"],";else
args_text +="args["+i+"]";}
if(typeof func=="function"){
eval("result = func("+args_text+");");}else{
eval("result = func[1].call(func[0]"+(args.length>0?", ":"")+args_text+");");}
return result;}
Map24.invoke=function(func){
var args=new Array();for(var i=1;i<arguments.length;i++){
args[i-1]=arguments[i];}
if(func instanceof Callable)
return func.invokeEx(args);else
return Map24.invokeEx(func,args);}
Map24._Fork=new Array();Map24._forkNext=function(){
var next=Map24._Fork.shift();if(next){
Map24.invoke(next.Func,next.Args);if(Map24._Fork.length>0)setTimeout(Map24._forkNext,1);}
}
Map24.forkEx=function(func,args){
if(func instanceof Callable)return func.forkEx(args);Map24._Fork.push({Func:func,Args:args});setTimeout(Map24._forkNext,1);return true;}
Map24.fork=function(func){
var args=new Array();for(var i=1;i<arguments.length;i++)args.push(arguments[i]);if(func instanceof Callable)
return func.forkEx(args);else
return Map24.forkEx(func,args);}
Map24.OBJECT_TYPE_SYMBOL_ID=new Hashtable();Map24.OBJECT_TYPE=new Hashtable();Map24.OBJECT_TYPE["Generic"]=0;Map24.OBJECT_TYPE["Rest Area"]=1;Map24.OBJECT_TYPE["Border Crossing"]=2;Map24.OBJECT_TYPE["Toll Booth"]=118;Map24.OBJECT_TYPE["Park"]=4;Map24.OBJECT_TYPE["Beach"]=5;Map24.OBJECT_TYPE["Zoo"]=6;Map24.OBJECT_TYPE["Camping"]=7;Map24.OBJECT_TYPE["Leisure"]=8;Map24.OBJECT_TYPE["Mobile Home Area"]=95;Map24.OBJECT_TYPE["Car Service"]=9;Map24.OBJECT_TYPE["Petrol Station"]=10;Map24.OBJECT_TYPE["Automobile Club"]=11;Map24.OBJECT_TYPE["Car Rental"]=12;Map24.OBJECT_TYPE["Car Rental Parking"]=106;Map24.OBJECT_TYPE["Car Dealer"]=13;Map24.OBJECT_TYPE["Parking Lot"]=15;Map24.OBJECT_TYPE["Parking Hous"]=16;Map24.OBJECT_TYPE["Park & Ride"]=17;Map24.OBJECT_TYPE["Hotels"]=18;Map24.OBJECT_TYPE["Restaurant"]=19;Map24.OBJECT_TYPE["Museum"]=20;Map24.OBJECT_TYPE["Cinema"]=21;Map24.OBJECT_TYPE["Performing"]=22;Map24.OBJECT_TYPE["Casino"]=23;Map24.OBJECT_TYPE["Nightlife"]=24;Map24.OBJECT_TYPE["Exhibition"]=25;Map24.OBJECT_TYPE["Music Concert"]=26;Map24.OBJECT_TYPE["Art"]=97;Map24.OBJECT_TYPE["Convention Center"]=103;Map24.OBJECT_TYPE["Natives Reservation"]=119;Map24.OBJECT_TYPE["Tourist Info"]=27;Map24.OBJECT_TYPE["Sightseeing"]=28;Map24.OBJECT_TYPE["Monument"]=29;Map24.OBJECT_TYPE["View"]=30;Map24.OBJECT_TYPE["Church"]=31;Map24.OBJECT_TYPE["Mountain"]=96;Map24.OBJECT_TYPE["Mosque"]=107;Map24.OBJECT_TYPE["Synagoge"]=108;Map24.OBJECT_TYPE["Sport Stadium"]=32;Map24.OBJECT_TYPE["Sport Centre"]=33;Map24.OBJECT_TYPE["Bowling Centre"]=34;Map24.OBJECT_TYPE["Swimming Pool"]=35;Map24.OBJECT_TYPE["Ice Skating"]=36;Map24.OBJECT_TYPE["Ski Resort"]=37;Map24.OBJECT_TYPE["Tennis"]=38;Map24.OBJECT_TYPE["Watersport"]=39;Map24.OBJECT_TYPE["Golf"]=40;Map24.OBJECT_TYPE["Racetrack"]=94;Map24.OBJECT_TYPE["Hospital"]=41;Map24.OBJECT_TYPE["Doctor"]=42;Map24.OBJECT_TYPE["Dentist"]=43;Map24.OBJECT_TYPE["Veterinarian"]=44;Map24.OBJECT_TYPE["Pharmacy"]=45;Map24.OBJECT_TYPE["Nursing Home"]=104;Map24.OBJECT_TYPE["Embassy"]=46;Map24.OBJECT_TYPE["City Hall"]=47;Map24.OBJECT_TYPE["Government Building"]=48;Map24.OBJECT_TYPE["School"]=49;Map24.OBJECT_TYPE["University"]=50;Map24.OBJECT_TYPE["Court house"]=51;Map24.OBJECT_TYPE["Library"]=52;Map24.OBJECT_TYPE["Police"]=53;Map24.OBJECT_TYPE["Post"]=54;Map24.OBJECT_TYPE["Fire Station"]=98;Map24.OBJECT_TYPE["Prision"]=99;Map24.OBJECT_TYPE["Cemetery"]=100;Map24.OBJECT_TYPE["Military Intallation"]=120;Map24.OBJECT_TYPE["Winery"]=55;Map24.OBJECT_TYPE["Shopping Centre"]=56;Map24.OBJECT_TYPE["Shop"]=57;Map24.OBJECT_TYPE["Bank"]=58;Map24.OBJECT_TYPE["ATM"]=59;Map24.OBJECT_TYPE["Company"]=60;Map24.OBJECT_TYPE["Land Use"]=105;Map24.OBJECT_TYPE["Airport"]=61;Map24.OBJECT_TYPE["Ferry"]=62;Map24.OBJECT_TYPE["Harbour"]=63;Map24.OBJECT_TYPE["Railway"]=64;Map24.OBJECT_TYPE["Car Loading Facility"]=110;Map24.OBJECT_TYPE["Airport Arrival"]=65;Map24.OBJECT_TYPE["Airport Depature"]=66;Map24.OBJECT_TYPE["Sport Airport"]=67;Map24.OBJECT_TYPE["Marina"]=68;Map24.OBJECT_TYPE["Subway"]=69;Map24.OBJECT_TYPE["Commuter rail"]=70;Map24.OBJECT_TYPE["Bus Station"]=71;Map24.OBJECT_TYPE["Military Airport"]=93;Map24.OBJECT_TYPE["Taxi"]=121;Map24.OBJECT_TYPE["Light Rail"]=122;Map24.OBJECT_TYPE["Heliport"]=123;Map24.LAYER=new Hashtable();Map24.LAYER["Automobile/Traffic"]="map24(3001:1,2,118)";Map24.LAYER["Recreation"]="map24(3002:4,5,6,7,8,95)";Map24.LAYER["Car Service"]="map24(3003:9,10,11,12,13,106)";Map24.LAYER["Parking"]="map24(3004:15,16,17)";Map24.LAYER["Hotels"]="map24(3005:18)";Map24.LAYER["Restaurant"]="map24(3006:19)";Map24.LAYER["Culture"]="map24(3007:20,21,22,23,24,25,26,97,103,119)";Map24.LAYER["Sights"]="map24(3008:27,28,29,30,31,96,107,108)";Map24.LAYER["Sport"]="map24(3009:32,33,34,35,36,37,38,39,40,94)";Map24.LAYER["Healthcare"]="map24(3010:41,42,43,44,45,104)";Map24.LAYER["Public Buildings"]="map24(3011:46,47,48,49,50,51,52,53,54,98,99,100,120)";Map24.LAYER["Commercial"]="map24(3012:55,56,57,58,59,60,105)";Map24.LAYER["Transport"]="map24(3013:61,62,63,64,110)";Map24.LAYER["Transport 2"]="map24(3014:65,66,67,68,69,70,71,93,121,122,123)";Map24.getObjectTypeNameById=function(object_type){
if(typeof object_type=="string")object_type=parseInt(object_type);if(typeof object_type!="number")throw new Map24.Exceptions.Exception("Invalid object type given (no number)!",0,object_type,"map24sdk","getObjectTypeNameById");for(var key in Map24.OBJECT_TYPE){
if(Map24.OBJECT_TYPE[key]==object_type)return key;}
throw new Map24.Exceptions.Exception("No object type with the given id exists!",0,object_type,"map24sdk","getObjectTypeNameById");}
Map24._parseLayerIds=function(ids,service){
if(typeof ids=="undefined"||ids==null)return{customer_ids:"",map24_ids:""};if(typeof ids=="object"&&ids.length>0)ids=ids.join("|");if(typeof ids!="string")throw new Map24.Exceptions.Exception("The given ids are no string!",0,ids,"map24sdk","_parseLayerIds");var id=ids.split('|');var map24_ids="";var customer_ids="";for(var i=0;i<id.length;i++){
if(id[i].substr(0,5)=="map24")
{
try{
var a=id[i].substr(6,id[i].length-7);var b=a.split(':');if(service=="WEBSERVICES"){
map24_ids +="|"+b[0];}else{
map24_ids +="|"+b[1].replace(/,/g,"|");}
}catch(e){}
}else{
customer_ids +="|"+id[i];}
}
if(map24_ids.length>0)map24_ids=map24_ids.substr(1);if(customer_ids.length>0)customer_ids=customer_ids.substr(1);return{customer_ids:customer_ids,map24_ids:map24_ids};}
Map24.getCurrentLayerDefinition=function(){
var result=new Hashtable();for(var layername in Map24.LAYER)
{
try{
var layerids=Map24._parseLayerIds(Map24.LAYER[layername],"PROXIMITYSEARCH")["map24_ids"].split("|");var object_types=new Array();for(var i=0;i<layerids.length;i++)object_types.push(Map24.getObjectTypeNameById(layerids[i]));result[layername]=object_types;}catch(e){
Map24.dump(e);}
}
return result;}
Map24.toXml=function(prefix,value,classname){
if(typeof prefix!="string")prefix="";var result="";if((value instanceof Map24.Object)||(value instanceof Map24.Webservices.CoordinatesArray)||(value instanceof Map24.Webservices.CommandsArray)){
return value.toXml(prefix,classname);}else
if(value instanceof Array){
if(typeof classname!="string"||classname.length<=0)
classname=null;if(classname!=null)result=prefix+"<"+classname+">\n";for(var i=0;i<value.length;i++){
switch(typeof value[i]){
case "function":case "undefined":break;case "null":result +=prefix+"<item>null</item>\n";break;case "number":result +=prefix+"<item>"+value[i]+"</item>\n";break;case "boolean":result +=prefix+"<item>"+(value[i]?'true':'false')+"</item>\n";break;case "string":result +=prefix+"<item><![CDATA["+value[i]+"]]></item>\n";break;case "object":if(value[i] instanceof Map24.Object)
result +=value[i].toXml(prefix+(classname==null?"":"\t"));else
result +=Map24.toXml(prefix+(classname==null?"":"\t"),value[i]);break;default:}
}
if(classname!=null)result +=prefix+"</"+classname+">\n";return result;}else
if(value instanceof Object){
if(typeof classname!="string"||classname.length<=0)
classname='item';result=prefix+"<"+classname+">\n";for(key in value){
result +=Map24.toXml(prefix+"\t",value[key],key);}
return result+prefix+"</"+classname+">\n";}
if(typeof classname!="string"||classname.length<=0)
classname=(typeof value);switch(typeof value){
case "function":case "undefined":break;case "null":result=prefix+"<"+classname+">null</"+classname+">\n";break;case "number":result=prefix+"<"+classname+">"+value+"</"+classname+">\n";break;case "boolean":result=prefix+"<"+classname+">"+(value?'true':'false')+"</"+classname+">\n";break;case "string":result=prefix+"<"+classname+"><![CDATA["+value+"]]></"+classname+">\n";break;default:break;}
return result;}
Map24.YahooLib=function(){};Map24.YahooLib.Doc=document;Map24.YahooLib.Win=window;Map24.escapeRegExpPattern=function(pattern,delimiter){
if((typeof delimiter!="string")||(delimiter.length!=1))
delimiter='/';pattern=pattern.replace(/\\/g,"\\\\");pattern=pattern.replace(/\*/g,"\\*");pattern=pattern.replace(/\./g,"\\.");pattern=pattern.replace(/\[/g,"\\[");pattern=pattern.replace(/\]/g,"\\]");pattern=pattern.replace(/\(/g,"\\(");pattern=pattern.replace(/\)/g,"\\)");pattern=pattern.replace(/\{/g,"\\{");pattern=pattern.replace(/\}/g,"\\}");pattern=pattern.replace(/\+/g,"\\+");pattern=pattern.replace(new RegExp("\\"+delimiter,"g"),"\\"+delimiter);return pattern;}
Map24.dispatchEvent=function(instance_id,ev,event_id,form_id){
try{
var map=Map24.Map.getInstanceById(instance_id);var e=new Map24.Browser.Event(ev);if(Map24.arrayKeyExists(event_id,map.Session.MapObjects))
{
var obj=map.Session.MapObjects[event_id];if(obj.Properties["Events"] instanceof Array)
{
for(var i=0;i<obj.Properties.Events.length;i++)
{
var event=obj.Properties.Events[i];if(event instanceof Map24.Webservices.MapObjectEvent)
{
if(event.ID.toLowerCase()==e.Type)
{
if(event.Commands instanceof Array)
{
var mrc=new Map24.Webservices.Request.MapletRemoteControl();mrc.Commands=event.Commands;map.Webservices.sendRequest(mrc);}
}
}
}
}
}
}catch(e){
}
}
Map24.SLEEP_SCRIPT=null;Map24.CLASSLOADER_URL=null;Map24.XSLT_BASE_URL="xslt/ajax/1.2.6/";Map24.init=function(info)
{
if(Map24._Initialized==true)return;Map24._Initialized=true;var debug=false;var api_url=null;var service_url=null;if(typeof info.Debug=="boolean"&&info.Debug==true)debug=true;if(typeof info.ClassLoaderUrl=="string"&&info.ClassLoaderUrl.length>0)
api_url=info.ClassLoaderUrl
if(typeof api_url!="string"){
api_url=Map24.findScriptByName("/ajax/1");}
if(typeof api_url!="string"||api_url.length<=0)throw new Map24.Exceptions.Exception("Invalid class loader URL given!",0,info,"Map24","init");var tmp=api_url.split("?",2);api_url=Map24.dirname(tmp[0]);if(tmp.length>1){
var args=tmp[1].split("&");var arg=null;for(var i=0;i<args.length;i++){
arg=args[i].split("=",2);if(arg.length==1){
Map24.Arguments[arg[0]]=null;}else
if(arg.length==2){
Map24.Arguments[arg[0]]=arg[1];}
arg=null;}
}
if(debug)Map24.enableDebug();Map24.CLASSLOADER_URL=api_url;try{
Map24.Network.ConnectJSPXML.DefaultIFrameUrl=Map24.CLASSLOADER_URL+"proxyit.php5?wait_idl=5";}catch(e){}
for(key in Map24._ClassesShared){
if(!Map24._ClassesShared[key])Map24._include(Map24._ClassesSharedURL[key]);}
for(key in Map24._ScriptsShared){
if(!Map24._ScriptsShared[key])Map24._include(Map24._ScriptsSharedURL[key]);}
if(Map24.DEBUG){
Map24._DebugConsole.OldOldKeyDownHandler=document.onkeydown;document.onkeydown=function(event){
if(typeof Map24._DebugConsole.OldOldKeyDownHandler=="function"){
Map24._DebugConsole.OldOldKeyDownHandler(event);}
if(Map24.isNull(event))event=window.event;if(event.altKey&&event.shiftKey){
if(parseInt(event.which)==67||parseInt(event.keyCode)==67){
if(Map24.isDebugConsoleOpen())
Map24.closeDebugConsole();else
Map24.openDebugConsole();}else
if(parseInt(event.which)==86||parseInt(event.keyCode)==86){
Map24.clearDebugConsoleHistory();if(Map24.isDebugConsoleOpen())
Map24.closeDebugConsole();Map24.openDebugConsole();}
}
}
}
}
Map24.Object=function(){
this.__constructor=function(){
this.Interfaces=new Hashtable();this.Interfaces["Object"]=null;this.Interfaces["Map24.Object"]=null;this.Interfaces["IUnknown"]=null;this.Interfaces["Map24.Interfaces.IUnknown"]=null;this.Interfaces["IListener"]=null;this.Interfaces["Map24.Interfaces.IListener"]=null;this.Class="Object";this.Package="";this.Listener=new Array();this.Parent=null;this.IgnoreForSerialization={
IgnoreForSerialization:1,Class:1,Package:1,Listener:1,Parent:1,Interfaces:1
};this.addListener(new Callable(this,this.dispatch));}
this.clone=function(deep){
if(typeof deep!="boolean")deep=true;var objectClone=new this.constructor();for(var property in this)
{
if(!deep){
objectClone[property]=this[property];}else
if(this[property] instanceof Object){
if(typeof this[property]=="object")
objectClone[property]=this[property].clone(deep);else
objectClone[property]=this[property];}else
objectClone[property]=this[property];}
return objectClone;}
this.instanceOf=function(interfacename){
if(typeof interfacename!="string")return false;return(typeof this.Interfaces[interfacename]!="undefined");}
this.getClass=function(){
return this.Class;}
this.has=function(property){
if(typeof property!="string")return false;return(typeof this[property]!="undefined");}
this.isEmpty=function(property){
return Map24.empty(this.get(property));}
this.get=function(property){
if(typeof property!="string")return undefined;return this[property];}
this.set=function(property,value){
if(typeof property=="string")this[property]=value;}
this.toString=function(){
return this.Class;}
this.dispatch=function(event){
if(!Map24.isObject(event)||(typeof event.Class!="string"))return true;var fname="on"+event.Class;var result=true;if(typeof this[fname]=="function")eval("result = this."+fname+"(event);");return result;}
this.toXml=function(prefix,classname){
if(typeof prefix!="string")prefix="";var result="";if(typeof classname!="string"||classname.length<=0)
classname=this.Class;result +=prefix+"<"+classname+">\n";for(var key in this){
if(this.IgnoreForSerialization[key]==1)continue;if(key.charAt(0)=='_')continue;switch(typeof this[key]){
case "function":case "undefined":break;case "null":result +=prefix+"\t<"+key+">null</"+key+">\n";break;case "number":result +=prefix+"\t<"+key+">"+this[key]+"</"+key+">\n";break;case "boolean":result +=prefix+"\t<"+key+">"+(this[key]?'true':'false')+"</"+key+">\n";break;case "string":result +=prefix+"\t<"+key+"><![CDATA["+this[key]+"]]></"+key+">\n";break;case "object":if((this[key] instanceof Map24.Object)||(this[key] instanceof Map24.Array))
result +=this[key].toXml(prefix+"\t",key);else
if(this[key] instanceof Array){
if(this[key].length<=0)break;result +=prefix+"\t<"+key+">\n";result +=Map24.toXml(prefix+"\t\t",this[key]);result +=prefix+"\t</"+key+">\n";}else
result +=Map24.toXml(prefix+"\t",this[key],key);break;default:break;}
}
return result + prefix + "</"+classname+">\n";}
this.addListener=function(listener){
if(!(listener instanceof Callable))throw new Map24.Exceptions.InvalidArgument("Invalid listener given!",listener,"Map24.Object","addListener");this.Listener.push(listener);}
this.removeListener=function(listener){
if(!(listener instanceof Callable))throw new Map24.Exceptions.InvalidArgument("Invalid listener given!",listener,"Map24.Object","removeListener");for(var i=0;i<this.Listener.length;i++){
if(this.Listener[i]==listener){
this.Listener.splice(i,1);}
}
}
this.removeAllListener=function(){
this.Listener=new Array();}
this.trigger=function(event,blocking,ttl){
if(!Map24.isNumeric(ttl))ttl=7;else ttl=parseInt(ttl);if(ttl<0)return;if(!(event instanceof Map24.Events.Event))throw new Map24.Exceptions.InvalidArgument("The given event is no Map24.Events.Event object!",event,"Map24.Object","trigger");if(typeof blocking!="boolean")blocking=true;if(!blocking){
Map24.fork(new Callable(this,this.trigger),event,true);return;}
var isFinished=new Array();var result=null;if(!event._IsDelivered){
event.beforeDelivery();event._IsDelivered=true;}
for(var i=this.Listener.length-1;i>=0;i--){
try{
event.TopDown=true;result=this.Listener[i].invokeEx({event:event});}catch(e){
Map24.dump(e);}
if(typeof result!="boolean")result=true;isFinished.unshift(result);if(event.Cancel)break;}
if(!event.Cancel){
for(var i=0;i<this.Listener.length;i++){
try{
if(!isFinished[i]){
event.TopDown=false;this.Listener[i].invokeEx({event:event});}
}catch(e){
Map24.dump(e);}
if(event.Canel)break;}
}
event.Cancel=false;if(!event.CancelPropagation&&Map24.isObject(this.Parent,"IListener")&&ttl>=1)
{
this.Parent.trigger(event,true,ttl-1);}
}
this.setParent=function(parent){
if(!(parent instanceof Object))throw new Map24.Exceptions.InvalidArgument("The given parent is no object!",parent,"Map24.Object","setParent");var prevParent=this.Parent;this.Parent=parent;return prevParent;}
this.getParent=function(){
return this.Parent;}
this.queryInterface=function(name){
if(typeof name!="string")throw new Map24.Exceptions.InvalidArgument("The given interface name is no string!",name,"Map24.Object","queryInterface");if(typeof this.Interfaces[name]=="undefined")throw new Map24.Exceptions.InterfaceNotSupported("The requested interface '"+name+"' is not supported!",name,"Map24.Object","queryInterface");if(this.Interfaces[name]==null)return this;if(this.Interfaces[name] instanceof Callable)return this.Interfaces[name].invokeEx({parent:this});if(this.Interfaces[name] instanceof Object)return this.Interfaces[name];throw new Map24.Exceptions.InterfaceNotSupported("The requested interface '"+name+"' is not supported!",name,"Map24.Object","queryInterface");}
this.__constructor();}
Map24.Array=function(){
this.__constructor=function(){
Map24.Array.prototype.__constructor.call(this);this.Class="Array";this.Package="Map24";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.length=0;for(var i=0;i<arguments.length;i++){
this[this.length++]=arguments[i];}
}
this.push=function(){
for(var i=0;i<arguments.length;i++){
this[this.length++]=arguments[i];}
}
this.pop=function(){
if(this.length<=0)return null;var tmp=this[this.length-1];this.length--;delete this[this.length];return tmp;}
this.toXml=function(prefix,classname){
if(typeof prefix!="string")prefix="";if(typeof classname!="string"||classname.length<=0)
classname=this.Class;var result="";result +=prefix+"<"+classname+">\n";for(var i=0;i<this.length;i++){
result +=prefix+"\t<item>\n";result +=Map24.toXml(prefix+"\t\t",this[i]);result +=prefix+"\t</item>\n";}
return result + prefix + "</"+classname+">\n";}
this.length=0;for(var i=0;i<arguments.length;i++){
this[this.length++]=arguments[i];}
}
Map24.Array.prototype=new Map24.Object;Map24.notifyClassReady("Map24.Array");Map24.Map=function(settings){
this.__constructor=function(settings){
Map24.Map.prototype.__constructor.call(this);this.Class="Map";this.Package="Map24";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.InstanceId=Map24.makeUniqueId();var i=0;while(Map24.arrayKeyExists(this.InstanceId,Map24.Map._Instances)){
this.InstanceId=Map24.makeUniqueId();if(i++>=1000)throw new Map24.Exceptions.Exception("Creating of a unique ID seems to be failed!",0,null,"Map24.Map","__constructor");}
Map24.Map._Instances[this.InstanceId]=this;this.Skin=null;if((typeof settings.Skin!="undefined")&&settings.Skin!=null){
if(!Map24.isObject(settings.Skin,"ISkin"))throw new Map24.Exceptions.InvalidArgument("The parameter 'Skin' doesn't implement the interface ISkin!",settings,"Map24.Map","__constructor");this.Skin=settings.Skin;}
if(this.Skin==null)this.Skin=new Map24.Skins.Map24Portal();this.MapWin=null;this.MapDoc=null;this.MapArea=null;this.MapWidth=0;this.MapHeight=0;try{
this.MapWidth=parseInt(settings.MapWidth)
this.MapHeight=parseInt(settings.MapHeight);}catch(e){}
if((typeof this.MapWidth!="number")||(this.MapWidth<=0))throw new Map24.Exceptions.InvalidArgument("The parameter 'MapWidth' is invalid!",settings,"Map24.Map","__constructor");if((typeof this.MapHeight!="number")||(this.MapHeight<=0))throw new Map24.Exceptions.InvalidArgument("The parameter 'MapHeight' is invalid!",settings,"Map24.Map","__constructor");if(!(settings.AppletParameter instanceof Object))
settings.AppletParameter={};settings.AppletParameter["hiddenwidth"]=this.MapWidth;settings.AppletParameter["hiddenheight"]=this.MapHeight;for(var key in settings.AppletParameter){
if(settings.AppletParameter[key]==null){
try{
delete this.Skin._HiddenAppletParameter[key];}catch(e){}
}else
if((typeof settings.AppletParameter[key]=="string")||(typeof settings.AppletParameter[key]=="number"))
this.Skin._HiddenAppletParameter[key]=settings.AppletParameter[key];}
this.HiddenWin=window;if(Map24.isObject(settings.HiddenWin))this.HiddenWin=settings.HiddenWin;this.HiddenDoc=this.HiddenWin.document;this.HiddenArea=null;if(typeof settings.HiddenArea=="string"){
this.HiddenArea=this.HiddenDoc.getElementById(settings.HiddenArea);}else
if(Map24.isObject(settings.HiddenArea))
this.HiddenArea=settings.HiddenArea;if(this.HiddenArea==null){
this.HiddenArea=this.HiddenDoc.createElement("DIV");this.HiddenArea.style.position="absolute";this.HiddenArea.style.left="0px";this.HiddenArea.style.top="0px";this.HiddenArea.style.width="0px";this.HiddenArea.style.height="0px";this.HiddenArea.style.border="0px none";var bodyNode=this.HiddenDoc.getElementsByTagName("BODY")[0];bodyNode.appendChild(this.HiddenArea);}
this.Maptype="JAVA";if((typeof settings.Maptype=="string")){
if(settings.Maptype=="AUTO")settings.Maptype="JAVA";if(settings.Maptype!="JAVA"&&settings.Maptype!="MGI"&&settings.Maptype!="NONE")throw new Map24.Exceptions.InvalidArgument("The parameter 'Maptype' is invalid, not 'AUTO', 'JAVA', 'MGI' or 'NONE'!",settings,"Map24.Map","__constructor");this.Maptype=settings.Maptype;}else
if(!Map24.isNull(settings.Maptype))throw new Map24.Exceptions.InvalidArgument("The given parameter 'Maptype' is invalid, no string!",settings,"Map24.Map","__constructor");this.CurrentMaptype="NONE";this.addListener(new Callable(this,this._defaultEventHandler));this.Session=null;this.Webservices=new Map24.Webservices.Webservices(this);if(settings.MRC instanceof Map24.Webservices.Request.MapletRemoteControl)
this.Webservices.sendRequest(settings.MRC);this.Visible=false;if(typeof settings.MapWin!="undefined"||typeof settings.MapArea!="undefined")
{
if(typeof settings.MapWin=="undefined")settings.MapWin=null;this.setMapArea(settings.MapArea,settings.MapWin);this.Visible=true;}
}
this._defaultEventHandler=function(event){
if((event instanceof Map24.Events.SessionError)){
Map24.dump("Session error, Message: "+event.Message);}else
if((event instanceof Map24.Webservices.Response.GetMap24Application)){
if(Map24.Browser.IE&&Map24.Browser.MajorVersion==5&&this.Session!=null){
}else{
Map24.dump("Session ready!");Map24.dump(event.Session);this.Session=event.Session;this.Session.setParent(this);this.Skin.initialize(this);if(this.Visible){
this.Visible=false;this.show();}
this.Webservices.trigger(new Map24.Events.SessionReady(this));}
}else
if((event instanceof Map24.Webservices.Response.GetMapletSession))
{
try{
if(event.Request.IdxInMap24MRCs<this.Session.MrcHistory.length){
i=this.Session.MrcHistory.length - event.Request.IdxInMap24MRCs;}else
if(event.Request.IdxInMap24MRCs>this.Session.MrcHistory.length){
throw new Exception();}
for(;i<event.Commands.length;i++){
this.Session.MrcHistory.push(event.Commands[i]);}
this.Session.checkMrcHistoryChange();}catch(e){}
}
return true;}
this.setMaptype=function(maptype){
if(typeof maptype!="string"||(maptype!="JAVA"&&maptype!="MGI"))
throw new Map24.Exceptions.InvalidArgument("The given argument 'maptype' is not valid, not JAVA or MGI!",maptype,"Map24.Map","maptype");if(this.Maptype==maptype)return;this.Maptype=maptype;if(this.Visible)this.Skin.paint();}
this.setMapArea=function(map_area,map_win){
Map24.dump("setMapArea called");if(Map24.isObject(map_win)){
if(!Map24.isDocument(map_win.document))throw new Map24.Exceptions.InvalidArgument("The parameter 'map_win' is no valid window!",map_win,"Map24.Map","setMapArea");this.MapWin=map_win;}else
this.MapWin=window;this.MapDoc=this.MapWin.document;Map24.YahooLib.Doc=this.MapDoc;Map24.YahooLib.Win=this.MapWin;if(map_area=="string")
this.MapArea=this.MapDoc.getElementById(map_area);else
if(Map24.isObject(map_area))
this.MapArea=map_area;this.MapArea.style.position="relative";this.MapArea.style.width=this.MapWidth+"px";this.MapArea.style.height=this.MapHeight+"px";this.MapArea.innerHTML="";}
this.resizeTo=function(width,height){
this.MapWidth=width;this.MapHeight=height;if(this.Visible){
this.hide();this.MapArea.style.width=width+"px";this.MapArea.style.height=height+"px";this.show();}
}
this.show=function(){
if(!this.Visible){
this.Visible=true;this.Skin.show();}
}
this.hide=function(){
if(this.Visible){
this.Visible=false;this.Skin.hide();}
}
this.__constructor(settings);}
Map24.Map.prototype=new Map24.Object;Map24.Map._Instances={};Map24.Map.getInstanceById=function(instance_id){
if(typeof instance_id!="string")throw new Map24.Exceptions.InvalidArgument("The given parameter 'instance_id' is no string!",instance_id,"Map24.Map","getByInstanceId");if(!Map24.arrayKeyExists(instance_id,Map24.Map._Instances))throw new Map24.Exceptions.InvalidArgument("The given parameter 'instance_id' is invalid!",instance_id,"Map24.Map","getByInstanceId");return Map24.Map._Instances[instance_id];}
Map24.Session=function(app_key,session_id,config){
this.__constructor=function(app_key,session_id,config){
Map24.Session.prototype.__constructor.call(this);this.Class="Session";this.Package="Map24";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;if(!Map24.Session.isApplicationKey(app_key))throw new Map24.Exceptions.InvalidArgument("The given application key is invalid!",app_key,"Map24.Session","__constructor");if((typeof session_id!="string")||(session_id.length<=0))throw new Map24.Exceptions.InvalidArgument("Invalid session ID given!",session_id,"Map24.Session","__constructor");if(!(config instanceof Object))throw new Map24.Exceptions.InvalidArgument("Invalid config object given!",session_id,"Map24.Session","__constructor");this.ApplicationKey=app_key;this.SessionId=session_id;this.Config=config;this.MrcHistory=new Array();this.NextMrcIndex=0;this.MapObjects=new Hashtable();this.Groups=new Hashtable();}
this.serialize=function(){
}
this.restore=function(data){
}
this.rebuildSession=function(){
this.MapObjects=new Hashtable();this.Groups=new Hashtable();this.checkMrcHistoryChange();}
this.checkMrcHistoryChange=function(){
var cmd=null;var obj=null;var mobid=null;for(;this.NextMrcIndex<this.MrcHistory.length;this.NextMrcIndex++)
{
cmd=this.MrcHistory[this.NextMrcIndex];if(cmd instanceof Map24.Webservices.MRC.DeclareMap24Location){
mobid=cmd.MapObjectID;obj=new Map24.MapObjects.Location({
ObjectId:cmd.MapObjectID,Address:cmd.Address,Coordinate:cmd.Coordinate,Properties:{
LogoURL:cmd.LogoURL,Description:cmd.Description,URL:cmd.URL,TargetFrame:cmd.TargetFrame,CanvasReferencePoint:cmd.CanvasReferencePoint,LogoURLOnMouseOver:cmd.LogoURLOnMouseOver,SymbolIDOnMouseOver:cmd.SymbolIDOnMouseOver,Events:cmd.Events
}
});this.MapObjects[mobid]=obj;}else
if(cmd instanceof Map24.Webservices.MRC.DeclareMap24HTMLObject){
mobid=cmd.MapObjectID;obj=new Map24.MapObjects.HTMLObject({
ObjectId:cmd.MapObjectID,Coordinate:cmd.Coordinate,Properties:{
Orientation:cmd.Orientation,HTML:cmd.HTML
}
});this.MapObjects[mobid]=obj;}else
if(cmd instanceof Map24.Webservices.MRC.ControlMapObject){
var map_obj_ids=new Array();if((cmd.MapObjectIDs instanceof Array))
{
var value=null;for(var i=0;i<cmd.MapObjectIDs.length;i++)
{
value=cmd.MapObjectIDs[i];if(typeof value!="string")continue;var ids=value.split("|");if(!(ids instanceof Array))continue;for(var j=0;j<ids.length;j++){
if(typeof ids[j]!="string")continue;value=Map24.trim(ids[j]);if(value.length<=0)continue;map_obj_ids.push(value);}
}
if(cmd.Control=="ENABLE"){
for(var i=0;i<map_obj_ids.length;i++){
if(this.MapObjects[map_obj_ids[i]] instanceof Map24.MapObjects.MapObject){
this.MapObjects[map_obj_ids[i]].Visible=true;}
}
}else
if(cmd.Control=="DISABLE"){
for(var i=0;i<map_obj_ids.length;i++){
if(this.MapObjects[map_obj_ids[i]] instanceof Map24.MapObjects.MapObject){
this.MapObjects[map_obj_ids[i]].Visible=false;}
}
}else
if(cmd.Control=="SHOW"){
for(mobid in this.MapObjects){
this.MapObjects[mobid].Visible=false;}
for(var i=0;i<map_obj_ids.length;i++){
if(this.MapObjects[map_obj_ids[i]] instanceof Map24.MapObjects.MapObject){
this.MapObjects[map_obj_ids[i]].Visible=true;}
}
}else
if(cmd.Control=="HIDE"){
for(mobid in this.MapObjects){
this.MapObjects[mobid].Visible=true;}
for(var i=0;i<map_obj_ids.length;i++){
if(this.MapObjects[map_obj_ids[i]] instanceof Map24.MapObjects.MapObject){
this.MapObjects[map_obj_ids[i]].Visible=false;}
}
}
}
}
}
}
this.__constructor(app_key,session_id,config);}
Map24.Session.prototype=new Map24.Object;Map24.Session.isApplicationKey=Map24.isApplicationKey;Map24.notifyClassReady("Map24.Session");Map24.Size=function(width,height){
this.__constructor=function(width,height){
Map24.Size.prototype.__constructor.call(this);this.Class="Point";this.Package="Map24";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;if(typeof width=="string")width=parseFloat(width);if(!Map24.isNumeric(width))throw new Map24.Exceptions.InvalidArgument("The parameter 'width' in no valid number!",width,"Map24.Size","__constructor");if(typeof height=="string")height=parseFloat(height);if(!Map24.isNumeric(height))throw new Map24.Exceptions.InvalidArgument("The parameter 'height' in no valid number!",height,"Map24.Size","__constructor");this.Width=width;this.Height=height;}
this.__constructor(width,height);}
Map24.Size.prototype=new Map24.Object;Map24.notifyClassReady("Map24.Size");Map24.Address=function(default_args){
this.__constructor=function(default_args){
Map24.Address.prototype.__constructor.call(this,default_args);this.Class="Address";this.Package="Map24";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;if(typeof default_args.Street!="string")default_args.Street="";if(typeof default_args.Postcode!="string")default_args.Postcode="";if(typeof default_args.City!="string")default_args.City="";if(typeof default_args.Country!="string")default_args.Country="";if(typeof default_args.State!="string")default_args.State="";if(typeof default_args.County!="string")default_args.County="";if(typeof default_args.District!="string")default_args.District="";if(typeof default_args.Housenumber=="number")default_args.Housenumber=""+default_args.Housenumber;else
if(typeof default_args.Housenumber!="string")default_args.Housenumber="";if(typeof default_args.Streetnumber=="number")default_args.Streetnumber=""+default_args.Streetnumber;else
if(typeof default_args.Streetnumber!="string")default_args.Streetnumber="";this.Street=default_args.Street;this.StreetNumber=default_args.Streetnumber;this.Housenumber=default_args.Housenumber;this.Postcode=default_args.Postcode;this.City=default_args.City;this.District=default_args.District;this.Country=default_args.Country;this.State=default_args.State;this.County=default_args.County;}
this.isValid=function(){
if(Map24.empty(this.Country))return false;return!(Map24.empty(this.City)&&Map24.empty(this.Postcode));}
this.toString=function(){
var s="";if(this.Street.length>0)s+=this.Street+"\r\n";if(this.Postcode.length>0)s+=this.Postcode;if(this.City.length>0){
if(this.Postcode.length>0)
s+=" "+this.City;else
s+=this.City;}
if(this.Postcode.length>0||this.City.length>0)s+="\r\n";if(this.District.length>0)s+="("+this.District+")\r\n";if(this.Country.length>0)s+="["+this.Country+"]\r\n";if(this.State.length>0)s+="{"+this.State+"}\r\n";if(this.County.length>0)s+="-"+this.County+"-\r\n";return s;}
this.toXml=function(prefix,classname){
if(typeof prefix!="string")prefix="";if(typeof classname!="string"||classname.length<=0)
classname=this.Class;return Map24.toXml(prefix,{
ID:null,HouseNo:this.Housenumber,Street:this.Street,ZIP:this.Postcode,City:this.City,District:this.District,County:this.County,State:this.State,Country:this.Country
},classname);}
this.__constructor(default_args);}
Map24.Address.prototype=new Map24.Object;Map24.notifyClassReady("Map24.Address");Map24.Point=function(x,y){
this.__constructor=function(x,y){
Map24.Point.prototype.__constructor.call(this);this.Class="Point";this.Package="Map24";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;if(!Map24.isNull(x)){
if(typeof x=="string")x=parseFloat(x);if(typeof x!="number")throw new Map24.Exceptions.InvalidArgument("The given parameter 'x' is no number!",x,"Map24.Point","__constructor");}else
x=0;if(!Map24.isNull(y)){
if(typeof y=="string")y=parseFloat(y);if(typeof y!="number")throw new Map24.Exceptions.InvalidArgument("The given parameter 'y' is no number!",y,"Map24.Point","__constructor");}else
y=0;this.X=x;this.Y=y;}
this.__constructor(x,y);}
Map24.Point.prototype=new Map24.Object;Map24.notifyClassReady("Map24.Point");Map24.Coordinate=function(longitude,latitude){
this.__constructor=function(longitude,latitude){
if(Map24.isNull(latitude)&&(longitude instanceof Object)){
latitude=longitude.Latitude;longitude=longitude.Longitude;}
if(!Map24.isNull(longitude)){
if(typeof longitude=="undefined")longitude=0;if(typeof longitude=="string")longitude=parseFloat(longitude);if(!Map24.isNumeric(longitude))throw new Map24.Exceptions.InvalidArgument("The given parameter 'longitude' is invalid!",longitude,"Map24.Coordinate","__constructor");}else
longitude=0;if(!Map24.isNull(longitude)){
if(typeof latitude=="undefined")latitude=0;if(typeof latitude=="string")latitude=parseFloat(latitude);if(!Map24.isNumeric(latitude))throw new Map24.Exceptions.InvalidArgument("The given parameter 'latitude' is invalid!",latitude,"Map24.Coordinate","__constructor");}else
latitude=0;Map24.Coordinate.prototype.__constructor.call(this,latitude,longitude);this.IgnoreForSerialization.X=1;this.IgnoreForSerialization.Y=1;this.Class="Coordinate";this.Package="Map24";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Longitude=longitude;this.Latitude=latitude;}
this.__constructor(longitude,latitude);this.toString=function(){
return "longitude= "+this.Longitude+" | latitude= "+this.Latitude+"\r\n";}
}
Map24.Coordinate.prototype=new Map24.Point;Map24.Coordinate.isValidCoordinate=function(longitude,latitude){
if(typeof longitude=="string")longitude=parseFloat(longitude);if(typeof longitude!="number")return false;if(typeof latitude=="string")latitude=parseFloat(latitude);if(typeof latitude!="number")return false;return true;}
Map24.Coordinate.LONGITUDE_MAX=180*60;Map24.Coordinate.LONGITUDE_MIN=180*60*-1;Map24.Coordinate.LATITUDE_MAX=90*60;Map24.Coordinate.LATITUDE_MIN=90*60*-1;Map24.notifyClassReady("Map24.Coordinate");Map24.Color=function(red,green,blue,alpha){
this.__constructor=function(red,green,blue,alpha){
var default_args=null;if(Map24.isNull(green)&&Map24.isNull(blue)&&Map24.isNull(alpha))
default_args=red;else
default_args={red:red,green:green,blue:blue,alpha:alpha};Map24.Color.prototype.__constructor.call(this,default_args);this.Class="Color";this.Package="Map24";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;if(typeof default_args.R!="undefined")
default_args.Red=default_args.R;if(typeof default_args.r!="undefined")
default_args.Red=default_args.r;if(typeof default_args.red!="undefined")
default_args.Red=default_args.red;if(typeof default_args.Red=="string")
default_args.Red=parseInt(default_args.Red);if(!Map24.isNumeric(default_args.Red)||(default_args.Red<0)||(default_args.Red>255))throw new Map24.Exceptions.InvalidArgument("The color 'Red' is invalid (not numeric, less then zero or greater 255!",default_args.Red,"Map24.Color","__constructor");if(typeof default_args.G!="undefined")
default_args.Green=default_args.G;if(typeof default_args.g!="undefined")
default_args.Green=default_args.g;if(typeof default_args.green!="undefined")
default_args.Green=default_args.green;if(typeof default_args.Green=="string")
default_args.Green=parseInt(default_args.Green);if(!Map24.isNumeric(default_args.Green)||(default_args.Green<0)||(default_args.Green>255))throw new Map24.Exceptions.InvalidArgument("The color 'Green' is invalid (not numeric, less then zero or greater 255!",default_args.Green,"Map24.Color","__constructor");if(typeof default_args.B!="undefined")
default_args.Blue=default_args.B;if(typeof default_args.b!="undefined")
default_args.Blue=default_args.b;if(typeof default_args.blue!="undefined")
default_args.Blue=default_args.blue;if(typeof default_args.Blue=="string")
default_args.Blue=parseInt(default_args.Blue);if(!Map24.isNumeric(default_args.Blue)||(default_args.Blue<0)||(default_args.Blue>255))throw new Map24.Exceptions.InvalidArgument("The color 'Blue' is invalid (not numeric, less then zero or greater 255!",default_args.Blue,"Map24.Color","__constructor");if(typeof default_args.A!="undefined")
default_args.Alpha=default_args.A;if(typeof default_args.a!="undefined")
default_args.Alpha=default_args.a;if(typeof default_args.alpha!="undefined")
default_args.Alpha=default_args.alpha;if(typeof default_args.Alpha=="string")
default_args.Alpha=parseInt(default_args.Alpha);if(!Map24.isNumeric(default_args.Alpha)||(default_args.Alpha<0)||(default_args.Alpha>255))throw new Map24.Exceptions.InvalidArgument("The color 'Alpha' is invalid (not numeric, less then zero or greater 255!",default_args.Alpha,"Map24.Color","__constructor");this.red=default_args.Red;this.green=default_args.Green;this.blue=default_args.Blue;this.alpha=default_args.Alpha;}
this.toHex=function(add_alpha){
if(typeof add_alpha!="boolean")add_alpha=true;var r=Map24.dec2hex(this.red);if(r.length<=1)r="0"+r;var g=Map24.dec2hex(this.green);if(g.length<=1)g="0"+g;var b=Map24.dec2hex(this.blue);if(b.length<=1)b="0"+b;var a="";if(add_alpha){
a=Map24.dec2hex(this.alpha);if(a.length<=1)a="0"+a;}
return ""+r+g+b+a;}
this.toString=function(){
var s="Color{"+
"\nRed: "+this.red+
"\nGreen: "+this.green+
"\nBlue: "+this.blue+
"\nAlpha: "+this.alpha+
"}";return s;}
this.__constructor(red,green,blue,alpha);}
Map24.Color.prototype=new Map24.Object;Map24.notifyClassReady("Map24.Color");Map24.Browser=function(default_args){
}
Map24.Browser.Name=null;Map24.Browser.IE=false;Map24.Browser.OPERA=false;Map24.Browser.SAFARI=false;Map24.Browser.MOZILLA=false;Map24.Browser.KONQUEROR=false;Map24.Browser.FIREFOX=false;Map24.Browser.MajorVersion=0;Map24.Browser.MinorVersion=0;Map24.Browser.Revision=0;Map24.Browser.initialize=function(){
try{
if(navigator.userAgent.match(new RegExp("Opera"))){
Map24.Browser.OPERA=true;Map24.Browser.Name="Opera";var rexp=new RegExp("Opera[ /]+([0-9])\\.([0-9]{1,2})");var res=rexp.exec(navigator.userAgent);Map24.Browser.MajorVersion=parseInt(res[1]);Map24.Browser.MinorVersion=parseInt(res[2]);Map24.Browser.Revision=0;}else
if(navigator.userAgent.match(new RegExp("MSIE"))){
Map24.Browser.IE=true;Map24.Browser.Name="Microsoft Internet Explorer";var rexp=new RegExp("MSIE ([0-9])\\.([0-9])([0-9]{0,1})");var res=rexp.exec(navigator.userAgent);Map24.Browser.MajorVersion=parseInt(res[1]);Map24.Browser.MinorVersion=parseInt(res[2]);try{
Map24.Browser.Revision=parseInt(res[3]);}catch(e){}
if(!Map24.isNumeric(Map24.Browser.Revision))
Map24.Browser.Revision=0;}else
if(navigator.userAgent.match(new RegExp("Safari"))){
Map24.Browser.SAFARI=true;Map24.Browser.Name="Safari";}else
if(navigator.userAgent.match(new RegExp("Firefox"))){
Map24.Browser.FIREFOX=true;Map24.Browser.Name="Firefox";var rexp=new RegExp("Firefox\\/([0-9])\\.([0-9])\\.?([0-9]{0,1})");var res=rexp.exec(navigator.userAgent);Map24.Browser.MajorVersion=parseInt(res[1]);Map24.Browser.MinorVersion=parseInt(res[2]);try{
Map24.Browser.Revision=parseInt(res[3]);}catch(e){}
if(!Map24.isNumeric(Map24.Browser.Revision))
Map24.Browser.Revision=0;}else
if(navigator.userAgent.match(new RegExp("Konqueror\\/"))){
Map24.Browser.KONQUEROR=true;Map24.Browser.Name="Konqueror";var rexp=new RegExp("Konqueror\\/([0-9])\\.([0-9])\\.{0,1}([0-9]{0,1})");var res=rexp.exec(navigator.userAgent);Map24.Browser.MajorVersion=parseInt(res[1]);Map24.Browser.MinorVersion=parseInt(res[2]);try{
Map24.Browser.Revision=parseInt(res[3]);}catch(e){}
if(!Map24.isNumeric(Map24.Browser.Revision))
Map24.Browser.Revision=0;}else
if(navigator.userAgent.match(new RegExp("Mozilla\\/"))){
Map24.Browser.MOZILLA=true;Map24.Browser.Name="Mozilla";var rexp=new RegExp("rv:([0-9])\\.([0-9]{1,2})\\.?([0-9]{0,})");var res=rexp.exec(navigator.userAgent);Map24.Browser.MajorVersion=parseInt(res[1]);Map24.Browser.MinorVersion=parseInt(res[2]);try{
Map24.Browser.Revision=parseInt(res[3]);}catch(e){}
if(!Map24.isNumeric(Map24.Browser.Revision))
Map24.Browser.Revision=0;}else{
Map24.Browser.Name="Unknown";}
}catch(e){
Map24.Browser.Name="Unknown";}
}
Map24.Browser.initialize();Map24.Browser.Event=function(e,win){
this.__constructor=function(e,win){
Map24.Browser.Event.prototype.__constructor.call(this);this.Class="Event";this.Package="Map24.Browser";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Time=(new Date()).getTime();this.Event=e;if(Map24.isNull(win))win=window;if(Map24.isNull(this.Event))this.Event=win.event;if(Map24.isNull(this.Event))this.Event={};this.Source=null;if(!Map24.isNull(this.Event.srcElement)&&Map24.isObject(this.Event.srcElement))
this.Source=this.Event.srcElement;else
if(!Map24.isNull(this.Event.originalTarget)&&Map24.isObject(this.Event.originalTarget))
this.Source=this.Event.originalTarget;this.X=null;this.Y=null;if(Map24.Browser.OPERA){
this.X=this.Event["offsetX"];this.Y=this.Event["offsetY"];}else
if(typeof this.Event.y=="number"){
this.X=this.Event.x;this.Y=this.Event.y;}else
if(typeof this.Event.layerY=="number"){
this.X=this.Event.layerX - this.Event.currentTarget.offsetLeft;this.Y=this.Event.layerY - this.Event.currentTarget.offsetTop;}
if(Map24.Browser.OPERA)
this.ClientX=null;if(typeof this.Event.clientX=="number")
this.ClientX=this.Event.clientX;this.ClientY=null;if(typeof this.Event.clientY=="number")
this.ClientY=this.Event.clientY;this.AltKey=false;if(this.Event.altKey)this.AltKey=true;this.CtrlKey=false;if(this.Event.ctrlKey)this.CtrlKey=true;this.ShiftKey=false;if(this.Event.shiftKey)this.ShiftKey=true;this.KeyCode=null;if(typeof this.Event.keyCode=="number")
this.KeyCode=this.Event.keyCode;this.Type="unknown";if(typeof this.Event.type=="string"){
if(this.Event.type.substr(0,2)!="on")
this.Type="on"+this.Event.type;else
this.Type=this.Event.type;}
this.Button=0;if(typeof this.Event.button=="number")
{
if(Map24.Browser.IE||Map24.Browser.SAFARI){
this.Button=this.Event.button;}else
if(Map24.Browser.OPERA&&Map24.Browser.MajorVersion<8){
switch(this.Event.button){
case 1:this.Button=Map24.Browser.LEFT_BUTTON;break;case 2:this.Button=Map24.Browser.RIGHT_BUTTON;break;case 3:this.Button=Map24.Browser.MIDDLE_BUTTON;break;}
}else
{
switch(this.Event.button){
case 0:this.Button=Map24.Browser.LEFT_BUTTON;break;case 1:this.Button=Map24.Browser.MIDDLE_BUTTON;break;case 2:this.Button=Map24.Browser.RIGHT_BUTTON;break;}
}
}
this._cancel=false;}
this.leftButton=function(){
return(this.Button&Map24.Browser.LEFT_BUTTON==Map24.Browser.LEFT_BUTTON);}
this.rightButton=function(){
return(this.Button&Map24.Browser.RIGHT_BUTTON==Map24.Browser.RIGHT_BUTTON);}
this.middleButton=function(){
return(this.Button&Map24.Browser.MIDDLE_BUTTON==Map24.Browser.MIDDLE_BUTTON);}
this.stopEvent=function(){
this.cancel();this.stopPropagation();}
this.cancel=function(){
if(this.Event.preventDefault){
this.Event.preventDefault();}else{
this.Event.returnValue=false;}
}
this.stopPropagation=function(){
if(this.Event.stopPropagation){
this.Event.stopPropagation();}else{
this.Event.cancelBubble=true;}
}
this.__constructor(e,win);}
Map24.Browser.Event.prototype=new Map24.Object;Map24.notifyClassReady("Map24.Browser.Event");Map24.Browser.LEFT_BUTTON=1;Map24.Browser.RIGHT_BUTTON=2;Map24.Browser.MIDDLE_BUTTON=4;Map24.MapObjects=function(){}
Map24.MapObjects.MapObject=function(default_args)
{
this.__constructor=function(default_args){
Map24.MapObjects.MapObject.prototype.__constructor.call(this);if(!Map24.isNull(default_args)){
if(!(default_args instanceof Object))throw new Map24.Exceptions.InvalidArgument("Invalid parameter 'default_args' given (no hashtable)!",default_args,"Map24.MapObjects.MapObject","__constructor");}else
default_args={};this.Class="MapObject";this.Package="Map24.MapObjects";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Interfaces["IGeometry"]=null;this.Interfaces["Map24.Interfaces.IGeometry"]=null;this.LocationId=null;if(!Map24.isNull(default_args.LocationId)){
if(!Map24.isNumber(default_args.LocationId))throw new Map24.Exceptions.InvalidArgument("Invalid default value for 'LocationId' given!",default_args.LocationId,"Map24.MapObjects.MapObject","__constructor");this.LocationId=parseInt(default_args.LocationId);}
this.ObjectId=null;if(!Map24.isNull(default_args.ObjectId)){
if(typeof default_args.ObjectId!="number"&&typeof default_args.ObjectId!="string")throw new Map24.Exceptions.InvalidArgument("Invalid default value for 'ObjectId' given!",default_args.ObjectId,"Map24.MapObjects.MapObject","__constructor");this.ObjectId=default_args.ObjectId;}
this.Position=null;if(Map24.isObject(default_args.Position,"Position"))this.Position=default_args.Position;this.Address=null;if(Map24.isObject(default_args.Address,"Map24.Address"))this.Address=default_args.Address;this.Properties=new Hashtable();if(Map24.isObject(default_args.Properties,null))this.Properties=default_args.Properties;this.Visible=false;this.ZIndex=0;this.Dirty=0;if(Map24.isNumber(default_args.Dirty)){
this.Dirty=parseInt(default_args.Dirty);}
this.ObjectType=Map24.OBJECT_TYPE["Generic"];if(Map24.isNumber(default_args.ObjectType)){
this.ObjectType=parseInt(default_args.ObjectType);}
}
this.getObjectId=function(){
if(Map24.empty(this.ObjectId))this.ObjectId=this.LocationId;if(Map24.empty(this.ObjectId))this.ObjectId=Map24.makeUniqueId().substr(0,8);return this.ObjectId;}
this.hasGeometry=function(){
if(Map24.empty(this.Geometry))return false;return(this.Geometry.isValid());}
this.hasPosition=function(){
if(Map24.empty(this.Position))return false;return(this.Position.isValid());}
this.getPosition=function(){
return this.Position;}
this.setPosition=function(loc){
if(!Map24.isObject(loc,"IGeometry"))throw new Map24.Exceptions.InvalidArgument("The given parameter 'loc' is no valid IGeometry object!",loc,"Map24.MapObjects.MapObject","setGeometry");var old=this.Position;this.Position=loc;return old;}
this.hasAddress=function(){
if(Map24.empty(this.Address))return false;return(this.Address.isValid());}
this.getAddress=function(){
return this.Address;}
this.setAddress=function(addr){
if(!Map24.isObject(addr,"Map24.Address"))throw new Map24.Exceptions.InvalidArgument("The given parameter 'addr' is no valid Map24.Address object!",addr,"Map24.MapObjects.MapObject","setAddress");var old=this.Address;this.Address=addr;return old;}
this.get=function(property){
switch(property){
case "ObjectId":case "ObjectID":case "CustLocId":case "CustLocID":return this.getObjectId();break;case "Street":case "Postcode":case "Zip":case "City":case "Country":case "State":case "County":case "District":case "Housenumber":if(this.Address==null)return null;if(property=="Zip")property="Postcode";return this.Address.get(property);case "Longitude":case "Long":try{
var p=this.getHotspot();return p.Longitude;}catch(e){
return null;}
case "Latitude":case "Lat":try{
var p=this.getHotspot();return p.Latitude;}catch(e){
return null;}
case "x":case "X":if(this.Position==null)return null;try{
var p=this.Position.getHotspot();return p.X;}catch(e){
return null;}
case "y":case "Y":if(this.Position==null)return null;try{
var p=this.Position.getHotspot();return p.Y;}catch(e){
return null;}
case "LogoURL":case "LogoUrl":case "SymbolUrl":case "SymbolURL":return this.LogoUrl;default:return this[property];}
}
this.set=function(property,value){
switch(property){
case "ObjectId":case "ObjectID":case "CustLocId":case "CustLocID":this.ObjectId=value;break;case "Street":case "Postcode":case "Zip":case "City":case "Country":case "State":case "County":case "District":case "Housenumber":if(this.Address==null)this.Address=new Map24.Address();if(property=="Zip")property="Postcode";return this.Address.set(property,value);case "Longitude":case "Long":this.Longitude=value;break;case "Latitude":case "Lat":this.Latitude=value;break;case "x":case "X":if(this.Position==null)this.Position=new Map24.Point();this.Position.X=value;break;case "y":case "Y":if(this.Position==null)this.Position=new Map24.Point();this.Position.Y=value;break;case "LogoURL":case "LogoUrl":case "SymbolUrl":case "SymbolURL":this.LogoUrl=value;break;default:this[property]=value;}
}
this.toString=function(){
var s=this.Class+" {\r\n";if(Map24.isObject(this.Address,"Map24.Address"))s +=this.Address.toString();try{
var p=this.getHotspot();s+="Longitude: "+p.Longitude+"\r\nLatitude: "+p.nLatitude+"\r\n";}catch(e){}
try{
p=this.Position.getHotspot();s+="X: "+p.X+"\r\Y: "+p.Y+"\r\n";}catch(e){}
for(key in this.Properties){
if(typeof this.Properties[key]=="string"||typeof this.Properties[key]=="number")
s+=key+": "+this.Properties[key]+"\r\n";}
return s+"}\r\n";}
this.paintTo=function(doc,div,map_id){
}
this.getObjectTypeName=function(){
return Map24.getObjectTypeNameById(this.ObjectType);}
this.isMathematical=function(){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","isMathematical");}
this.isGeographic=function(){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","isGeographic");}
this.isValid=function(){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","isValid");}
this.getCenterOfGravity=function(){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","getCenterOfGravity");}
this.getCenter=function(){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","getCenter");}
this.getHotspot=function(){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","getHotspot");}
this.getDimensioning=function(){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","getDimensioning");}
this.isInside=function(p){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","isInside");}
this.isCrossing=function(p){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","isCrossing");}
this.isOutside=function(p){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","isOutside");}
this.distanceTo=function(p){
throw new Map24.Exceptions.NotSupported("Method not supported!","Map24.MapObjects.MapObject","distanceTo");}
this.__constructor(default_args);}
Map24.MapObjects.MapObject.prototype=new Map24.Object;Map24.notifyClassReady("Map24.MapObjects.MapObject");Map24.MapObjects.Location=function(default_args)
{
this.__constructor=function(default_args){
if(!Map24.isNull(default_args)){
if(!(default_args instanceof Object))throw new Map24.Exceptions.InvalidArgument("Invalid parameter 'default_args' given (no hashtable)!",default_args,"Map24.MapObjects.Location","__constructor");}else
default_args={};Map24.MapObjects.Location.prototype.__constructor.call(this,default_args);this.Class="Location";this.Package="Map24.MapObjects";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Coordinate=null;if(default_args.Coordinate instanceof Map24.Coordinate)
this.Coordinate=default_args.Coordinate;}
this.paintTo=function(doc,div,map_id){
var img=doc.createElement("img");img.border=0;img.src=this.Properties.LogoURL;img.style.position="absolute";img.style.left="0px";img.style.top="0px";div.appendChild(img);}
this.__constructor(default_args);}
Map24.MapObjects.Location.prototype=new Map24.MapObjects.MapObject;Map24.notifyClassReady("Map24.MapObjects.Location");Map24.MapObjects.HTMLObject=function(default_args)
{
this.__constructor=function(default_args){
if(!Map24.isNull(default_args)){
if(!(default_args instanceof Object))throw new Map24.Exceptions.InvalidArgument("Invalid parameter 'default_args' given (no hashtable)!",default_args,"Map24.MapObjects.HTMLObject","__constructor");}else
default_args={};Map24.MapObjects.HTMLObject.prototype.__constructor.call(this,default_args);this.Class="HTMLObject";this.Package="Map24.MapObjects";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Coordinate=null;if(default_args.Coordinate instanceof Map24.Coordinate)
this.Coordinate=default_args.Coordinate;}
this.paintTo=function(doc,div,map_id){
Map24.dump(this.Properties.HTML.replace(/Map24\.dispatchEvent\(/,"Map24.dispatchEvent('"+map_id+"',event,"));div.innerHTML=this.Properties.HTML.replace(/Map24\.dispatchEvent\(/,"Map24.dispatchEvent('"+map_id+"',event,");}
this.__constructor(default_args);}
Map24.MapObjects.HTMLObject.prototype=new Map24.MapObjects.MapObject;Map24.notifyClassReady("Map24.MapObjects.HTMLObject");Map24.Errors=function(){}
Map24.Errors.AUTH_FAILED={Code:-1,Msg:"Authentification failed!"};Map24.Errors.AUTH_TIMEOUT={Code:-2,Msg:"Authentification request timed out!"};Map24.Events=function(){}
Map24.Events.Event=function(source){
this.__constructor=function(source){
if(typeof source=="undefined")source=null;if(!(source instanceof Object)&&(source!=null))throw new Map24.Exceptions.InvalidArgument("The given source is no object and not null!",source,"Map24.Events.Event","__constructor");Map24.Events.Event.prototype.__constructor.call(this);this.Class="Error";this.Package="Map24.Events";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Cancel=false;this.CancelPropagation=false;this.TopDown=true;this.Request=null;this.Source=source;this.Attachment=null;this.Message=null;this.Code=0;this.Error=false;this.TriggerList=new Array();this._IsDelivered=false;}
this.isError=function(){
return this.Error;}
this.cancel=function(){
this.Cancel=true;}
this.cancelPropagation=function(){
this.CancelPropagation=true;}
this.beforeDelivery=function(){}
this.__constructor(source);}
Map24.Events.Event.prototype=new Map24.Object;Map24.notifyClassReady("Map24.Events.Event");Map24.Events.Error=function(source,message,code,attachment){
this.__constructor=function(source,message,code,attachment){
Map24.Events.Error.prototype.__constructor.call(this,source);this.Class="Error";this.Package="Map24.Events";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;if((typeof message=="undefined")||(message==null))message="Unknown error occurred";if(typeof message!="string")throw new Map24.Exceptions.InvalidArgument("The error message given is invalid, no string and not null!",message,"Map24.Events.Error","__constructor");if((typeof code=="undefined")||(code==null))code=0;if(typeof code!="number")throw new Map24.Exceptions.InvalidArgument("The error code given is invalid, no number and not null!",code,"Map24.Events.Error","__constructor");if(typeof attachment=="undefined")attachment=null;this.Message=message;this.Code=code;this.Attachment=attachment;}
this.__constructor(source,message,code,attachment);}
Map24.Events.Error.prototype=new Map24.Events.Event;Map24.notifyClassReady("Map24.Events.Error");Map24.Events.ShareReady=function(classes_ready,scripts_ready){
this.__constructor=function(classes_ready,scripts_ready){
if(!(classes_ready instanceof Array))throw new Map24.Exceptions.InvalidArgument("The given parameter 'classes_ready' is no array!",classes_ready,"ShareReady","__constructor");if(!(scripts_ready instanceof Array))throw new Map24.Exceptions.InvalidArgument("The given parameter 'scripts_ready' is no array!",scripts_ready,"ShareReady","__constructor");Map24.Events.ShareReady.prototype.__constructor.call(this,null);this.Class="EShareReady";this.Interfaces[this.Class]=null;this.ClassesReady=classes_ready;this.ScriptsReady=scripts_ready;}
this.__constructor(classes_ready,scripts_ready);}
Map24.Events.ShareReady.prototype=new Map24.Events.Event;Map24.notifyClassReady("Map24.Events.ShareReady");Map24.Events.ConnectionResult=function(result_set,meta_info){
this.__constructor=function(result_set,meta_info){
if(!(result_set instanceof Array))throw new Map24.Exceptions.InvalidArgument("The given parameter 'result_set' is no array!",result_set,"Map24.Events.ConnectionResult","__constructor");if(typeof meta_info=="undefined")meta_info=null;if(!(meta_info instanceof Object)&&(meta_info!=null))throw new Map24.Exceptions.InvalidArgument("The given parameter 'meta_info' is no object and not null!",meta_info,"Map24.Events.ConnectionResult","__constructor");Map24.Events.ConnectionResult.prototype.__constructor.call(this,null);this.Class="ConnectionResult";this.Package="Map24.Events";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.ResultSet=result_set;this.MetaInfo=meta_info;this.Request=null;}
this.__constructor(result_set,meta_info);}
Map24.Events.ConnectionResult.prototype=new Map24.Events.Event;Map24.notifyClassReady("Map24.Events.ConnectionResult");Map24.Events.ConnectionTimeout=function(){
this.__constructor=function(){
Map24.Events.ConnectionTimeout.prototype.__constructor.call(this,null,"Connection timed out!");this.Class="ConnectionTimeout";this.Package="Map24.Events";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Request=null;}
this.__constructor();}
Map24.Events.ConnectionTimeout.prototype=new Map24.Events.Error;Map24.notifyClassReady("Map24.Events.ConnectionTimeout");Map24.Events.ConnectionError=function(message,code,attachment){
this.__constructor=function(message,code,attachment){
Map24.Events.ConnectionError.prototype.__constructor.call(this,null,message,code,attachment);this.Class="ConnectionError";this.Package="Map24.Events";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Request=null;}
this.__constructor(message,code,attachment);}
Map24.Events.ConnectionError.prototype=new Map24.Events.Error;Map24.notifyClassReady("Map24.Events.ConnectionError");Map24.Events.SessionError=function(source,message,code,attachment){
this.__constructor=function(source,message,code,attachment){
Map24.Events.SessionError.prototype.__constructor.call(this,source,message,code,attachment);this.Class="SessionError";this.Package="Map24.Events";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Source=source;}
this.__constructor(source,message,code,attachment);}
Map24.Events.SessionError.prototype=new Map24.Events.Error;Map24.notifyClassReady("Map24.Events.SessionError");Map24.Events.SessionReady=function(source){
this.__constructor=function(source){
Map24.Events.SessionReady.prototype.__constructor.call(this,source);this.Class="SessionReady";this.Package="Map24.Events";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Source=source;}
this.__constructor(source);}
Map24.Events.SessionReady.prototype=new Map24.Events.Event;Map24.notifyClassReady("Map24.Events.SessionReady");Map24.Events.AuthentificationError=function(app_key,session_id,message,code,attachment){
this.__constructor=function(app_key,session_id,message,code,attachment){
Map24.Events.AuthentificationError.prototype.__constructor.call(this,null,message,code,attachment);this.Class="AuthentificationError";this.Package="Map24.Events";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.ApplicationKey=app_key;this.SessionId=session_id;}
this.__constructor(app_key,session_id,message,code,attachment);}
Map24.Events.AuthentificationError.prototype=new Map24.Events.Error;Map24.notifyClassReady("Map24.Events.AuthentificationError");Map24.Exceptions=function(){}
Map24.Exceptions.Exception=function(message,errorcode,attachment,clas,method){
this.__constructor=function(message,errorcode,attachment,clas,method){
Map24.Exceptions.Exception.prototype.__constructor.call(this);this.Class="Exception";this.Package="Map24.Exceptions";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this._ExceptionClass="";if(typeof clas=="string")this._ExceptionClass=clas;this._ExceptionMethod="";if(typeof method=="string")this._ExceptionMethod=method;this._File=null;if(typeof this["fileName"]=="string")this._File=this["fileName"];this._Line=null;if(typeof this["lineNumber"]=="string")this._Line=this["lineNumber"];this._Message="";this._Errorcode=0;this._Attachment=null;if(typeof message!="string")
this._Message="Invalid message for exception given!";else
this._Message=message;if(typeof errorcode=="number")
this._Errorcode=errorcode;else
if(typeof errorcode=="string")
this._Errorcode=parseInt(errorcode);if(typeof attachment!="undefined")this._Attachment=attachment;}
this.__constructor(message,errorcode,attachment,clas,method);this.toString=function(){
var s="";if(!Map24.empty(this._ExceptionMethod))s +=this._ExceptionClass;if(!Map24.empty(this._ExceptionClass)&&!Map24.empty(this._ExceptionMethod))s +=".";if(!Map24.empty(this._ExceptionMethod))s +=this._ExceptionMethod+"(): ";if(this._Line!=null)s +=":"+this._Line;if(this._Errorcode!=0)
s +="["+this._Errorcode+"] "+this._Message;else
s +=this._Message;switch(typeof this._Attachment){
case "undefined":break;case "number":case "string":s +=" {"+this._Attachment+"}";break;case "boolean":s +=" {"+(this._Attachment?"true":"false")+"}";break;case "null":case "object":if(this._Attachment==null)
s +=" {null}";else
if(typeof this._Attachment._class=="string")
s +=" {"+this._Attachment._class+"}";else
s +=" {object}";break;case "function":s +=" {function}";break;default:s +=" {native object}";break;}
if(!Map24.empty(this._File))s +=" @"+this._File;if(!Map24.empty(this._Line))s +=":"+this._Line;return s;}
this.getMessage=function(){
return this._Message;}
this.getClass=function(){
return this._ExceptionClass;}
this.getMethod=function(){
return this._ExceptionMethod;}
this.getFile=function(){
return this._File;}
this.getLine=function(){
return this._Line;}
this.getAttachment=function(){
return this._Attachment;}
this.getCode=function(){
return this._Errorcode;}
this.dump=function(){Map24.dump(this);}
}
Map24.Exceptions.Exception.prototype=new Map24.Object;Map24.notifyClassReady("Map24.Exceptions.Exception");Map24.Exceptions.InvalidArgument=function(message,attachment,clas,method){
this.__constructor=function(message,attachment,clas,method){
if(Map24.empty(message))message="Invalid argument given!";Map24.Exceptions.InvalidArgument.prototype.__constructor.call(this,message,-1,attachment,clas,method);this.Class="InvalidArgument";this.Package="Map24.Exceptions";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;}
this.__constructor(message,attachment,clas,method);}
Map24.Exceptions.InvalidArgument.prototype=new Map24.Exceptions.Exception;Map24.notifyClassReady("Map24.Exceptions.InvalidArgument");Map24.Exceptions.InterfaceNotSupported=function(message,attachment,clas,method){
this.__constructor=function(message,attachment,clas,method){
if(Map24.empty(message))message="Interface not supported!";Map24.Exceptions.InterfaceNotSupported.prototype.__constructor.call(this,message,-3,attachment,clas,method);this.Class="InterfaceNotSupported";this.Package="Map24.Exceptions";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;}
this.__constructor(message,attachment,clas,method);}
Map24.Exceptions.InterfaceNotSupported.prototype=new Map24.Exceptions.Exception;Map24.notifyClassReady("Map24.Exceptions.InterfaceNotSupported");Map24.Exceptions.ClassNotReady=function(message,attachment,clas,method){
this.__constructor=function(message,attachment,clas,method){
if(Map24.empty(message))message="Class not ready!";Map24.Exceptions.ClassNotReady.prototype.__constructor.call(this,message,-2,attachment,clas,method);this.Class="ClassNotReady";this.Package="Map24.Exceptions";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;}
this.__constructor(message,attachment,clas,method);}
Map24.Exceptions.ClassNotReady.prototype=new Map24.Exceptions.Exception;Map24.notifyClassReady("Map24.Exceptions.ClassNotReady");Map24.Exceptions.NotImplemented=function(message,clas,method){
this.__constructor=function(message,clas,method){
if(Map24.empty(message))message="The called method/function is not implemented!";Map24.Exceptions.NotImplemented.prototype.__constructor.call(this,message,-4,null,clas,method);this.Class="NotImplemented";this.Package="Map24.Exceptions";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;}
this.__constructor(message,clas,method);}
Map24.Exceptions.NotImplemented.prototype=new Map24.Exceptions.Exception;Map24.notifyClassReady("Map24.Exceptions.NotImplemented");Map24.Exceptions.Busy=function(message,clas,method){
this.__constructor=function(message,clas,method){
if(Map24.empty(message))message="The called method/function is currently busy!";Map24.Exceptions.Busy.prototype.__constructor.call(this,message,-5,null,clas,method);this.Class="Busy";this.Package="Map24.Exceptions";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;}
this.__constructor(message,clas,method);}
Map24.Exceptions.Busy.prototype=new Map24.Exceptions.Exception;Map24.notifyClassReady("Map24.Exceptions.Busy");Map24.Exceptions.NotSupported=function(message,attachment,clas,method){
this.__constructor=function(message,attachment,clas,method){
if(Map24.empty(message))message="Not supported!";Map24.Exceptions.NotSupported.prototype.__constructor.call(this,message,-5,attachment,clas,method);this.Class="NotSupported";this.Package="Map24.Exceptions";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;}
this.__constructor(message,attachment,clas,method);}
Map24.Exceptions.NotSupported.prototype=new Map24.Exceptions.Exception;Map24.notifyClassReady("Map24.Exceptions.NotSupported");Map24.Network=function(){}
Map24.Network.Proxies=new Array();Map24.Network._proxyHttpGet=function(url){
if(Map24.Network.Proxies.length<=0)return url;var result=null;var call_again=new Array();for(var i=0;i<Map24.Network.Proxies.length;i++)
{
call_again.push(false);if(Map24.isObject(Map24.Network.Proxies[i],"IProxy")){
result=Map24.Network.Proxies[i].proxyHttpGet(url,true);if((result instanceof Object)){
if(typeof result.Url=="string")url=result.Url;if((typeof result.Finish=="boolean")&&(result.Finish==false))call_again[i]=true;}
}
}
for(var i=0;i<Map24.Network.Proxies.length;i++)
{
if(call_again[i]){
result=Map24.Network.Proxies[i].proxyHttpGet(url,false);if((result instanceof Object)&&(typeof result.Url=="string"))
url=result.Url;}
}
return url;}
Map24.Network._proxyHttpPost=function(url,xml){
if(Map24.Network.Proxies.length<=0)return{Url:url,Xml:xml};var result=null;var call_again=new Array();for(var i=0;i<Map24.Network.Proxies.length;i++)
{
call_again.push(false);if(Map24.isObject(Map24.Network.Proxies[i],"IProxy")){
result=Map24.Network.Proxies[i].proxyHttpPost(url,xml,true);if((result instanceof Object)){
if(typeof result.Url=="string")url=result.Url;if(typeof result.Xml=="string")xml=result.Xml;if((typeof result.Finish=="boolean")&&(result.Finish==false))call_again[i]=true;}
}
}
for(var i=0;i<Map24.Network.Proxies.length;i++)
{
if(call_again[i]){
result=Map24.Network.Proxies[i].proxyHttpPost(url,xml,false);if((result instanceof Object)){
if(typeof result.Url=="string")url=result.Url;if(typeof result.Xml=="string")xml=result.Xml;}
}
}
return{Url:url,Xml:xml};}
Map24.Network.ConnectJS=function(timeout){
this.__constructor=function(timeout)
{
if((typeof timeout=="undefined")||(timeout==null))timeout=60;if(typeof timeout!="number")throw new Map24.Exceptions.InvalidArgument("The given parameter 'timeout' is invalid, no number and not null!",timeout,"Map24.Network.ConnectJS","__constructor");Map24.Network.ConnectJS.prototype.__constructor.call(this);this.Class="ConnectJS";this.Package="Map24.Network";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Interfaces["IConnect"]=null;this.Interfaces["Map24.Interfaces.IConnect"]=null;this.Ready=true;this.Timeout=60;this._TimeoutAt=0;this._TimedOut=false;this._Request=null;this._RequestId=null;this.addListener(new Callable(this,this._defaultEventHandler));}
this.setTimeout=function(timeout){
if((typeof timeout!="number")||(timeout<=0))throw new Map24.Exceptions.InvalidArgument("The given timeout is invalid!",timeout,"Map24.Network.ConnectJS","setTimeout");this.Timeout=timeout;}
this.getTimeout=function(timeout){
return this.Timeout;}
this.timeout=function(){
return this._TimedOut;}
this._defaultEventHandler=function(event){
if((event instanceof Map24.Events.ConnectionError)||(event instanceof Map24.Events.ConnectionTimeout)||(event instanceof Map24.Events.ConnectionResult))
{
this.Ready=true;}
return true;}
this.sendRequest=function(request,blocking){
if(!this.Ready)throw new Map24.Exceptions.Busy("There is an open request, it is not possible to send two requests parallel!",null,"Map24.Network.ConnectJS","sendRequest");if(typeof blocking!="boolean")blocking=false;if(blocking)throw new Map24.Exceptions.InvalidArgument("Blocking mode is not supported by this implementation of the IConnect interface!",null,"Map24.Network.ConnectJS","sendRequest");if(!Map24.isObject(request,"IConnectRequest"))throw new Map24.Exceptions.InvalidArgument("The given parameter 'request' is not implementing the IConnectRequest interface!",request,"Map24.Network.ConnectJS","sendRequest");this.Ready=false;this._TimeoutAt=Map24.millitime()+ this.Timeout*1000;this._TimedOut=false;this._Request=request;this._RequestId=request.RequestId;Map24.Network.ConnectJS.OpenRequests[request.RequestId]=this;var url="";if((typeof request.ResultUrl=="string")&&(request.ResultUrl.length>0))
{
url=request.ResultUrl;}else{
var args="";if(request.Args instanceof Object){
for(var key in request.Args){
args +="&"+Map24.urlencode(key)+"="+Map24.urlencode(request.Args[key]);}
}
args +="&sid="+Map24.urlencode(request.SessionId);args +="&mid="+Map24.urlencode(request.Map24Id);var url=request.Url;if(url.indexOf("?")<0)
url +='?'+args.substr(1);else
url +=args;}
url=Map24.Network._proxyHttpGet(url);Map24.dump("sending GET-request: "+url);var script=document.createElement('SCRIPT');script.id=this._RequestId;script.defer=true;script.src=url;document.getElementsByTagName('head')[0].appendChild(script);}
this.countOpenRequests=function(){
return(this.Ready?0:1);}
this.isReady=function(){
return(this.Ready);}
this.__constructor(timeout);}
Map24.Network.ConnectJS.prototype=new Map24.Object;Map24.Network.ConnectJS.OpenRequests={};Map24.Network.ConnectJS.checkTimeout=function(){
try
{
var timedOut=new Array();var now=Map24.millitime();var conn=null;for(var key in Map24.Network.ConnectJS.OpenRequests)
{
try{
if(Map24.Network.ConnectJS.OpenRequests[key]!=null){
if(Map24.Network.ConnectJS.OpenRequests[key]._TimeoutAt<now&&Map24.Network.ConnectJS.OpenRequests[key].Ready==false)
{
conn=Map24.Network.ConnectJS.OpenRequests[key]
delete Map24.Network.ConnectJS.OpenRequests[key];conn._TimedOut=true;conn.Ready=true;timedOut.push(conn);}
}
}catch(e){
Map24.dump(e,null,1);}
}
while(timedOut.length>0){
try{
var tmpNode=document.getElementById(conn._RequestId);tmpNode.parentNode.removeChild(tmpNode);var event=new Map24.Events.ConnectionTimeout();conn=timedOut.shift();event.Request=conn._Request;event.Source=conn;conn.trigger(event);}catch(e){
Map24.dump(e,null,1);}
}
}catch(e){
Map24.dump(e);}
setTimeout("Map24.Network.ConnectJS.checkTimeout()",1000);}
setTimeout("Map24.Network.ConnectJS.checkTimeout()",1000);Map24.Network.ConnectJS.triggerResult=function(request_id,event){
Map24.dump("results for request with ID '"+request_id+"' received!");if((typeof Map24.Network.ConnectJS.OpenRequests[request_id]!="undefined")&&(Map24.Network.ConnectJS.OpenRequests[request_id]!=null))
{
try{
var conn=Map24.Network.ConnectJS.OpenRequests[request_id];delete Map24.Network.ConnectJS.OpenRequests[request_id];if(!(event instanceof Map24.Events.Event)){
event=new Map24.Events.ConnectionError("The event object returned by the service is no Map24.Events.Event instance!",0,event,null,"Map24.Network.ConnectJS.triggerResult");}
event.Request=conn._Request;event.Source=conn;conn.trigger(event);}catch(e){
Map24.dump(e,null,1);}
}
}
function Map24ConnectJS_triggerResult(request_id,event){Map24.Network.ConnectJS.triggerResult(request_id,event);}
function CConnectJS_triggerResult(request_id,event){Map24.Network.ConnectJS.triggerResult(request_id,event);}
Map24.notifyClassReady("Map24.Network.ConnectJS");Map24.Network.ConnectJSPXML=function(formnode){
this.__constructor=function(formnode)
{
if(typeof formnode=="string")formnode=document.getElementById(formnode);if(!Map24.isObject(formnode)||(typeof formnode.nodeName!="string"))throw new Map24.Exceptions.InvalidArgument("The given parameter 'formnode' is invalid, no node object!",formnode,"Map24.Exceptions.ConnectJSPXML","__constructor");Map24.Network.ConnectJSPXML.prototype.__constructor.call(this);this.Class="ConnectJSPXML";this.Package="Map24.Network";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Interfaces["IConnect"]=null;this.Interfaces["Map24.Interfaces.IConnect"]=null;this.Timeout=60;this._Request=null;this._FormNode=formnode;this._IFrameName=Map24.makeUniqueId();this._PostIFrame=null;this._IFrameTop=0;this._IFrameLeft=0;this._IFrameWidth=0;this._IFrameHeight=0;this.RequestTimeLimit=Map24.Network.ConnectJSPXML.REQUESTTIMELIMIT;this._Form=document.createElement("FORM");this._Form.style.width="0px";this._Form.style.height="0px";this._Form.style.border="0px none";this._Form.action="";this._Form.method="POST";this._Form.acceptCharset="UTF-8";this._Form.name="xmlrequest";this._Form.id=Map24.makeUniqueId();this._Form.target=this._IFrameName;this._XMLDoc=document.createElement("TEXTAREA");this._XMLDoc.style.width="0px";this._XMLDoc.style.height="0px";this._XMLDoc.style.border="0px none";this._XMLDoc.name="requestvalue";this._XMLDoc.value="";this._XMLDoc.id=Map24.makeUniqueId();this._Form.appendChild(this._XMLDoc);this._FormNode.appendChild(this._Form);this._PostQueue=new Array();this._PostRuning=false;}
this.setTimeout=function(timeout){
if((typeof timeout!="number")||(timeout<=0))throw new Map24.Exceptions.InvalidArgument("The given timeout is invalid!",timeout,"Map24.Network.ConnectJSPXML","setTimeout");this.Timeout=timeout;}
this.getTimeout=function(timeout){
return this.Timeout;}
this._postRun=function(recall){
if(typeof recall!="boolean")recall=false;this._PostRuning=true;if(this._PostQueue.length>0){
var postPrepare=new Callable(this,this._postPrepare);if(!recall){
postPrepare.setTimeout(650);}else
postPrepare.setTimeout(400);}else
this._PostRuning=false;}
this._postPrepare=function(){
var request=null;try{
var mrc_found=false;for(var i=this._PostQueue.length-1;i>0;i--){
request=this._PostQueue[i];if(mrc_found){
if(request instanceof Map24.Webservices.Request.RenderImageMap)
{
if(request.MRC instanceof Map24.Webservices.Request.MapletRemoteControl)
this._PostQueue[i]=request.MRC;else
this._PostQueue[i]=null;}
}else
if(request instanceof Map24.Webservices.Request.RenderImageMap){
mrc_found=true;}
}
request=this._PostQueue.shift();while((request==null)&&(this._PostQueue.length>0)){
request=this._PostQueue.shift();}
if(request==null){
this._postRun(true);return;}
var follow_up=null;var tmp=null;if(request instanceof Map24.Webservices.Request.RenderImageMap||request instanceof Map24.Webservices.Request.MapletRemoteControl)
{
while(this._PostQueue.length>0)
{
follow_up=this._PostQueue[0];while((follow_up==null)&&(this._PostQueue.length>0)){
this._PostQueue.shift();if(this._PostQueue.length>0)
follow_up=this._PostQueue[0];}
if(follow_up==null)break;if(follow_up instanceof Map24.Webservices.Request.RenderImageMap||follow_up instanceof Map24.Webservices.Request.MapletRemoteControl)
{
if(request instanceof Map24.Webservices.Request.RenderImageMap||follow_up instanceof Map24.Webservices.Request.RenderImageMap)
{
var commands_now=null;var commands_follow_up=null;if(request instanceof Map24.Webservices.Request.RenderImageMap){
if(request.MRC instanceof Map24.Webservices.Request.MapletRemoteControl)
commands_now=request.MRC.Commands;else
commands_now=[];}else
commands_now=request.Commands;if(!(commands_now instanceof Array))
commands_now=[];if(follow_up instanceof Map24.Webservices.Request.RenderImageMap)
{
if(follow_up.MRC instanceof Map24.Webservices.Request.MapletRemoteControl)
commands_follow_up=follow_up.MRC.Commands;else{
commands_follow_up=[];}
request=follow_up;}else
commands_follow_up=follow_up.Commands;if(!(commands_follow_up instanceof Array))
commands_follow_up=[];if(request instanceof Map24.Webservices.Request.RenderImageMap){
request.MRC=new Map24.Webservices.Request.MapletRemoteControl(null,{
Commands:Map24.arrayMerge(
commands_now,commands_follow_up)
});}else{
request.Commands=Map24.arrayMerge(
commands_now,commands_follow_up);}
}else 
{
for(var i=0;i<follow_up.Commands.length;i++){
request.Commands.push(follow_up.Commands[i]);}
}
this._PostQueue.shift();}else
break;}
}
}catch(e){
Map24.dump(e);}
try{
this._Request=request;this._Request.Retries=0;if((request instanceof Map24.Webservices.Request.MapletRemoteControl)||(request instanceof Map24.Webservices.Request.RenderImageMap)){
try{
Map24.dump("serializing MRC into URL:");var mrc_by_image_url=request.toUrl();if((typeof mrc_by_image_url=="string")&&(mrc_by_image_url.length>0))
{
if(mrc_by_image_url.length<900)
{
var url=request.Url;if(url.indexOf("?")<0)
url +="?";else
url +="&";url +="sid="+Map24.urlencode(request.SessionId);if(!Map24.isNull(request.Map24Id))
url +="&mid="+Map24.urlencode(request.Map24Id);url +=mrc_by_image_url;url +="&t="+Map24.makeUniqueId(8);if(request instanceof Map24.Webservices.Request.RenderImageMap)
{
Map24.dump("sending RenderImageMap by HTTP-Get load, url is: "+url);Map24.dump("original XML was:");Map24.dump(request.toXml());request.ResultUrl=url;request.Conn.sendRequest(request);this._Request=null;this._postRun(true);return;}else{
Map24.dump("sending MRC by image load, url is: "+url);Map24.dump("original XML was:");Map24.dump(request.toXml());request.LoadByImage=document.createElement("img");request.LoadByImage.src=url;request.LoadByImage.onload=function(e){
}
this._Request=null;this._postRun(true);return;}
}else{
Map24.dump("The resulting URL would be too long, going to do POST (length:"+mrc_by_image_url.length+")");Map24.dump("URL would be: "+mrc_by_image_url);}
}
}catch(e){
Map24.dump(e);}
}
var xml=request.toXml();var url=request.Url;if(url.indexOf("?")<0)
url +="?NOTIFY="+Map24.urlencode(request.RequestId);else
url +="&NOTIFY="+Map24.urlencode(request.RequestId);url +="&DEPOSIT="+Map24.urlencode(request.RequestId);url +="&sid="+Map24.urlencode(request.SessionId);if(!Map24.isNull(request.Map24Id))
url +="&mid="+Map24.urlencode(request.Map24Id);if(request.Args instanceof Object){
for(key in request.Args){
url +="&"+Map24.urlencode(key)+"="+Map24.urlencode(request.Args[key]);}
}
url +="&t="+Map24.makeUniqueId();if(Map24.Browser.IE||(Map24.Browser.FIREFOX&&Map24.Browser.MajorVersion==1&&Map24.Browser.MinorVersion==5))
{
}else
url +="&pxmlsleep="+this.RequestTimeLimit;this._IFrameName=Map24.makeUniqueId();var data=Map24.Network._proxyHttpPost(url,xml);document.getElementById(this._XMLDoc.id).value=data.Xml;document.getElementById(this._Form.id).action=data.Url;document.getElementById(this._Form.id).target=this._IFrameName;Map24.dump("prepared POST request: "+data.Url+"\nwith body:");Map24.dump(data.Xml);var postExecute=new Callable(this,this._postExecute);postExecute.setTimeout(10);}catch(e){
Map24.dump("Method '_postPrepare()' failed!");Map24.dump(e);this._Request=null;this.trigger(new Map24.Events.ConnectionError("An exception occurred while tried to post an SOAP request!",e,"Map24.Network.ConnectJSPXML","sendRequest"));this._postRun();}
}
this._postExecute=function(){
try{
if(Map24.Network.ConnectJSPXML.DEBUG==true){
}else
if(Map24.Browser.IE||(Map24.Browser.FIREFOX&&Map24.Browser.MajorVersion==1&&Map24.Browser.MinorVersion==5))
{
Map24.dump("Using innerHTML - IFrame hack");this._PostIFrame=document.createElement("DIV");this._PostIFrame.style.position="absolute";this._PostIFrame.style.left=this._IFrameLeft+"px";this._PostIFrame.style.top=this._IFrameTop+"px";this._PostIFrame.style.width=this._IFrameWidth+"px";this._PostIFrame.style.height=this._IFrameHeight+"px";this._PostIFrame.style.border="0px none";this._PostIFrame.innerHTML='\<iframe name="'+this._IFrameName+'" id="'+this._IFrameName+'" width="'+this._IFrameWidth+'" height="'+this._IFrameHeight+'"><\/iframe>';this._FormNode.appendChild(this._PostIFrame);}else{
this._PostIFrame=document.createElement("IFRAME");this._PostIFrame.style.position="absolute";this._PostIFrame.style.left=this._IFrameLeft+"px";this._PostIFrame.style.top=this._IFrameTop+"px";this._PostIFrame.style.width=this._IFrameWidth+"px";this._PostIFrame.style.height=this._IFrameHeight+"px";this._PostIFrame.style.border="0px none";this._PostIFrame.id=this._IFrameName;this._PostIFrame.name=this._IFrameName;this._PostIFrame.src=Map24.Network.ConnectJSPXML.DefaultIFrameUrl;this._FormNode.appendChild(this._PostIFrame);}
document.getElementById(this._Form.id).submit();Map24.dump("submitted POST request...");var postFinish=new Callable(this,this._postFinish);postFinish.setTimeout(10);}catch(e){
Map24.dump("The method '_postExecute()' failed!");Map24.dump(e);this._Request=null;this.trigger(new Map24.Events.ConnectionError("An exception occurred while tried to post an SOAP request!",e,"Map24.Network.ConnectJSPXML","sendRequest"));this._postRun();}
}
this._postFinish=function(){
var request=this._Request;try{
if(Map24.Network.ConnectJSPXML.DEBUG!=true){
request._RemoveIFrame=true;request._IFrameName=this._IFrameName;request._PostIFrame=this._PostIFrame;request._FormNode=this._FormNode;}
this._IFrameName=null;this._PostIFrame=null;var url=request.Url;var url_args={
sid:request.SessionId,WAIT:request.RequestId,PICKUP:request.RequestId,xslt:request.Xslt,"xslt-mime":"application/x-javascript; charset=UTF-8"
};if(!Map24.isNull(request.Map24Id))url_args["mid"]=request.Map24Id;request.ResultUrl=Map24.appendUrl(url,url_args);Map24.dump("post successfull, requesting answer ...");request.Conn.sendRequest(request);}catch(e){
Map24.dump("post failed!");Map24.dump(e);this.trigger(new Map24.Events.ConnectionError("An exception occurred while tried to post an SOAP request!",e,"Map24.Events.ConnectJSPXML","sendRequest"));this._Request=null;}
this._postRun(true);}
this.sendRequest=function(request,blocking)
{
if(!Map24.isObject(request,"IConnectRequest"))throw new Map24.Exceptions.InvalidArgument("The given parameter 'request' is not implementing the IConnectRequest interface!",request,"Map24.Network.ConnectJSPXML","sendRequest");if((typeof blocking=="boolean")&&blocking)throw new Map24.Exceptions.InvalidArgument("Blocking mode not supported!",request,"Map24.Network.ConnectJSPXML","sendRequest");request.Conn=new Map24.Network.ConnectJS();request.Conn.setParent(this);request.Conn.setTimeout(this.Timeout);this._PostQueue.push(request);Map24.dump(this._PostQueue.length+" requests in the queue now");if(!this._PostRuning)this._postRun();}
this.countOpenRequests=function(){
return this._PostQueue.length;}
this.isReady=function(){
return true;}
this.__constructor(formnode);}
Map24.Network.ConnectJSPXML.prototype=new Map24.Object;Map24.Network.ConnectJSPXML.DEBUG=false;Map24.Network.ConnectJSPXML.REQUESTTIMELIMIT=30;Map24.Network.ConnectJSPXML.DefaultIFrameUrl=null;Map24.notifyClassReady("Map24.Network.ConnectJSPXML");Map24.Network.Proxy=function(){
this.__constructor=function()
{
Map24.Network.Proxy.prototype.__constructor.call(this);this.Class="Proxy";this.Package="Map24.Network";this.Interfaces[this.Class]=null;this.Interfaces[this.Package+'.'+this.Class]=null;this.Interfaces["IProxy"]=null;this.Interfaces["Map24.Interfaces.IProxy"]=null;}
this.proxyHttpGet=function(url,topDown){
if(!topDown)return;return{Url:Map24.Network.Proxy.SCRIPT_URL+Map24.urlencode(url),Finish:true};}
this.proxyHttpPost=function(url,xml,topDown){
if(!topDown)return;return{Url:Map24.Network.Proxy.SCRIPT_URL+Map24.urlencode(url),Xml:xml,Finish:true};}
this.__constructor();}
Map24.Network.Proxy.prototype=new Map24.Object;Map24.Network.Proxy.SCRIPT_URL='http://api.map24.com/ajax/1.2/proxyit.php?url=';Map24.Webservices=function(){}
Map24.Webservices.getMap24Application=function(settings){
if(!(settings instanceof Object))settings={};if(!(settings["MRC"] instanceof Map24.Webservices.Request.MapletRemoteControl)){
settings.MRC=new Map24.Webservices.Request.MapletRemoteControl();}
settings.MRC.push(new Map24.Webservices.MRC.ControlComponent({
Component:"MRC",Control:"",Properties:new Map24.Webservices.Hashtable({
"MGI.Draw.Map24HTMLObject":false
})
})
);var map=new Map24.Map(settings);var conn=new Map24.Network.ConnectJS();conn.setParent(map);conn.setTimeout(Map24.Webservices.AUTHENTICATION_REQUEST_TIMEOUT);conn.onConnectionError=function(event){
this.trigger(new Map24.Events.SessionError(this,Map24.Errors.AUTH_FAILED["Msg"],Map24.Errors.AUTH_FAILED["Code"]));event.cancel();event.cancelPropagation();return true;}
conn.onConnectionTimeout=function(event){
this.trigger(new Map24.Events.SessionError(this,Map24.Errors.AUTH_TIMEOUT["Msg"],Map24.Errors.AUTH_TIMEOUT["Code"]));event.cancel();event.cancelPropagation();return true;}
if((typeof settings.SessionId!="string")||(settings.SessionId.length<=4))
settings.SessionId=Map24.makeUniqueId();var host="maptp13.map24.com";if(settings.AppKey.charAt(32)=='X'&&(typeof settings.Host!="string")){
Map24.dump("AppKey contains maptp-server");var maptp_id=parseInt(""+settings.AppKey.charAt(33)+settings.AppKey.charAt(34));Map24.dump(maptp_id)