if(!gc){var gc={CLASS_NAME:"gc",headTag:null,bodyTag:null,scriptLocation:null,scriptName:"gc.js",loadedScripts:{},baseUrl:"",sessionName:"",sessionID:"",onLoadEventHandler:null,afterLoadEventHandler:null,initClass:function(_1,_2,_3){try{if(eval("typeof("+_1+")=='object' && "+_1+"")){return;}}catch(exc){}gc.tmpObj=function(){if(this.constructor){this.constructor.apply(this,arguments);}};className2=_1.split(".");var _4="";for(var i=0;i<className2.length;++i){_4+=(i>0?".":"")+className2[i];if(eval("typeof("+_4+")")=="undefined"){eval(_4+" = {};");}if((i+1)>=className2.length){if(_2){eval("gc.tmpObj = "+_4+";");for(i in _3){gc.tmpObj[i]=_3[i];}gc.tmpObj.CLASS_NAME=_1;}else{gc.tmpObj.prototype=_3;gc.tmpObj.prototype.CLASS_NAME=_1;eval(_4+" = gc.tmpObj;");}}}},initSession:function(_6,_7){this.sessionName=_6;if(gc.Util.getCookie(_6)){this.sessionID=gc.Util.getCookie(_6);}else{this.sessionID=_7;gc.Util.setCookie(_6,_7);}
gc.net.XHR.urlPostfix="&"+encodeURIComponent(this.sessionName)+"="+encodeURIComponent(this.sessionID);},head:function(){if(!this.headTag){this.headTag=document.getElementsByTagName("head")[0];}return this.headTag;},body:function(){if(!this.bodyTag){this.bodyTag=(document.body||document.getElementsByTagName("body")[0]);}return this.bodyTag;},getScriptLocation:function(){if(!this.scriptLocation){var _8=document.getElementsByTagName("script");var _9;var _a;for(var i=0;i<_8.length;++i){_9=_8[i].getAttribute("src");if(_9){_a=_9.lastIndexOf(this.scriptName);if(_a>=0){this.scriptLocation=_9.substring(0,_a);}}}}return this.scriptLocation;},loadScript:function(_c,_d){if(!_d){_c=this.getScriptLocation()+_c;}if(!this.loadedScripts[_c]){var _e=document.createElement("script");_e.setAttribute("charset","utf-8");_e.setAttribute("type","text/javascript");_e.setAttribute("src",_c);gc.head().appendChild(_e);this.loadedScripts[_c]=true;}},isIE:function(){
return (/msie/.test(navigator.userAgent.toLowerCase()));},isIE6:function(){return (this.isIE()&&!this.isIE7()&&!this.isIE8());},isIE7:function(){return ((document.all)&&(navigator.appVersion.toLowerCase().indexOf("msie 7.")!=-1));},isIE8:function(){return ((document.all)&&(navigator.appVersion.toLowerCase().indexOf("msie 8.")!=-1));},isFF:function(){return (/gecko/.test(navigator.userAgent.toLowerCase()));},isSafari:function(){return (/safari/.test(navigator.userAgent.toLowerCase()));},registerOnLoad:function(){if(!this.onLoadEventHandler){if(window.addEventListener){window.addEventListener("load",this.onLoadEventExec,false);}else{if(window.attachEvent){window.attachEvent("onload",this.onLoadEventExec);}}this.onLoadEventHandler=[];}},addOnLoadEvent:function(_f,_10){if(!this.onLoadEventHandler){this.registerOnLoad();}this.onLoadEventHandler[this.onLoadEventHandler.length]={func:_f,obj:_10?_10:window};},addAfterLoadEvent:function(_11,_12){if(!this.onLoadEventHandler){
this.registerOnLoad();}if(!this.afterLoadEventHandler){this.afterLoadEventHandler=[];}this.afterLoadEventHandler[this.afterLoadEventHandler.length]={func:_11,obj:_12?_12:window};},onLoadEventExec:function(_13){if(gc.onLoadEventHandler){for(var i=0;i<gc.onLoadEventHandler.length;++i){try{gc.onLoadEventHandler[i].func.call(gc.onLoadEventHandler[i].obj,_13);}catch(exc){gc.console.error(exc);}}}if(gc.afterLoadEventHandler){for(var i=0;i<gc.afterLoadEventHandler.length;++i){try{gc.afterLoadEventHandler[i].func.call(gc.afterLoadEventHandler[i].obj,_13);}catch(exc){gc.console.error(exc);}}}}};}
gc.initClass("gc.Content",true,{list:{},icon:{},set:function(id,_2,_3){this.list[id]=_2;this.icon[id]=_3;},reload:function(){for(id in this.list){this.load(id,this.list[id],this.icon[id]);}},load:function(id,_5,_6){this.set(id,_5,_6);var _7=new gc.net.Request(_5,this.onResponse,this,gc.net.Request.prototype.RESPONSE_TEXT,true);_7.callbackOnStartFunction=this.onStartLoad;_7.callbackOnStartObject=this;gc.net.XHR.addRequest(_7);},onStartLoad:function(_8){for(id in this.list){if(this.list[id]==_8){var _9=$(id);if(_9&&this.icon[id]){if(_9.innerHTML==""){_9.style.height="20px";}_9.style.backgroundImage="url(\""+gc.baseUrl+this.icon[id]+"\")";if(Effect.Opacity){if(!_9.effect){_9.effect=new Effect.Opacity(_9,{duration:0.2,from:1,to:0.5});}else{_9.effect.cancel();_9.effect.start({duration:0.2,from:1,to:0.5});}}}}}},onResponse:function(_a,_b){for(id in this.list){if(this.list[id]==_b){var _c=$(id);if(_c){if(this.icon[id]){_c.style.opacity=1;_c.style.height="";_c.style.backgroundImage="";}
_c.scrollTop=0;_c.innerHTML=_a;if(Effect.Opacity){if(!_c.effect){_c.effect=new Effect.Opacity(_c,{duration:0.2,to:1,from:0.5});}else{_c.effect.cancel();_c.effect.start({duration:0.2,to:1,from:0.5});}}gc.Util.execJS(_c);}}}}});
gc.initClass("gc.event",true,{getOffsetX:function(_1){if(_1.layerX){return _1.layerX;}else{return _1.offsetX;}},getOffsetY:function(_2){if(_2.layerY){return _2.layerY;}else{return _2.offsetY;}},getPageX:function(_3){if(_3.pageX){return _3.pageX;}else{return _3.clientX;}},getPageY:function(_4){if(_4.pageY){return _4.pageY;}else{return _4.clientY;}},getTarget:function(_5){if(_5.target){return _5.target;}else{if(_5.srcElement){return _5.srcElement;}else{return null;}}},addEventListener:function(_6,_7,_8,_9){if(!_9){_9=window;}if(_6.addEventListener){_6.addEventListener(_7,function(_a){_8.call(_9,_a);},false);}else{if(window.attachEvent){_6.attachEvent("on"+_7,function(_b){_8.call(_9,_b);});}}}});
gc.initClass("gc.Util",true,{trim:function(_1){if(_1!=null&&_1.length>0){var i;for(i=0;i<_1.length;++i){if(_1.charCodeAt(i)>32&&_1.charCodeAt(i)!=160){break;}}_1=_1.substring(i,_1.length);for(i=_1.length-1;i>=0;--i){if(_1.charCodeAt(i)>32&&_1.charCodeAt(i)!=160){break;}}_1=_1.substring(0,i+1);}return _1;},xmlDecode:function(_3){return _3.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,"\"").replace(/&apos;/g,"'").replace(/&amp;/g,"&");},inArray:function(_4,_5){for(var i=0;i<_4.length;++i){if(_4[i]==_5){return true;}}return false;},urlParams:function(_7){var _8="";for(param in _7){_8+="&"+encodeURIComponent(param)+"="+encodeURIComponent(_7[param]);}return _8;},utf8_encode:function(_9){var _a="";var ch;for(var i=0;i<_9.length;++i){ch=_9.charCodeAt(i);if(ch<128){_a+=String.fromCharCode(ch);}else{_a+=String.fromCharCode((ch>>6)|192);_a+=String.fromCharCode((ch&63)|128);}}return _a;},utf8_decode:function(_d){var _e="";var ch;var ch2;for(var i=0;i<_d.length;++i){
ch=_d.charCodeAt(i);if(ch<128){_e+=String.fromCharCode(ch);}else{if((i+1)<_d.length){ch2=_d.charCodeAt(i+1);_e+=String.fromCharCode(((ch&31)<<6)|(ch2&63));++i;}}}return _e;},getCookie:function(_12){_12=this.trim(_12);var _13=document.cookie.split(";");var _14;for(var i=0;i<_13.length;++i){_14=this.trim(_13[i]).split("=");if(_14.length>=2&&this.trim(_14[0])==_12){return this.trim(unescape(_14[1]));}}return "";},setCookie:function(_16,_17){document.cookie=_16+"="+escape(_17);},setCSS:function(_18,css){var key=css.substring(0,5).toLowerCase();if(key=="style"){css=css.replace("style=","");css=css.replace("\"","").replace("\"","");if(_18.style.setAttribute){var _1b;var _1c;try{_18.removeAttributeNode(_18.getAttributeNode("style"));}catch(e){}try{_18.removeAttribute("style");}catch(e){}_1b=css.split(";");for(var j=0;j<_1b.length;++j){_1c=_1b[j].split(":");_1c[0]=this.trim(_1c[0]);_1c[1]=this.trim(_1c[1]);if(_1c[0]!=""&&_1c[0]!=null){_18.style.setAttribute(_1c[0],_1c[1],false);
_1c[0]=_1c[0].replace("-","").replace("-","").replace("-","");_18.style.setAttribute(_1c[0],_1c[1],false);}}}else{_18.setAttribute("style",css);}}if(key=="class"){css=css.replace("class=","");css=css.replace("\"","").replace("\"","");_18.className=css;}var tmp=_18.style.color;_18.style.color="#ffffff";_18.style.color="#000000";_18.style.color=tmp;},setCSSByTagname:function(id,_20,css,_22){if(id!=""){var _23;var tmp;var _25;_23=document.getElementsByTagName(_20);for(var i=0;i<_23.length;++i){if((_23[i].id==id||(_22&&_23[i].id.substr(0,id.length)==id))){this.setCSS(_23[i],css);}}}},openPopup:function(url,_28,_29){var _2a=window.open(url,_28,_29);if(_2a){_2a.focus();}},getScreenCenterX:function(_2b){return Math.max(0,Math.round((this.getWindowWidth()-_2b)/2));},getScreenCenterY:function(_2c){return Math.max(0,Math.round((this.getWindowHeight()-_2c)/2));},getWindowWidth:function(){if(window.innerWidth){return window.innerWidth;}else{return document.body.clientWidth;}
},getWindowHeight:function(){if(window.innerHeight){return window.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight;}else{return document.body.clientHeight;}}},getDocumentWidth:function(){if(document.width){return document.width;}else{return document.body.clientWidth;}},getDocumentHeight:function(){if(document.height){return document.height;}else{if(gc.isIE()&&!gc.isIE7()){return document.body.scrollHeight;}else{return document.body.clientHeight;}}},getAbsoluteX:function(_2d){if(_2d.offsetParent){return _2d.offsetLeft+this.getAbsoluteX(_2d.offsetParent);}else{return _2d.offsetLeft;}},getAbsoluteY:function(_2e){if(_2e.offsetParent){return _2e.offsetTop+this.getAbsoluteY(_2e.offsetParent);}else{return _2e.offsetTop;}},setFormValue:function(_2f,_30,_31){var _32=document.getElementsByName(_2f);for(var i=0;i<_32.length;++i){if(_32[i][_30]){_32[i][_30].value=_31;}}},execJS:function(tag){if(tag.childNodes){
for(var i=0;i<tag.childNodes.length;++i){if(tag.childNodes[i].nodeName.toLowerCase()=="script"){var src=tag.childNodes[i].getAttribute("src");if(src&&src!=""){gc.loadScript(src,true);}else{eval(tag.childNodes[i].text);}}else{this.execJS(tag.childNodes[i]);}}}},confirm:function(msg,_38,obj){if(window.confirm(msg)){if(_38){return obj?_38.call(obj):_38();}else{return true;}}else{return false;}}});
gc.initClass("gc.console",true,{console:function(_1,_2){if(window.console&&window.console[_1]){window.console[_1](_2);if(_2&&_2.message){window.console[_1](_2.message);}}},log:function(_3){this.console("log",_3);},debug:function(_4){this.console("debug",_4);},info:function(_5){this.console("info",_5);},warn:function(_6){this.console("warn",_6);},error:function(_7){this.console("error",_7);}});
gc.initClass("gc.net.Request",false,{RESPONSE_TEXT:"text",RESPONSE_XML:"xml",RESPONSE_JSON:"json",url:null,highPriority:false,callbackFunction:null,callbackObject:null,responseType:null,postContentType:"application/x-www-form-urlencoded",postData:null,noCache:false,persistent:false,callbackOnStartFunction:null,callbackOnStartObject:null,constructor:function(_1,_2,_3,_4,_5,_6){if(!_4){_4=this.RESPONSE_TEXT;}if(!_5){_5=false;}this.url=_1;this.callbackFunction=_2;this.callbackObject=_3;this.responseType=_4;this.postData=_6;this.noCache=_5;},readPostDataFromForm:function(_7){if(_7){this.postData=Form.serialize(_7);}}});
gc.initClass("gc.net.XHR",true,{METHOD_XML_HTTP_REQUEST:0,METHOD_SCRIPT_TAG:1,method:1,requests:new Array(),xhr:null,script_tag:null,script_time:null,date:new Date(),urlPostfix:"",addRequest:function(_1,_2){_1.highPriority=_2;if(this.method==this.METHOD_SCRIPT_TAG){this.checkJSError();}if(_1.highPriority&&this.requests.length>1){for(var i=this.requests.length-1;i>=0;--i){if(i==0||this.requests[i].highPriority){this.requests[i+1]=_1;break;}else{this.requests[i+1]=this.requests[i];}}}else{this.requests.push(_1);}if(this.requests.length==1){this.sendRequest();}},newRequest:function(_4,_5,_6,_7,_8,_9,_a){var _b=new gc.net.Request(_4,_5,_6,_7,_8,_9);_b.persistent=false;this.addRequest(_b,_a);},init:function(){this.initDate();if(this.method==this.METHOD_SCRIPT_TAG){this.initScriptTag();}else{this.initXHR();}},initDate:function(){try{delete this.date;}finally{this.date=new Date();}},initXHR:function(){if(this.xhr){try{delete this.xhr;}catch(exc){gc.console.error(exc);}}
if(window.XMLHttpRequest){if(!this.xhr){this.xhr=new XMLHttpRequest();this.xhr.onerror=this.onError;}}else{try{this.xhr=new ActiveXObject("Msxml2.XMLHTTP");}catch(exc){try{this.xhr=new ActiveXObject("Microsoft.XMLHTTP");}catch(exc){this.xhr=null;gc.console.error(exc);}}}if(this.xhr){this.xhr.onreadystatechange=this.onReadyStateChange;}},initScriptTag:function(){this.freeScriptTag();this.script_time=this.date.getTime();},freeScriptTag:function(){if(this.script_tag){if(!gc.isIE()&&!gc.isSafari()){try{gc.head().removeChild(this.script_tag);}catch(exc){gc.console.error(exc);}try{delete this.script_tag;}catch(exc){gc.console.error(exc);}}this.script_tag=null;this.script_time=null;}},sendRequest:function(){if(gc.net.XHR.requests.length>0){gc.net.XHR.init();if(gc.net.XHR.requests.length>0){if(gc.net.XHR.requests[0].callbackOnStartFunction){try{gc.net.XHR.requests[0].callbackOnStartFunction.call(gc.net.XHR.requests[0].callbackOnStartObject,gc.net.XHR.requests[0].url);}catch(exc){}}
var _c="GET";var _d=gc.net.XHR.requests[0].url;var _e=null;var _f=null;if(_d.indexOf("?")>=0){_d+="&";}else{_d+="?";}if(document.charset){_d+="charset="+document.charset;}else{if(document.characterSet){_d+="charset="+document.characterSet;}else{if(document.inputEncoding){_d+="charset="+document.inputEncoding;}}}if(gc.net.XHR.requests[0].postData&&gc.net.XHR.requests[0].postData!=""){_c="POST";_e=gc.net.XHR.requests[0].postData;_f=gc.net.XHR.requests[0].postContentType;}if(gc.net.XHR.requests[0].noCache&&(_c!="POST"||gc.net.XHR.method==gc.net.XHR.METHOD_SCRIPT_TAG)){_d+="&timestamp_no_cache="+gc.net.XHR.date.getTime();}_d+=this.urlPostfix;try{if(gc.net.XHR.method==gc.net.XHR.METHOD_SCRIPT_TAG){_d+="&useCallback=1";if(_e){_d+="&"+_e;}gc.net.XHR.script_tag=document.createElement("script");gc.net.XHR.script_tag.type="text/javascript";gc.net.XHR.script_tag.src=_d;gc.head().appendChild(gc.net.XHR.script_tag);}else{gc.net.XHR.xhr.open(_c,_d,true);if(_f){
gc.net.XHR.xhr.setRequestHeader("Content-Type",_f);}gc.net.XHR.xhr.send(_e);}}catch(exc){gc.console.error(exc);gc.net.XHR.onError();}}}},sendResponse:function(_10){if(gc.net.XHR.requests.length>0){try{if(gc.net.XHR.requests[0].callbackFunction){if(gc.net.XHR.requests[0].callbackObject){gc.net.XHR.requests[0].callbackFunction.call(gc.net.XHR.requests[0].callbackObject,_10,gc.net.XHR.requests[0].url);}else{gc.net.XHR.requests[0].callbackFunction(_10,gc.net.XHR.requests[0].url);}}}catch(exc){gc.console.error(exc);}var _11=gc.net.XHR.requests.shift();try{if(!_11.persistent){delete _11;}}catch(exc){gc.console.error(exc);}gc.net.XHR.sendRequest();}},onReadyStateChange:function(){if(gc.net.XHR.xhr&&gc.net.XHR.xhr.readyState==4&&gc.net.XHR.requests.length>0){try{var _12=null;if(gc.net.XHR.requests[0].responseType==gc.net.Request.prototype.RESPONSE_XML){_12=gc.net.XHR.xhr.responseXML;}else{if(gc.net.XHR.requests[0].responseType==gc.net.Request.prototype.RESPONSE_JSON){
_12=JSON.parse(gc.net.XHR.xhr.responseText);}else{_12=gc.net.XHR.xhr.responseText;}}gc.net.XHR.sendResponse(_12);}catch(exc){gc.console.error(exc);}}},onError:function(){if(gc.net.XHR.requests.length>0){request=gc.net.XHR.requests.shift();try{if(request.callbackFunction){if(request.callbackObject){request.callbackFunction.call(request.callbackObject,null);}else{request.callbackFunction(null);}}}catch(exc){gc.console.error(exc);}try{if(!request.persistent){delete request;}}catch(exc){gc.console.error(exc);}gc.net.XHR.sendRequest();}},onJSCallback:function(_13){gc.net.XHR.freeScriptTag();if(gc.net.XHR.requests[0].responseType==gc.net.Request.prototype.RESPONSE_JSON){_13=JSON.parse(_13);}gc.net.XHR.sendResponse(_13);},checkJSError:function(){this.initDate();if(gc.net.XHR.requests.length>0&&this.script_tag&&(this.date.getTime()-this.script_time)>15000){gc.net.XHR.freeScriptTag();gc.net.XHR.onError();}}});
gc.initClass("gc.proj.lonlat",true,{maxx:180,maxy:90,srs:"EPSG:4326"});
gc.initClass("gc.proj.mercator",true,{maxx:20037508.34,maxy:20037508.34,srs:"EPSG:900913",toX:function(_1){if(typeof _1=="string"){_1=parseFloat(_1);}return _1*this.maxx/180;},toY:function(_2){if(typeof _2=="string"){_2=parseFloat(_2);}return Math.log(Math.tan((90+_2)*Math.PI/360))/Math.PI*this.maxy;},toLon:function(x){if(typeof x=="string"){x=parseFloat(x);}return x*180/this.maxx;},toLat:function(y){if(typeof y=="string"){y=parseFloat(y);}return Math.atan(Math.exp(y*Math.PI/this.maxy))*360/Math.PI-90;}});
gc.initClass("gc.widget.FrameWidget",false,{event:null,width:null,height:null,visible:false,disabled:false,changed:false,changedInfo:null,div:null,divTitle:null,divContent:null,iframe:null,imgClose:null,divBG:null,draggable:null,constructor:function(_1,_2,_3,x,y,_6){this.event=new gc.event.Custom(this);if(_6){this.divBG=document.createElement("div");this.divBG.style.display="none";this.divBG.className="gc_widget_background";gc.body().appendChild(this.divBG);}this.div=document.createElement("div");this.div.style.display="none";this.div.className="gc_widget";this.imgClose=document.createElement("img");this.imgClose.className="gc_widget_close";this.imgClose.src=gc.baseUrl+"res/images/buttons/close.gif";gc.event.addEventListener(this.imgClose,"click",this.close,this);this.div.appendChild(this.imgClose);this.divTitle=document.createElement("div");this.divTitle.className="gc_widget_title";this.setTitle(_1);this.div.appendChild(this.divTitle);this.divContent=document.createElement("div");
this.divContent.className="gc_widget_iframe";this.div.appendChild(this.divContent);this.iframe=document.createElement("iframe");this.iframe.width="100%";this.iframe.height="100%";this.iframe.frameborder=0;this.iframe.className="gc_widget_iframe";gc.event.addEventListener(this.iframe,"load",this.stopLoad,this);this.divContent.appendChild(this.iframe);this.divDisabled=document.createElement("div");this.divDisabled.className="gc_widget_content_disabled";this.divDisabled.style.display="none";this.div.appendChild(this.divDisabled);this.setSize(_2,_3);this.setPosition(x,y);gc.body().appendChild(this.div);try{this.draggable=new Draggable(this.div);Draggables.addObserver(this);}catch(exc){}gc.event.addEventListener(document,"keyup",this.onKeyUp,this);},setTitle:function(_7){if(this.divTitle){this.divTitle.innerHTML=_7;if(!_7){this.divTitle.style.display="none";}else{this.divTitle.style.display="";}}},setPosition:function(x,y){if(!x){x=gc.Util.getScreenCenterX(this.width);}if(!y){
y=gc.Util.getScreenCenterY(this.height+32);}x=Math.max(0,Math.min(x,gc.Util.getDocumentWidth()-this.width-2));y=Math.max(0,Math.min(y,Math.max(gc.Util.getDocumentHeight(),gc.Util.getWindowHeight())-this.height-32));if(this.div){this.div.style.left=x+"px";this.div.style.top=y+"px";}},setSize:function(_a,_b){if(!_b){_b=gc.Util.getWindowHeight()-64;}this.width=Math.max(100,_a);this.height=Math.max(100,_b);if(this.divContent){this.divContent.style.width=this.width+"px";this.divContent.style.height=this.height+"px";}if(this.iframe){this.iframe.width=this.width;this.iframe.height=this.height;}},open:function(_c,_d,_e,_f,x,y){this.changed=false;this.setTitle(_c);if(_e){this.setSize(_e,_f);this.setPosition(x,y);}if(_d&&this.iframe){var _12=new Date();this.iframe.src=_d+"&timestamp_no_cache="+_12.getTime();delete _12;}if(!this.visible){this.visible=true;if(this.div){try{Effect.Appear(this.div,{duration:0.3});}catch(exc){this.div.style.display="";}}if(this.divBG){if(gc.isIE6()||gc.isFF()){
this.divBG.style.position="absolute";this.divBG.style.height=Math.max(gc.Util.getDocumentHeight(),gc.Util.getWindowHeight())+"px";}try{Effect.Appear(this.divBG,{duration:0.3,to:0.3});}catch(exc){this.divBG.style.display="";}}}},clear:function(){if(this.iframe&&this.iframe.contentWindow&&this.iframe.contentWindow.document){var _13=this.iframe.contentWindow.document.getElementsByTagName("body");if(_13&&_13[0]){_13[0].innerHTML="";}}},close:function(_14){if(this.visible&&!this.disabled){this.iframe.src="";this.visible=false;if(this.div){try{Effect.Fade(this.div,{duration:0.3});}catch(exc){this.div.style.display="none";}}if(this.divBG){try{Effect.Fade(this.divBG,{duration:0.3,from:0.3});}catch(exc){this.divBG.style.display="none";}}this.event.trigger("close",_14?_14:[]);}},enable:function(){if(this.disabled){this.disabled=false;if(this.divDisabled){this.divDisabled.style.display="none";}if(gc.isIE6()&&this.iframe){this.iframe.height=this.height;}}},disable:function(){if(!this.disabled){
this.disabled=true;if(this.divDisabled){this.divDisabled.style.display="";}if(gc.isIE6()&&this.iframe){this.divDisabled.style.width=this.width;this.divDisabled.style.height=this.height;this.iframe.height=0;}}},startLoad:function(_15,url,_17,_18,x,y){this.disable();if(this.divDisabled){this.divDisabled.style.backgroundImage="url('"+gc.baseUrl+"res/images/ajax-loader.gif')";}if(url){this.open(_15,url,_17,_18,x,y);}},stopLoad:function(_1b){if(_1b&&this.iframe){this.iframe.contentWindow.widget=this;with(this.iframe.contentWindow){var me=this;if(document.addEventListener){document.addEventListener("keyup",function(_1d){me.onKeyUp(_1d);},false);}else{if(attachEvent){document.attachEvent("onkeyup",function(_1e){me.onKeyUp(_1e);});}}}}this.enable();if(this.divDisabled){this.divDisabled.style.backgroundImage="url('')";}if(this.visible){this.event.trigger("load",_1b);}},isChanged:function(){return this.changed;},getChangedInfo:function(){return this.changedInfo;},setChanged:function(_1f){
this.changed=true;this.changedInfo=_1f;},onKeyUp:function(_20){if(_20.keyCode==27){try{this.close();}catch(exc){}}},onEnd:function(_21,_22,_23){if(this.draggable==_22){var pos=this.draggable.currentDelta();this.setPosition(pos[0],pos[1]);if(this.divBG&&(gc.isIE6()||gc.isFF())){this.divBG.style.height=Math.max(gc.Util.getDocumentHeight(),gc.Util.getWindowHeight())+"px";}}}});
gc.initClass("gc.widget.ColorPicker",true,{node:null,div:null,timeout:null,colors:[["#ffffff","#d3d3d3","#c0c0c0","#808080","#696969","#4f4f4f","#000000"],["#fff5ee","#ffc0cb","#f08080","#ff0000","#dc143c","#b22222","#8b0000"],["#fff8dc","#ffe4c4","#f4a460","#ff4500","#d2691e","#8b4513","#800000"],["#fffacd","#ffe4b5","#ffa500","#ff8c00","#ff7f50","#a0522d","#a52a2a"],["#ffffe0","#f0e68c","#eee8aa","#ffff00","#ffd700","#808000","#556b2f"],["#98fb98","#90ee90","#7fff00","#32cd32","#228b22","#008000","#006400"],["#afeeee","#20b2aa","#48d1cc","#8fbc8f","#2e8b57","#008b8b","#191970"],["#e0ffff","#87cefa","#87ceeb","#4169e1","#0000ff","#0000cd","#000080"],["#e6e6fa","#6495ed","#7b68ee","#6a5acd","#8a2be2","#483d8b","#4b0082"],["#dda0dd","#ee82ee","#da70d6","#ba55d3","#9932cc","#8b008b","#800080"]],init:function(){if(!this.div){this.div=document.createElement("div");this.div.className="xc_popup";with(this.div.style){display="none";position="absolute";top="-1000px";left="-1000px";
width="220px";height="100px";zIndex="10000";}gc.body().appendChild(this.div);this.div.onclick=function(){gc.widget.ColorPicker.onClick();};var _1="";this.div.style.width=(this.colors.length*18+4)+"px";for(var i in this.colors){_1+="<div onClick=\"gc.widget.ColorPicker.onClick();\">";this.div.style.height=(this.colors[i].length*18+4)+"px";for(var j in this.colors[i]){_1+="<div class=\"xc_color_picker\" style=\"position: absolute; "+"background-color: "+this.colors[i][j]+"; "+"left: "+(i*18+4)+"px; "+"top: "+(j*18+4)+"px;\" "+"onClick=\"gc.widget.ColorPicker.onClick('"+this.colors[i][j]+"');\""+"></div>";}_1+="</div>";}this.div.innerHTML=_1;}},show:function(_4,_5){if(this.timeout){window.clearTimeout(this.timeout);this.timeout=null;}this.init();this.node=_5;this.div.style.display="";this.div.style.left=""+gc.Util.getAbsoluteX(_5)+"px";this.div.style.top=""+(gc.Util.getAbsoluteY(_5)+_5.offsetHeight+1)+"px";},hide:function(_6,_7){this.timeout=window.setTimeout(this.hide2,200);
},hide2:function(){with(gc.widget.ColorPicker){if(timeout){div.style.display="none";node=null;timeout=null;}}},onClick:function(_8){if(this.timeout){window.clearTimeout(this.timeout);this.timeout=null;}if(this.node){this.node.focus();if(_8){this.node.style.backgroundColor=_8;this.node.onchange();}}}});
gc.initClass("gc.widget.Widget",false,{x:0,y:0,width:200,height:300,visible:false,is_drag:false,div_widget_bg:null,div_widget:null,img_close:null,div_title:null,div_content:null,div_disabled:null,list_index:-1,autoReload:false,constructor:function(_1,_2,_3,x,y,_6){this.list_index=gc.widget.widgets.length;gc.widget.widgets[this.list_index]=this;if(_2&&_3){this.width=_2;this.height=_3;}if(x||y){this.x=x;this.y=y;}else{this.x=gc.Util.getScreenCenterX(this.width);this.y=gc.Util.getScreenCenterY(this.height);}if(_6){this.div_widget_bg=document.createElement("div");this.div_widget_bg.style.display="none";this.div_widget_bg.className="gc_widget_background";gc.body().appendChild(this.div_widget_bg);}this.div_widget=document.createElement("div");this.div_widget.style.display="none";this.div_widget.className="gc_widget";var i=this.list_index;this.img_close=document.createElement("img");this.img_close.className="gc_widget_close";this.img_close.src=gc.baseUrl+"res/images/buttons/close.gif";
this.img_close.onclick=function(){gc.widget.widgets[i].setVisible(false);return false;};this.div_widget.appendChild(this.img_close);this.div_title=document.createElement("div");this.div_title.className="gc_widget_title";this.div_title.innerHTML=_1;this.div_widget.appendChild(this.div_title);this.div_content=document.createElement("div");this.div_content.className="gc_widget_content";this.div_widget.appendChild(this.div_content);this.div_disabled=document.createElement("div");this.div_disabled.className="gc_widget_content_disabled";this.div_disabled.style.display="none";this.div_widget.appendChild(this.div_disabled);this.setPosition(this.x,this.y,true);this.setSize(this.width,this.height);document.body.appendChild(this.div_widget);if(gc.event.Mouse){gc.event.Mouse.addListener(this);}gc.event.addEventListener(document,"keyup",this.onKeyUp,this);},destroy:function(){if(gc.event.Mouse){gc.event.Mouse.removeListener(this);}if(this.div_widget){document.body.removeChild(this.div_widget);
this.div_widget.removeChild(this.div_title);this.div_widget.removeChild(this.div_content);delete this.div_widget;delete this.div_title;delete this.div_content;this.div_widget=null;this.div_title=null;this.div_content=null;}},setPosition:function(x,y,_a){if(_a){if(x>(gc.Util.getDocumentWidth()-this.width+4)){x=gc.Util.getDocumentWidth()-this.width+4;}if(x<0){x=0;}var _b=gc.Util.getWindowHeight()-50;if(y>(_b-this.height)){y=_b-this.height;}if(y<0){y=0;}}this.x=x;this.y=y;if(this.div_widget){this.div_widget.style.left=this.x+"px";this.div_widget.style.top=this.y+"px";}},setSize:function(_c,_d){this.width=Math.max(100,_c);this.height=Math.max(100,_d);if(this.div_content){this.div_content.style.width=this.width+"px";this.div_content.style.height=this.height+"px";}},setTitle:function(_e){if(this.div_title){this.div_title.innerHTML=_e;if(!_e){this.div_title.style.display="none";}else{this.div_title.style.display="";}}},getVisible:function(){return this.visible;},setVisible:function(_f){
if(_f){if(this.div_widget_bg){if((gc.isIE()&&!gc.isIE7())||gc.isFF()){this.div_widget_bg.style.position="absolute";this.div_widget_bg.style.height=Math.max(gc.Util.getDocumentHeight(),gc.Util.getWindowHeight())+"px";}}if(Effect&&!this.getVisible()){Effect.Appear(this.div_widget,{duration:0.3,from:0,to:1});if(this.div_widget_bg){Effect.Appear(this.div_widget_bg,{duration:0.3,from:0,to:0.3});}}else{this.div_widget.style.display="";if(this.div_widget_bg){this.div_widget_bg.style.display="";}}}else{if(this.getVisible()){if(Effect){Effect.Fade(this.div_widget,{duration:0.3,from:1,to:0});if(this.div_widget_bg){Effect.Fade(this.div_widget_bg,{duration:0.3,from:0.3,to:0});}}else{this.div_widget.style.display="none";if(this.div_widget_bg){this.div_widget_bg.style.display="none";}}}}this.visible=_f;},setContent:function(_10){this.div_disabled.style.display="none";this.div_disabled.style.backgroundImage="";if(_10){this.div_content.scrollTop=0;
this.div_content.innerHTML=_10.replace(/this\.widget/g,"gc.widget.widgets["+this.list_index+"]");gc.Util.execJS(this.div_content);}},startLoad:function(url,_12){if(!_12){this.div_content.innerHTML="";}this.div_disabled.style.display="";this.div_disabled.style.backgroundImage="url('"+gc.baseUrl+"res/images/ajax-loader.gif')";},stopLoad:function(_13){this.setContent(_13);this.setVisible(true);if(this.autoReload){gc.Content.reload();}},show:function(_14,url,_16,_17){if(!_16){_16=400;}if(!_17){_17=gc.Util.getWindowHeight()-64;}this.setTitle(_14);this.setContent("");this.setSize(_16,_17);this.setPosition(gc.Util.getScreenCenterX(this.width),gc.Util.getScreenCenterY(this.height)-20,true);this.setVisible(true);this.reload(url);},reload:function(url){this.setContent("");var _19=new gc.net.Request(url,this.stopLoad,this,gc.net.Request.prototype.RESPONSE_TEXT,true);_19.callbackOnStartFunction=this.startLoad;_19.callbackOnStartObject=this;gc.net.XHR.addRequest(_19,true);
},submitForm:function(_1a,url){try{req=new gc.net.Request();req.url=url;req.callbackFunction=this.stopLoad;req.callbackObject=this;req.noCache=true;req.responseType=req.RESPONSE_TEXT;req.readPostDataFromForm(_1a);gc.net.XHR.addRequest(req);this.startLoad(true);}catch(exc){}},onMouseDragStart:function(_1c,_1d,x,y,_20,_21){if(_1d==this.div_title){this.is_drag=true;this.setPosition(this.x,this.y,true);return true;}return false;},onMouseDragStop:function(_22,_23,x,y,_26,_27){if(this.is_drag){this.is_drag=false;this.setPosition(this.x,this.y,true);return true;}return false;},onMouseDrag:function(_28,_29,x,y){if(_29==this.div_title&&this.is_drag){this.setPosition(this.x+x,this.y+y);return true;}return false;},onKeyUp:function(_2c){if(_2c.keyCode==27){try{this.setVisible(false);}catch(exc){}}}});gc.widget.widgets=new Array();
gc.initClass("gc.widget.Div",false,{id:null,node:null,url:null,effect:null,constructor:function(id){this.id=id;},reload:function(_2){if(!this.node){this.node=document.getElementById(this.id);}if(this.node){this.url=_2;this.node.style.backgroundImage="url(\""+gc.baseUrl+"res/images/ajax-loader.gif\")";if(Effect.Opacity){if(!this.effect){this.effect=new Effect.Opacity(this.node,{duration:0.2,from:1,to:0.5});}else{this.effect.cancel();this.effect.start({duration:0.2,from:1,to:0.5});}}else{this.node.innerHTML="";}gc.net.XHR.newRequest(_2,this.onReload,this,gc.net.Request.prototype.RESPONSE_TEXT,true);}},addOnClick:function(_3){for(var i=0;i<_3.childNodes.length;++i){if(_3.childNodes[i].nodeName=="A"&&_3.childNodes[i].getAttribute("href")&&_3.childNodes[i].getAttribute("href")!=""&&_3.childNodes[i].getAttribute("href")!="#"){gc.event.addEventListener(_3.childNodes[i],"click",this.onClick,this);var _5=_3.childNodes[i].getAttribute("href").split("?",2);if(_5.length>1){
_3.childNodes[i].queryString=_5[1];}_3.childNodes[i].setAttribute("href","#");}this.addOnClick(_3.childNodes[i]);}},onReload:function(_6){if(this.node){this.node.style.backgroundImage="";this.node.innerHTML=_6;if(Effect.Opacity){if(!this.effect){this.effect=new Effect.Opacity(this.node,{duration:0.2,to:1,from:0.5});}else{this.effect.cancel();this.effect.start({duration:0.2,to:1,from:0.5});}}this.addOnClick(this.node);gc.Util.execJS(this.node);}},onClick:function(_7){var _8=gc.event.getTarget(_7);if(_8){_8.blur();if(this.url&&_8.queryString){var _9=this.url;if(this.url.indexOf("?")<0){this.url+="?";}else{this.url+="&";}this.reload(this.url+_8.queryString);this.url=_9;}}}});
gc.initClass("gc.fx",true,{subject:null,opacityMax:1,opacityMin:0,opacityDelta:0.1,timeoutFunc:null,timeoutValue:100,timeoutStart:100,timeDelta:10,subjectDim:{},swingDelta:{x:null,y:null},swingDim:{w:null,h:null},getSubject:function(){if(typeof (this.subject)=="string"){this.subject=document.getElementById(this.subject);}return this.subject;},setSubject:function(e){if(typeof (e)=="string"){e=document.getElementById(e);}this.subject=e;},show:function(_2){if(_2){this.setSubject(_2);}var e=this.getSubject();if(e){e.style.display="block";e.style.visibility="visible";}},hide:function(_4){if(_4){this.setSubject(_4);}var e=this.getSubject();if(e){e.style.display="none";e.style.visibility="hidden";}},fadeIn:function(_6){if(_6){this.setSubject(_6);}this.setOpacityToLow();this.show();this.resetTimeout();this.doFade("in");},fadeOut:function(_7){if(_7){this.setSubject(_7);}this.setOpacityToHigh();this.resetTimeout();this.doFade("out");},setOpacityToLow:function(_8){if(_8){this.setSubject(_8);}
this.setOpacity(this.opacityMin);},setOpacityToHigh:function(_9){if(_9){this.setSubject(_9);}this.setOpacity(this.opacityMax);},swingIn:function(_a,_b){if(_b){this.setSubject(_b);}if(_a){this.setSwingType(_a);}else{var _c=this.getSwingType();if(!_c){this.setSwingType("h");}}this.setSwingDir("+");this.runSwing();},swingOut:function(_d,_e){if(_e){this.setSubject(_e);}if(_d){this.setSwingType(_d);}else{var _f=this.getSwingType();if(!_f){this.setSwingType("h");}}this.setSwingDir("-");this.runSwing();},runSwing:function(){this.getDim();this.getDimDelta();var _10=this.getSwingType();if(this.getSwingDir()=="+"){if(_10=="h"){this.swingDim={w:this.subjectDim.w,h:0};}else{if(_10=="w"){this.swingDim={w:0,h:this.subjectDim.h};}else{if(_10=="hw"||_10=="wh"){this.swingDim={w:0,h:0};}}}_10="+"+_10;}else{_10="-"+_10;this.swingDim={w:this.subjectDim.w,h:this.subjectDim.h};}this.resetTimeout();this.show();this.getSubject().style.overflow="hidden";this.doResize(_10);},getTimeout:function(){
return this.timeoutValue;},setTimeout:function(_11){if(_11<1){_11=1;}this.timeoutValue=_11;},resetTimeout:function(){this.timeoutValue=this.timeoutStart;this.clearTimeoutFunc();},clearTimeoutFunc:function(){window.clearTimeout(this.timeoutFunc);this.timeoutFunc=null;},getOpacityDelta:function(){return this.opacityDelta;},getOpacity:function(){var e=this.getSubject();if(e){return parseFloat(e.style.opacity);}else{return -1;}},setOpacity:function(_13){var e=this.getSubject();if(e){var _15=parseFloat(_13).toFixed(1);_15=(_15<0)?0:((_15>1)?1:_15);e.style.opacity=_15;e.style.MozOpacity=_15;if(gc.isIE()){var _16=parseInt(_15*100);e.style.zoom="1";e.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+_16+")";}}},doFade:function(_17){this.setTimeout(this.getTimeout()-this.timeDelta);this.subject.timeoutFunc=window.setTimeout(function(){var _18=gc.fx.getOpacity();if(_18!=-1&&_17=="in"){if(_18<gc.fx.opacityMax){_18+=gc.fx.getOpacityDelta();gc.fx.setOpacity(_18);gc.fx.doFade("in");
}else{gc.fx.setOpacityToHigh();gc.fx.clearTimeoutFunc();}}else{if(_18!=-1&&_17==="out"){if(_18>gc.fx.opacityMin){_18-=gc.fx.getOpacityDelta();gc.fx.setOpacity(_18);gc.fx.doFade("out");}else{gc.fx.hide();gc.fx.setOpacityToLow();gc.fx.clearTimeoutFunc();}}}},this.getTimeout());},getDim:function(_19){if(_19){this.setSubject(_19);}var _1a=this.getSubject();if(_1a){var tmp={d:_1a.style.display,v:_1a.style.visibility};with(_1a.style){visibility="hidden";display="block";}var _1c=parseInt(_1a.clientWidth-_1a.offsetLeft);var _1d=parseInt((_1a.scrollHeight<_1a.clientHeight?_1a.clientHeight:_1a.scrollHeight));if(gc.isIE()){_1c=parseInt(_1a.offsetWidth);_1d=parseInt(_1a.offsetHeight);}_1a.style.visibility=tmp.v;_1a.style.display=tmp.d;if(_1a.fx&&_1a.fx.w&&_1a.fx.h){_1c=_1a.fx.w;_1d=_1a.fx.h;}else{if(_1a.fx){_1a.fx.w=_1c;_1a.fx.h=_1d;}else{_1a.fx={w:_1c,h:_1d};}}this.subjectDim={w:_1c,h:_1d};}},getDimDelta:function(){var _1e=parseInt(this.subjectDim.w);var _1f=parseInt(this.subjectDim.h);
this.swingDelta={x:_1e/this.timeDelta,y:_1f/this.timeDelta};this.swingDelta.x=parseInt(this.swingDelta.x);this.swingDelta.y=parseInt(this.swingDelta.y);},getSwingDir:function(){var e=this.getSubject();if(e){if(!e.fx){e.fx={};}if(e.fx.swingDir){return e.fx.swingDir;}else{if(e.style.display=="none"||e.style.visibility=="hidden"){e.fx.swingDir="+";}return e.fx.swingDir;}}return false;},setSwingDir:function(dir){var e=this.getSubject();if(e){if(!e.fx){e.fx={};}e.fx.swingDir=dir;}},getSwingType:function(){var e=this.getSubject();if(e&&e.fx&&e.fx.swingType){return e.fx.swingType;}return false;},setSwingType:function(_24){var e=this.getSubject();if(e){if(!e.fx){e.fx={};}e.fx.swingType=_24;}},resize:function(_26){var e=this.getSubject();if(e){if(_26.w){e.style.width=parseInt(_26.w)+"px";}if(_26.h){e.style.height=parseInt(_26.h)+"px";}}},doResize:function(_28){this.setTimeout(this.getTimeout()-this.timeDelta);this.timeoutFunc=window.setTimeout(function(){var _29=gc.fx.swingDim;var _2a=false;
var _2b=false;var _2c={};if(_28=="+h"){_29.h+=gc.fx.swingDelta.y;_2a=(_29.h>=gc.fx.subjectDim.h);_2c=gc.fx.subjectDim;}else{if(_28=="+w"){_29.w+=gc.fx.swingDelta.x;_2a=(_29.w>=gc.fx.subjectDim.w);_2c=gc.fx.subjectDim;}else{if(_28=="+hw"||_28=="+wh"){_29.w+=gc.fx.swingDelta.x;_29.h+=gc.fx.swingDelta.y;_2a=(_29.h>=gc.fx.subjectDim.h||_29.w>=gc.fx.subjectDim.w);_2c=gc.fx.subjectDim;}else{if(_28=="-h"){_29.h-=gc.fx.swingDelta.y;_2a=(_29.h<=0);_2c={w:gc.fx.subjectDim.w,h:0};_2b=true;}else{if(_28=="-w"){_29.w-=gc.fx.swingDelta.x;_2a=(_29.w<=0);_2c={w:0,h:gc.fx.subjectDim.h};_2b=true;}else{if(_28=="-wh"||_28=="-hw"){_29.w-=gc.fx.swingDelta.x;_29.h-=gc.fx.swingDelta.y;_2a=(_29.w<=0);_2c={w:0,h:gc.fx.subjectDim.h};_2b=true;}else{gc.fx.clearTimeoutFunc();return false;}}}}}}if(_2a==false){gc.fx.swingDim=_29;gc.fx.resize(_29);gc.fx.doResize(_28);}else{gc.fx.resize(_2c);if(_2b==true){gc.fx.hide();}gc.fx.clearTimeoutFunc();}},this.getTimeout());}});
gc.initClass("gc.tree.Util",true,{reload:function(_1){if(gc.tree.Tree.instances[_1]){gc.tree.Tree.instances[_1].reload();}},onClick:function(_2,_3,_4,_5){if(gc.tree.Tree.instances[_2]){gc.tree.Tree.instances[_2].onClick(_3,_4,_5);}},onSelect:function(_6,_7,_8){if(gc.tree.Tree.instances[_6]){gc.tree.Tree.instances[_6].onSelect(_7,_8);}}});
gc.initClass("gc.tree.Tree",false,{event:null,name:null,url:null,opened:null,selectedNodeName:null,selectedParams:null,selectedItem:null,selectedItemToolbar:null,classNodeOpen:"gctree_node_open",classNodeClose:"gctree_node_close",classItem:"gctree_node_title",classSelectedItem:"gctree_node_title_selected",constructor:function(_1,_2){this.event=new gc.event.Custom(this);if(_1){this.name=_1;gc.tree.Tree.instances[this.name]=this;}this.url=_2;this.opened={};},reload:function(){var _3=document.getElementById("gctree_"+this.name+"_root");if(_3){_3.innerHTML="";_3.style.height="20px";_3.style.backgroundImage="url(\""+gc.baseUrl+"res/images/ajax-loader-small.gif\")";_3.gcTree=this;gc.net.XHR.newRequest(this.url,this.loadContent,_3,gc.net.Request.prototype.RESPONSE_TEXT,true);}},onClick:function(_4,_5,_6,_7){var _8=document.getElementById("gctree_"+this.name+"_"+_4+"_sub");var _9=document.getElementById("gctree_"+this.name+"_"+_4+"_node");if(_8&&_9){if(_8.style.display==""&&!_6&&!_7){
this.opened[_4]=false;_8.style.display="none";_9.className=this.classNodeClose;}else{this.opened[_4]=true;_9.className=this.classNodeOpen;_8.style.display="";if((_6||_8.innerHTML=="")&&this.url&&this.url!=""){_8.innerHTML="";_8.style.height="20px";_8.style.backgroundImage="url(\""+gc.baseUrl+"res/images/ajax-loader-small.gif\")";_8.gcTree=this;gc.net.XHR.newRequest(this.url+gc.Util.urlParams(_5),this.loadContent,_8,gc.net.Request.prototype.RESPONSE_TEXT,true);}}}},onSelect:function(_a,_b){var _c=document.getElementById("gctree_"+this.name+"_"+_a+"_title");var _d=document.getElementById("gctree_"+this.name+"_"+_a+"_toolbar");if(_c){if(this.selectedItem){this.selectedItem.className=this.classItem;}if(this.selectedItemToolbar){this.selectedItemToolbar.style.display="none";}_c.className=this.classSelectedItem;this.selectedNodeName=_a;this.selectedParams=_b;this.selectedItem=_c;if(_d){_d.style.display="";}this.selectedItemToolbar=_d;
this.event.trigger("onselect",{nodeName:_a,params:_b,selectedItem:this.selectedItem,selectedItemToolbar:this.selectedItemToolbar});}if(_b){this.onClick(_a,_b,false,true);}},loadContent:function(_e){if(gc.isIE7()){this.style.height="100%";}else{this.style.height="";}this.style.backgroundImage="";if(_e){this.innerHTML=_e;}if(this.gcTree){with(this.gcTree){selectedItem=document.getElementById("gctree_"+name+"_"+selectedNodeName+"_title");if(selectedNodeName&&selectedItem&&selectedItem.className!=classSelectedItem){selectedItemToolbar=null;onSelect(selectedNodeName,selectedParams);}}}}});gc.tree.Tree.instances={};
gc.initClass("gc.map.Notepad",false,{menu:null,parser:null,dataUrl:null,notepad:null,current:null,category:null,constructor:function(_1){this.menu=_1;this.parser=new OpenLayers.Format.GeoJSON();},init:function(_2){this.dataUrl=_2;this.loadNotepad();},onShow:function(){if(this.category){this.category.setVisible(true);}},onHide:function(){if(this.category){this.category.setVisible(false);}},onChangeNotepad:function(_3){this.notepad=_3;this.menu.sectionContent["notepad"]=null;if(this.menu.visibleSection=="notepad"){this.menu.visibleSection=null;this.menu.show("notepad");}this.checkOnNotepad();this.loadNotepad();},onLoadNotepad:function(_4){if(_4){var _5=this.parser.read(_4,"FeatureCollection");if(_5){var _6;this.notepad=new Array();for(var i=0;i<_5.length;++i){this.notepad[this.notepad.length]=_5[i].attributes.notepad_key;_5[i].layer=this.menu.map.markerManager.layer;_5[i].attributes.level=null;_5[i].data.level=null;_6=this.menu.map.markerManager.getCategory(_5[i].attributes.layer);
if(!_5[i].marker&&_6){icon=_6.icon.clone();icon.imageDiv.style.cursor="pointer";_5[i].lonlat=new OpenLayers.LonLat(_5[i].geometry.x,_5[i].geometry.y);_5[i].marker=new OpenLayers.Marker(_5[i].lonlat,icon);}}if(!this.category){this.category=this.menu.map.markerManager.addCategory(null,"intern___notepad");}this.category.setFeatures(_5);this.category.updateMarkers();}}},loadNotepad:function(){if(this.dataUrl){gc.net.XHR.newRequest(this.dataUrl,this.onLoadNotepad,this,gc.net.Request.prototype.RESPONSE_TEXT,true,null,true);}},checkOnNotepad:function(id){if(id){this.current=id;}if(this.current){if(this.isOnNotepad(this.current)){document.getElementById(this.menu.map.id+"_poi_toolbar_add_notepad").style.display="none";document.getElementById(this.menu.map.id+"_poi_toolbar_remove_notepad").style.display="";}else{document.getElementById(this.menu.map.id+"_poi_toolbar_add_notepad").style.display="";document.getElementById(this.menu.map.id+"_poi_toolbar_remove_notepad").style.display="none";}}
},isOnNotepad:function(id){if(this.notepad){for(var i=0;i<this.notepad.length;++i){if(this.notepad[i]==id){return true;}}}return false;}});
gc.initClass("gc.map.Menu",false,{map:null,menuTag:null,menuPanelTag:null,sections:null,sectionContent:null,visible:false,visibleSection:null,loadCount:null,search:null,notepad:null,constructor:function(_1){this.map=_1;this.loadCount=0;this.sections=new Object();this.sectionContent=new Object();this.search=new gc.map.Search(this);this.notepad=new gc.map.Notepad(this);},init:function(_2,_3){this.menuTag=document.getElementById(_2);this.menuPanelTag=document.getElementById(_3);},add:function(_4,_5){this.sections[_4]=_5;},startLoad:function(){++this.loadCount;this.menuPanelTag.parentNode.style.backgroundImage="url('"+gc.baseUrl+"res/images/ajax-loader-grey.gif')";},stopLoad:function(){if(this.loadCount>0){--this.loadCount;}if(this.loadCount==0){this.menuPanelTag.parentNode.style.backgroundImage="";}},switchVisible:function(_6){if(this.visible&&this.visibleSection==_6){this.hide();}else{this.show(_6);}},show:function(_7){
if(this.menuTag&&this.menuPanelTag&&this.sections[_7]&&this.menuPanelTag.parentNode.style.backgroundImage==""){if(this.visibleSection){if(this[this.visibleSection]&&this[this.visibleSection].onHide){this[this.visibleSection].onHide();}this.sectionContent[this.visibleSection]=this.menuPanelTag.innerHTML;this.visibleSection=null;}this.visible=true;this.menuTag.style.display="";if(this.sectionContent[_7]){this.menuPanelTag.innerHTML=this.sectionContent[_7];this.visibleSection=_7;if(this[this.visibleSection]&&this[this.visibleSection].onShow){this[this.visibleSection].onShow();}}else{this.menuPanelTag.innerHTML="";this.startLoad();gc.net.XHR.newRequest(this.sections[_7],this.onContentLoad,this,gc.net.Request.prototype.RESPONSE_TEXT,true,null,true);}}},hide:function(){if(this.menuTag&&this.menuPanelTag&&this.menuPanelTag.parentNode.style.backgroundImage==""){if(this.visibleSection){if(this[this.visibleSection]&&this[this.visibleSection].onHide){this[this.visibleSection].onHide();}
this.sectionContent[this.visibleSection]=this.menuPanelTag.innerHTML;this.visibleSection=null;}this.visible=false;this.menuTag.style.display="none";this.menuPanelTag.innerHTML="";this.stopLoad();}},onContentLoad:function(_8,_9){if(this.menuTag&&this.menuPanelTag){this.menuPanelTag.innerHTML=_8;gc.Util.execJS(this.menuPanelTag);this.stopLoad();}for(var _a in this.sections){if(this.sections[_a]==_9){this.visibleSection=_a;this.sectionContent[_a]=_8;if(this[this.visibleSection]&&this[this.visibleSection].onShow){this[this.visibleSection].onShow();}break;}}}});
gc.initClass("gc.map.Legend",true,{setState:function(_1,_2,_3,_4){var _5=_2.split(",");if(!_3||_4){var _6;if(_4){_6=document.getElementsByName(_1+"_legend");}else{_6=document.getElementsByName(_1+"_legend_grp");}for(var i=0;i<_6.length;++i){for(var j=0;j<_5.length;++j){if(_6[i].value&&gc.Util.inArray(_6[i].value.split(","),_5[j])){_6[i].checked=_3;}}}}this.updateMap(_1);},setStateGrp:function(_9,_a,_b){this.setState(_9,_a,_b,true);},updateMap:function(_c){var _d=gc.Map.instances[_c];if(_d){var _e=document.getElementsByName(_c+"_legend");var _f=_d.map.layers;for(var i=0;i<_f.length;++i){if(_f[i].CLASS_NAME.indexOf("WMS")>=0){if(!_f[i].origLayers){_f[i].origLayers=_f[i].params.LAYERS.split(",");_f[i].origVisible=_f[i].getVisibility();}var tmp=[];var _12;for(var j=0;j<_f[i].origLayers.length;++j){_12=false;for(var k=0;k<_e.length;++k){if(_e[k].value&&gc.Util.inArray(_e[k].value.split(","),_f[i].origLayers[j])){_12=true;if(_e[k].checked&&!gc.Util.inArray(tmp,_f[i].origLayers[j])){
tmp[tmp.length]=_f[i].origLayers[j];}}}if(!_12){tmp[tmp.length]=_f[i].origLayers[j];}}tmp=tmp.join(",");if(_f[i].params.LAYERS!=tmp){_f[i].params.LAYERS=tmp;_f[i].setVisibility(tmp!=""&&_f[i].origVisible);_f[i].redraw();}}}}}});
gc.initClass("gc.map.Frame",false,{map:null,layer:null,geom:null,width:null,height:null,constructor:function(_1,_2,_3){this.map=_1;this.layer=new OpenLayers.Layer.Vector("Highlight Layer");with(this.layer.styleMap.styles["default"].defaultStyle){strokeWidth=1;strokeColor="#ff0000";fillColor="#707070";fillOpacity=0.2;}this.map.map.addLayer(this.layer);this.map.map.events.register("move",this,this.refresh);this.set(_2,_3);},set:function(_4,_5){this.width=_4;this.height=_5;if(!this.geom){this.geom=new OpenLayers.Geometry.Polygon(new OpenLayers.Geometry.LinearRing());this.layer.addFeatures([new OpenLayers.Feature.Vector(this.geom)]);}this.refresh();},refresh:function(_6){try{if(this.geom&&this.geom.components[0]){with(this.geom.components[0]){var i=0;while(components.length<5&&i<5){addComponent(new OpenLayers.Geometry.Point(0,i++));}components[0].x=this.map.getCenterX()-this.width/2;components[0].y=this.map.getCenterY()-this.height/2;components[1].x=components[0].x;
components[1].y=components[0].y+this.height;components[2].x=components[0].x+this.width;components[2].y=components[0].y+this.height;components[3].x=components[0].x+this.width;components[3].y=components[0].y;components[4].x=components[0].x;components[4].y=components[0].y;for(i=0;i<components.length;++i){components[i].calculateBounds();}calculateBounds();this.geom.calculateBounds();var p1=this.map.map.getViewPortPxFromLonLat(new OpenLayers.LonLat(components[0].x,components[0].y));var p2=this.map.map.getViewPortPxFromLonLat(new OpenLayers.LonLat(components[2].x,components[2].y));this.layer.setVisibility(Math.abs(p1.x-p2.x)>4&&Math.abs(p1.y-p2.y)>4);this.layer.redraw();}}}catch(exc){if(exc&&window.console&&window.console.error){window.console.error(exc);}}}});
gc.initClass("gc.map.MarkerCategory",false,{markerManager:null,visible:false,id:null,title:null,subCategories:null,features:null,icon:null,dataUrl:null,detailUrl:null,levels:null,isRequested:false,constructor:function(_1,id,_3){this.markerManager=_1;this.id=id;this.title=_3;this.subCategories=new Array();this.features=null;},setIcon:function(_4,_5,_6,_7,_8){if(typeof _4=="Object"){this.icon=_4;}else{this.icon=new OpenLayers.Icon(_4,new OpenLayers.Size(_5,_6),(_7||_8)?(new OpenLayers.Pixel(_7,_8)):null);}},addSubCategory:function(_9){if(!this.subCategories){this.subCategories=[_9];}else{this.subCategories.push(_9);}},getSubCategory:function(id){var _b;if(this.subCategories&&this.subCategories.length>0){for(var i=0;i<this.subCategories.length;++i){if(this.subCategories[i].id==id){return this.subCategories[i];}else{_b=this.subCategories[i].getSubCategory(id);if(_b){return _b;}}}}},getVisible:function(){return this.visible;},setVisible:function(_d,_e){this.visible=_d;
if(_e&&this.subCategories&&this.subCategories.length>0){for(var i=0;i<this.subCategories.length;++i){this.subCategories[i].setVisible(_d,_e);}}this.updateMarkers();},addFeature:function(x,y,_12,url){if(!this.features){this.features=new Array();}var _14=new OpenLayers.Feature.Vector();_14.geometry=new OpenLayers.Geometry.Point(x,y);_14.attributes.name=_12;if(url){_14.attributes.detailUrl=url;}this.features.push(_14);this.updateMarkers();},clearFeatures:function(){if(this.features){for(var i=0;i<this.features.length;++i){if(this.features[i].data.visible){this.features[i].data.visible=false;try{this.markerManager.layer.removeMarker(this.features[i].marker);}catch(exc){}}}this.features=null;}},loadFeatures:function(_16){var _17=new OpenLayers.Format.GeoJSON();if(_16){var _18=_17.read(_16,"FeatureCollection");if(_18){this.features=_18;this.isRequested=false;this.updateMarkers();}}else{this.isRequested=false;}},setFeatures:function(_19){this.clearFeatures();this.features=_19;
},getFeatures:function(x,y,_1c){if(!_1c){_1c=new Array();}if(this.features){var px;var x1;var x2;var y1;var y2;for(var i=this.features.length-1;i>=0;--i){if(this.features[i].data.visible&&this.features[i].lonlat&&this.features[i].marker&&this.features[i].marker.icon){px=this.markerManager.layer.getViewPortPxFromLonLat(this.features[i].lonlat);px=this.markerManager.layer.map.getLayerPxFromViewPortPx(px);x1=px.x+this.features[i].marker.icon.offset.x;x2=x1+this.features[i].marker.icon.size.w;y1=px.y+this.features[i].marker.icon.offset.y;y2=y1+this.features[i].marker.icon.size.h;if(x1<=x&&x<=x2&&y1<=y&&y<=y2){_1c.push(this.features[i]);}}}}if(this.subCategories&&this.subCategories.length>0){for(var i=0;i<this.subCategories.length;++i){this.subCategories[i].getFeatures(x,y,_1c);}}return _1c;},loadDetails:function(id){if(this.detailUrl){var _24=new gc.net.Request(this.detailUrl+id,this.markerManager.onDetails,this.markerManager,gc.net.Request.prototype.RESPONSE_TEXT,false,null);
_24.callbackOnStartFunction=this.markerManager.onDetailStartLoad;_24.callbackOnStartObject=this.markerManager;gc.net.XHR.addRequest(_24,true);}},updateMarkers:function(){if(this.markerManager){if(this.visible){if(this.dataUrl&&!this.features){if(!this.isRequested){this.isRequested=true;gc.net.XHR.newRequest(this.dataUrl,this.loadFeatures,this,gc.net.Request.prototype.RESPONSE_TEXT);}}else{if(this.features){var _25=this.markerManager.layer.map.getExtent();var _26=_25.getWidth();var _27=_25.getHeight();_25.left=_25.left-_26;_25.right=_25.right+_26;_25.bottom=_25.bottom-_27;_25.top=_25.top+_27;var _28;for(var i=0;i<this.features.length;++i){this.features[i].layer=this.markerManager.layer;this.features[i].attributes.layer=this.id;if(!this.features[i].marker){_28=this.icon.clone();_28.imageDiv.style.cursor="pointer";this.features[i].lonlat=new OpenLayers.LonLat(this.features[i].geometry.x,this.features[i].geometry.y);
this.features[i].marker=new OpenLayers.Marker(this.features[i].lonlat,_28);}if(_25.containsLonLat(this.features[i].lonlat)&&(!this.features[i].data.level||this.features[i].data.level<=this.markerManager.layer.map.zoom)){if(!this.features[i].data.visible){this.features[i].data.visible=true;this.markerManager.layer.addMarker(this.features[i].marker);}}else{if(this.features[i].data.visible){this.features[i].data.visible=false;try{this.markerManager.layer.removeMarker(this.features[i].marker);}catch(exc){}}}}}}}else{if(this.features){for(var i=0;i<this.features.length;++i){if(this.features[i].data.visible){this.features[i].data.visible=false;try{this.markerManager.layer.removeMarker(this.features[i].marker);}catch(exc){}}}}}}if(this.subCategories&&this.subCategories.length>0){for(var i=0;i<this.subCategories.length;++i){this.subCategories[i].updateMarkers();}}}});
gc.initClass("gc.Map",false,{id:null,name:null,baseZoom:null,map:null,menu:null,markerManager:null,edit:null,frame:null,tooltipTag:null,clickHandler:null,onClickCoordHandler:null,geocoder:null,constructor:function(_1,id){if(_1){this.name=_1;gc.Map.instances[this.name]=this;}this.id=id;this.menu=new gc.map.Menu(this);this.onClickCoordinatesIgnore=false;this.onClickCoordHandler=new Array();OpenLayers.Lang.setCode("de");},initMap:function(id,x,y,_6,_7,_8,_9,_a){this.baseZoom={x:x,y:y,zoom:_6};this.menu.search.init(_7,_8);this.map=new OpenLayers.Map(id,_9);this.clickHandler=new OpenLayers.Handler.Click(this,{"click":this.doOnClickCoordinates},{"double":false,"stopDouble":false});this.clickHandler.activate();for(var i=0;i<_a.length;++i){if(eval("OpenLayers.Control."+_a[i])){var _c=eval("new OpenLayers.Control."+_a[i]+"()");switch(_a[i]){case "LayerSwitcher":_c.activeColor="#F2F2F2";_c.loadContents2=_c.loadContents;_c.minimizeControl2=_c.minimizeControl;
_c.maximizeControl2=_c.maximizeControl;_c.loadContents=function(){this.loadContents2();this.div.style.color="#4C4C4C";this.div.style.backgroundColor="#FAFAFA";this.div.style.opacity=0.95;this.div.style.borderWidth="0px";this.div.style.borderStyle="solid";this.div.style.borderColor="#DDDDDD #999999 #999999 #DDDDDD";};_c.minimizeControl=function(e){this.div.style.borderWidth="0px";this.minimizeControl2(e);};_c.maximizeControl=function(e){this.div.style.borderWidth="1px 0px 1px 1px";this.maximizeControl2(e);};break;case "Navigation":_c.wheelChange=function(_f,_10){var _11=this.map.getZoom()+_10;if(this.map.isValidZoomLevel(_11)){this.map.zoomTo(_11);}};break;}this.map.addControl(_c);}}},initMarkerManager:function(url,_13,_14,_15){this.markerManager=new gc.map.MarkerManager(this.map);this.markerManager.defaultVisible=_13;if(_14){this.markerManager.initTooltip(_14);}if(_15){this.markerManager.initDetail(_15);}OpenLayers.Util.alphaHack=function(){return false;};if(url&&url!=""){
gc.net.XHR.newRequest(url,this.markerManager.loadCategories,this.markerManager,gc.net.Request.prototype.RESPONSE_TEXT,true);}},initEditing:function(_16,_17,_18){if(!this.edit){this.edit=new gc.map.Edit(this,_16,_17,_18);}},setFrame:function(_19,_1a,_1b){if(this.frame){this.frame.set(_19,_1a);}else{this.frame=new gc.map.Frame(this,_19,_1a);}if(_1b){var _1c=this.map.getZoomForExtent(new OpenLayers.Bounds(this.getCenterX()-_19/2,this.getCenterY()-_1a/2,this.getCenterX()+_19/2,this.getCenterY()+_1a/2));if(_1c<this.getZoom()){this.setZoom(_1c);}}},addLayerTMS:function(_1d,_1e,url,_20){var _21=(!this.map.layers||this.map.layers.length==0);var _22={layername:_1e,type:"png",isBaseLayer:_20};if(!_20&&gc.isIE()&&!gc.isIE7()){_22["type"]="gif";}var tms=new OpenLayers.Layer.TMS(_1d,url,_22);tms.displayOutsideMaxExtent=true;this.map.addLayer(tms);if(_21){this.map.setCenter(new OpenLayers.LonLat(this.baseZoom.x,this.baseZoom.y),this.baseZoom.zoom);}
},addLayerWMS:function(_24,_25,url,_27,_28,_29,_2a){var _2b=(!this.map.layers||this.map.layers.length==0);if(!_2a){if(!_27&&gc.isIE6()){_2a="image/gif";}else{_2a="image/png";}}var _2c={transparent:(_27)?"false":"true",layers:_25,format:_2a};var _2d={projection:this.map.projection,units:this.map.units,isBaseLayer:_27};if(_28){_2d["singleTile"]=true;_2d["ratio"]=1.5;}if(!_27&&gc.isIE6()&&_2a.indexOf("png")>=0){_2d["alpha"]=true;}var wms=new OpenLayers.Layer.WMS(_24,url,_2c,_2d);wms.displayOutsideMaxExtent=true;if(_29){wms.gutter=_29;}this.map.addLayer(wms);if(_2b){this.map.setCenter(new OpenLayers.LonLat(this.baseZoom.x,this.baseZoom.y),this.baseZoom.zoom);}},addLayerGoogle:function(_2f,_30){if(!_2f){_2f="Google Maps";}var _31=(!this.map.layers||this.map.layers.length==0);var _32=new OpenLayers.Layer.Google(_2f,{type:G_NORMAL_MAP,sphericalMercator:this.map.projection==gc.proj.mercator.srs,isBaseLayer:true});this.map.addLayer(_32);try{if(!_30){_32.mapObject.addMapType(G_NORMAL_MAP);
_32.mapObject.addMapType(G_SATELLITE_MAP);_32.mapObject.addMapType(G_HYBRID_MAP);_32.mapObject.addMapType(G_PHYSICAL_MAP);_32.mapObject.addControl(new GHierarchicalMapTypeControl());var _33=_32.div.lastChild;_32.div.removeChild(_33);_32.pane.appendChild(_33);}}catch(e){}if(_31){this.map.setCenter(new OpenLayers.LonLat(this.baseZoom.x,this.baseZoom.y),this.baseZoom.zoom);}},addLayerOSM:function(_34,_35,url){try{var _37=(!this.map.layers||this.map.layers.length==0);if(!_34){_34="OpenStreetMap";}if(!_35){_35="Mapnik";}if(OpenLayers.Layer.OSM&&OpenLayers.Layer.OSM[_35]){var _38=new OpenLayers.Layer.OSM[_35](_34,{},url);this.map.addLayer(_38);if(_37){this.map.setCenter(new OpenLayers.LonLat(this.baseZoom.x,this.baseZoom.y),this.baseZoom.zoom);}}}catch(e){gc.console.error(e);}},register:function(_39,obj,_3b){this.map.events.register(_39,obj,_3b);},unregister:function(_3c,obj,_3e){this.map.events.unregister(_3c,obj,_3e);},loadDetails:function(cat,id,_41,_42,_43){if(this.markerManager){
var _44=this.markerManager.getCategory(cat);if(_44){this.markerManager.setHighlight(_41,_42);_44.loadDetails(id);}else{this.markerManager.setHighlight(null,null);this.markerManager.onDetails();return;}}this.map.setCenter(new OpenLayers.LonLat(_41,_42),(this.map.getZoom()<_43)?_43:null);},reload:function(){if(this.map.baseLayer){this.map.baseLayer.redraw();}},getProjection:function(){return this.map.projection;},getCenterX:function(){return this.map.center.lon;},getCenterY:function(){return this.map.center.lat;},setCenter:function(x,y,_47){var tmp=new OpenLayers.LonLat();tmp.lon=x;tmp.lat=y;this.map.setCenter(tmp,null,true);if(_47){this.map.zoomTo(_47);}if(this.markerManager){this.markerManager.updateMarkers();}if(this.map.baseLayer&&this.map.baseLayer.singleTile){this.map.baseLayer.redraw();}},getZoom:function(){return this.map.getZoom();},setZoom:function(_49){var ret=this.map.zoomTo(_49);if(this.markerManager){this.markerManager.updateMarkers();}return ret;
},zoomToExtent:function(_4b,_4c,_4d,_4e){if(_4b==_4d&&_4c==_4e){this.setCenter(_4b,_4c,Math.min(15,this.map.maxZoomLevel-1));}else{this.map.zoomToExtent(new OpenLayers.Bounds(_4b,_4c,_4d,_4e));}},getLayerVisible:function(_4f){for(var i=0;i<this.map.layers.length;i++){if(this.map.layers[i].name==_4f){return this.map.layers[i].getVisibility();}}return false;},setLayerVisible:function(_51,_52){for(var i=0;i<this.map.layers.length;i++){if(this.map.layers[i].name==_51){if(this.map.layers[i].isBaseLayer){if(_52){this.map.setBaseLayer(this.map.layers[i]);}}else{this.map.layers[i].setVisibility(_52);}}}},geocode:function(_54,_55,_56){if(GClientGeocoder){if(!this.geocoder){this.geocoder=new GClientGeocoder(new GGeocodeCache());}if(_56){if(this.map.projection==gc.proj.mercator.srs){this.geocoder.getLocations(_54,function(_57){if(_57&&_57.Placemark){for(var i=0;i<_57.Placemark.length;++i){_57.Placemark[i].Point.coordinates[0]=gc.proj.mercator.toX(_57.Placemark[i].Point.coordinates[0]);
_57.Placemark[i].Point.coordinates[1]=gc.proj.mercator.toY(_57.Placemark[i].Point.coordinates[1]);_57.Placemark[i].x=_57.Placemark[i].Point.coordinates[0];_57.Placemark[i].y=_57.Placemark[i].Point.coordinates[1];}}_55.apply(this,[_57]);});}else{this.geocoder.getLocations(_54,_55);}}else{if(this.map.projection==gc.proj.mercator.srs){this.geocoder.getLatLng(_54,function(_59){if(_59){_59.x=gc.proj.mercator.toX(_59.x);_59.y=gc.proj.mercator.toY(_59.y);}_55.apply(this,[_59]);});}else{this.geocoder.getLatLng(_54,_55);}}return true;}else{return false;}},addOnClickCoordinates:function(_5a,_5b){var i=this.onClickCoordHandler.length;this.onClickCoordHandler[i]={obj:_5b,func:_5a};},removeOnClickCoordinates:function(_5d,_5e){for(var i=0;i<this.onClickCoordHandler.length;i++){if(this.onClickCoordHandler[i].func==_5d&&this.onClickCoordHandler[i].obj==_5e){this.onClickCoordHandler.splice(i,1);--i;}}},doOnClickCoordinates:function(_60){try{var tmp=this.map.getLonLatFromViewPortPx(_60.xy);
for(var i=0;i<this.onClickCoordHandler.length;++i){try{if(this.onClickCoordHandler[i]){this.onClickCoordHandler[i].func.call(this.onClickCoordHandler[i].obj,tmp.lon,tmp.lat,this.getProjection());}}catch(exc){gc.console.error(exc);}}}catch(exc){gc.console.error(exc);}}});if(gc.Map&&!gc.Map.instances){gc.Map.instances={};}

gc.initClass("gc.map.Util",true,{setVisibleMenuCategory:function(_1,_2,_3){gc.map.Util.setVisibleSection(_2,_3);gc.Map.instances[_1].markerManager.setCategoryVisible(_2,_3,true);},setVisibleSection:function(_4,_5){if(_5){document.getElementById("mapcat_"+_4).style.display="none";document.getElementById("mapcat_"+_4+"_act").style.display="";}else{document.getElementById("mapcat_"+_4).style.display="";document.getElementById("mapcat_"+_4+"_act").style.display="none";}},saveToForm:function(_6,_7){var _8=gc.Map.instances[_6];if(_8){gc.Util.setFormValue(_7,"zoomlevel",_8.getZoom());gc.Util.setFormValue(_7,"center_x",_8.getCenterX());gc.Util.setFormValue(_7,"center_y",_8.getCenterY());gc.Util.setFormValue(_7,"config::ZOOMLEVEL",_8.getZoom());gc.Util.setFormValue(_7,"config::CENTER_X",_8.getCenterX());gc.Util.setFormValue(_7,"config::CENTER_Y",_8.getCenterY());}},changeNotepad:function(_9,_a){var _b=gc.Map.instances[_9];
gc.net.XHR.newRequest(_a,_b.menu.notepad.onChangeNotepad,_b.menu.notepad,gc.net.Request.prototype.RESPONSE_JSON,true,null,true);}});
gc.initClass("gc.map.MarkerManager",false,{index:null,defaultVisible:false,map:null,clickHandler:null,layer:null,categories:null,layerHighlight:null,markerHighlight:null,tooltipTag:null,tooltipFeatures:null,tooltipFixed:false,detailTag:null,constructor:function(_1){this.index=gc.map.MarkerManager.instances.length;gc.map.MarkerManager.instances[this.index]=this;this.setMap(_1);this.categories=new Array();this.markerHighlight=new OpenLayers.Marker(null,new OpenLayers.Icon(gc.getScriptLocation()+"../icons/marker.gif",new OpenLayers.Size(29,29)));},setMap:function(_2){try{if(this.map){try{this.map.events.unregister("moveend",this,this.updateMarkers);}catch(exc){}try{this.map.events.unregister("zoomend",this,this.onTooltipHide);}catch(exc){}try{this.clickHandler=new OpenLayers.Handler.Click(this,{"click":this.doOnClickCoordinates},{"double":false,"stopDouble":false});this.clickHandler.activate();}catch(exc){}if(this.layer){this.map.removeLayer(this.layer);}if(this.layerHighlight){
this.map.removeLayer(this.layerHighlight);}}}catch(exc){}this.map=_2;if(this.map){if(!this.layer){this.layer=new OpenLayers.Layer.Markers("",{displayInLayerSwitcher:false});this.layer.markerManager=this;}this.map.addLayer(this.layer);if(!this.layerHighlight){this.layerHighlight=new OpenLayers.Layer.Markers("",{displayInLayerSwitcher:false});}this.map.addLayer(this.layerHighlight);this.map.setLayerZIndex(this.layer,1001);this.map.setLayerZIndex(this.layerHighlight,1002);this.map.events.register("moveend",this,this.updateMarkers);this.map.events.register("zoomend",this,this.onTooltipHide);this.clickHandler=new OpenLayers.Handler.Click(this.layer,{"click":this.onClick},{"double":false,"stopDouble":false});this.clickHandler.activate();}},initTooltip:function(id){this.tooltipTag=document.getElementById(id);if(this.tooltipTag&&this.layer){this.layer.events.register("mousemove",this,this.onTooltip);this.layer.events.register("mouseout",this,this.onTooltipHide);}},initDetail:function(id){
this.detailTag=document.getElementById(id);},loadCategories:function(_5){if(_5){var _6=JSON.parse(_5);if(_6){this.loadChildCategories(null,_6);this.updateMarkers();}}},loadChildCategories:function(_7,_8){for(var i=0;i<_8.length;++i){this.addCategory(_7,_8[i].id,_8[i].title,(_8[i].icon)?_8[i].icon.src:null,(_8[i].icon)?_8[i].icon.width:null,(_8[i].icon)?_8[i].icon.height:null,_8[i].dataUrl,_8[i].detailUrl,[]);if(_8[i].items&&_8[i].items.length>0){this.loadChildCategories(_8[i].id,_8[i].items);}}},addCategory:function(_a,id,_c,_d,_e,_f,_10,_11,_12){var _13;if(_a){_13=this.getCategory(_a);if(!_13){_13=new gc.map.MarkerCategory(this,_a);_13.visible=this.defaultVisible;this.categories.push(_13);}}var _14=new gc.map.MarkerCategory(this,id,_c);_14.dataUrl=_10;_14.detailUrl=_11;_14.levels=_12;if(_d){_14.setIcon(_d,_e,_f);}_14.visible=this.defaultVisible;if(_13){_13.subCategories.push(_14);}else{this.categories.push(_14);}return _14;},getCategory:function(id,_16){var tmp;
for(var i=0;i<this.categories.length;++i){if(this.categories[i].id==id){return this.categories[i];}else{tmp=this.categories[i].getSubCategory(id);if(tmp){return tmp;}}}return null;},setCategoryVisible:function(id,_1a,_1b){var _1c=this.getCategory(id);if(_1c){_1c.setVisible(_1a,_1b);}},setAllVisible:function(_1d){for(var i=0;i<this.categories.length;++i){this.categories[i].setAllVisible(_1d);}this.updateMarkers();},getFeatures:function(x,y){var _21=new Array();for(var i=0;i<this.categories.length;++i){this.categories[i].getFeatures(x,y,_21);}return _21;},setHighlight:function(x,y){if(this.layer&&this.markerHighlight){try{this.layer.removeMarker(this.markerHighlight);}catch(exc){}if(x&&y){if(this.markerHighlight.lonlat){this.markerHighlight.lonlat.lon=x;this.markerHighlight.lonlat.lat=y;}else{this.markerHighlight.lonlat=new OpenLayers.LonLat(x,y);}this.layer.addMarker(this.markerHighlight);}}},updateMarkers:function(){if(this.layer){for(var i=this.categories.length-1;i>=0;--i){
this.categories[i].updateMarkers();}}},onTooltip:function(_26){if(this.tooltipTag&&this.layer&&!this.tooltipFixed){var _27=gc.event.getTarget(_26).parentNode;var px=new OpenLayers.Pixel(gc.event.getOffsetX(_26)+parseFloat(_27.style.left),gc.event.getOffsetY(_26)+parseFloat(_27.style.top));var _29=this.getFeatures(px.x,px.y);px=this.map.getViewPortPxFromLayerPx(px);if(_29&&_29.length>0){this.tooltipFeatures=_29;var tmp="";var _2b,_2c;var _2d={};for(var i=0;i<_29.length;++i){if(_29[i].attributes.name&&_29[i].attributes.name!=""&&!_2d[_29[i].attributes.name]){_2b=_29[i].attributes.name;if(_29.length>1){_2c="gc.map.MarkerManager.instances["+this.index+"]";_2b="<span onclick=\""+_2c+".onClickDetail("+_2c+".tooltipFeatures["+i+"]);\""+" style=\"cursor:pointer;\">"+_2b+"</span>";}tmp+="<div style=\"padding: 2px 0px;\">"+_2b+"</div>";_2d[_29[i].attributes.name]=1;}}this.tooltipTag.innerHTML=tmp;if(tmp!=""){if(this.tooltipTag.style.position=="absolute"){
this.tooltipTag.style.left=(px.x+10)+"px";this.tooltipTag.style.top=(px.y+10)+"px";}this.tooltipTag.style.display="";}else{this.onTooltipHide();}}else{this.onTooltipHide();}}},onTooltipHide:function(_2f){if(this.tooltipTag&&!this.tooltipFixed){this.tooltipTag.style.display="none";}},onDetailStartLoad:function(){this.onDetails();this.detailTag.innerHTML="";this.detailTag.style.backgroundImage="url('"+gc.baseUrl+"res/images/ajax-loader-grey.gif')";this.detailTag.style.height="64px";},onDetails:function(_30){if(this.detailTag){if(!_30){_30="";}this.detailTag.innerHTML=_30;this.detailTag.style.backgroundImage="";this.detailTag.style.height="";gc.Util.execJS(this.detailTag);}},onClick:function(_31){this.markerManager.tooltipFixed=false;var _32=gc.event.getTarget(_31).parentNode;var px=new OpenLayers.Pixel(gc.event.getOffsetX(_31)+parseFloat(_32.style.left),gc.event.getOffsetY(_31)+parseFloat(_32.style.top));var _34=this.markerManager.getFeatures(px.x,px.y);if(_34){if(_34.length==1){
this.markerManager.onClickDetail(_34[0]);}if(_34.length>1){this.markerManager.onTooltip(_31);this.markerManager.tooltipFixed=true;}}this.markerManager.onTooltip(_31);},onClickDetail:function(_35){this.tooltipFixed=false;this.onTooltipHide();if(_35&&_35.marker){var cat;if(_35.attributes.layer){cat=this.getCategory(_35.attributes.layer);}if(_35.marker.lonlat){this.map.setCenter(_35.marker.lonlat,null,true);this.setHighlight(_35.lonlat.lon,_35.lonlat.lat);}if(_35.attributes.detailUrl){document.location=_35.attributes.detailUrl;}else{if(cat){cat.loadDetails(_35.fid);}}}}});if(!gc.map.MarkerManager.instances){gc.map.MarkerManager.instances=[];}
gc.initClass("gc.map.Edit",false,{map:null,layer:null,ctrlModifyFeature:null,style:null,styleNames:null,constructor:function(_1,_2,_3,_4){this.map=_1;if(_2){this.styleNames=_2;}else{this.styleNames=["fillColor","strokeColor","strokeWidth"];}if(!_3){_3=["polygon","line","point"];}if(!_4){_4=["delete","editvertex","translate"];}this.layer=new OpenLayers.Layer.Vector("Tracking Layer");this.layer.styleMap.styles["default"].defaultStyle.strokeWidth=2;this.layer.events.register("beforefeaturemodified",this,this.beforeFeatureModified);this.layer.events.register("afterfeaturemodified",this,this.afterFeatureModified);this.map.map.addLayer(this.layer);this.afterFeatureModified();var _5;var _6=new OpenLayers.Control.Panel({displayClass:"olControlEditingToolbar"});for(var i=0;i<_4.length;i++){_5=null;if(_4[i]=="delete"){_5=new OpenLayers.Control.SelectFeature(this.layer,{displayClass:"olControlRemoveFeature",title:"Geometrie l\xf6schen"});_5.select=function(_8){this.layer.removeFeatures(_8);};
}else{if(_4[i]=="editvertex"){_5=new OpenLayers.Control.ModifyFeature(this.layer,{displayClass:"olControlModifyFeature",title:"St\xfctzpunkte bearbeiten"});this.ctrlModifyFeature=_5;}else{if(_4[i]=="translate"||_4[i]=="drag"){_5=new OpenLayers.Control.DragFeature(this.layer,{displayClass:"olControlDragFeature",title:"Geometrie verschieben"});}}}if(_5){_6.addControls(_5);}}_5=[];for(var i=0;i<_3.length;++i){if(_3[i]=="point"){_5[_5.length]=new OpenLayers.Control.DrawFeature(this.layer,OpenLayers.Handler.Point,{displayClass:"olControlDrawFeaturePoint",title:"Punkt erfassen"});}else{if(_3[i]=="line"||_3[i]=="polyline"||_3[i]=="path"){_5[_5.length]=new OpenLayers.Control.DrawFeature(this.layer,OpenLayers.Handler.Path,{displayClass:"olControlDrawFeaturePath",title:"Linie erfassen"});}else{if(_3[i]=="poly"||_3[i]=="polygon"){_5[_5.length]=new OpenLayers.Control.DrawFeature(this.layer,OpenLayers.Handler.Polygon,{displayClass:"olControlDrawFeaturePolygon",title:"Fl\xe4che erfassen"});}else{
if(_3[i]=="rect"||_3[i]=="rectangle"){customHandlerOptions={sides:4,irregular:true};_5[_5.length]=new OpenLayers.Control.DrawFeature(this.layer,OpenLayers.Handler.RegularPolygon,{handlerOptions:customHandlerOptions,displayClass:"olControlDrawFeaturePolygon",title:"Rechteck erfassen"});}}}}}for(var i=0;i<_5.length;i++){_5[i].featureAdded=function(_9){_9.state=OpenLayers.State.INSERT;_9.style={};with(this.layer.styleMap.styles["default"]){for(var _a in defaultStyle){_9.style[_a]=defaultStyle[_a];}}};}_6.addControls(_5);_5=new OpenLayers.Control.Navigation({title:"Kartenausschnitt verschieben"});_6.addControls(_5);this.map.map.addControl(_6);_6.activateControl(_5);},getFeatureCount:function(){if(this.layer&&this.layer.features){return this.layer.features.length;}return 0;},writeWkt:function(_b){if(this.ctrlModifyFeature){try{this.ctrlModifyFeature.unselectFeature(this.ctrlModifyFeature);}catch(exc){gc.console.error(exc);}}var _c=new OpenLayers.Format.WKT();var _d=[];var _e;var _f;
if(this.layer&&this.layer.features){for(var i=0;i<this.layer.features.length;++i){if(this.layer.features[i].style){_e=this.layer.features[i].style;}else{_e=this.layer.styleMap.styles["default"].defaultStyle;}_f=_c.write(this.layer.features[i]);if(_b){_f+=";"+_e["fillColor"]+";"+parseInt(_e["fillOpacity"]*100)+";"+_e["strokeColor"]+";"+_e["strokeWidth"];}_d[_d.length]=_f;}}return _d.join("|");},readWkt:function(_11,_12,_13){var wkt=new OpenLayers.Format.WKT();var _15;var _16;if(typeof _11=="string"){if(!_13){this.layer.destroyFeatures();}_11=_11.split("|");for(var i=0;i<_11.length;++i){if(typeof _11[i]=="string"){try{_15=_11[i].split(";");if(_15.length>0){_16=wkt.read(_15[0]);if(_16){_16.style={};with(this.layer.styleMap.styles["default"]){for(var j in defaultStyle){_16.style[j]=defaultStyle[j];}}if(_15.length>1){_16.style["fillColor"]=_15[1];}if(_15.length>2){try{_16.style["fillOpacity"]=parseFloat(_15[2])*0.01;}catch(exc){}}if(_15.length>3){_16.style["strokeColor"]=_15[3];}
if(_15.length>4){try{_16.style["strokeWidth"]=parseInt(_15[4]);}catch(exc){}}this.layer.addFeatures(_16);}}}catch(exc){gc.console.error(exc);}}}}if(_12){this.zoomToData();}},updateStyle:function(_19,_1a){for(var i in this.styleNames){if(this.styleNames[i]==_19){if(_19=="strokeWidth"){try{_1a=Math.min(Math.max(1,parseInt(_1a)),15);if(isNaN(_1a)){_1a=1;}}catch(exc){_1a=1;}}this.style[_19]=_1a;}}this.layer.redraw();},zoomToData:function(){if(this.layer.features.length>0){var _1c=this.layer.getDataExtent();this.map.zoomToExtent(_1c.left,_1c.bottom,_1c.right,_1c.top);}},beforeFeatureModified:function(_1d){OpenLayers.Event.stop(_1d);this.style=_1d.feature.style;for(var i=0;i<this.styleNames.length;++i){var tmp=document.getElementById(this.map.id+"_"+this.styleNames[i]);if(tmp){if(this.styleNames[i].search(/Color/)>=0){tmp.style.backgroundColor=this.style[this.styleNames[i]];}else{tmp.value=this.style[this.styleNames[i]];}}}},afterFeatureModified:function(_20){if(_20){
OpenLayers.Event.stop(_20);}this.style=this.layer.styleMap.styles["default"].defaultStyle;for(var i=0;i<this.styleNames.length;++i){var tmp=document.getElementById(this.map.id+"_"+this.styleNames[i]);if(tmp){if(this.styleNames[i].search(/Color/)>=0){tmp.style.backgroundColor=this.style[this.styleNames[i]];}else{tmp.value=this.style[this.styleNames[i]];}}}}});
gc.initClass("gc.map.Search",false,{menu:null,formName:null,searchUrl:null,parser:null,resultTagAddress:null,resultTag:null,resultPage:0,searchText:null,searchResult:null,searchCategory:null,constructor:function(_1){this.menu=_1;},init:function(_2,_3){this.formName=_2;this.searchUrl=_3;this.parser=new OpenLayers.Format.GeoJSON();},execSearch:function(_4){this.resultTagAddress=document.getElementById(this.formName+"_result_address");this.resultTag=document.getElementById(this.formName+"_result");for(var i=0;i<_4.elements.length;++i){if(_4.elements[i].name==this.formName){this.resultPage=0;this.searchText=_4.elements[i].value;this.execSearchPOI();this.execSearchAddress();break;}}},execSearchPOI:function(){if(this.resultTag){this.resultTag.innerHTML="";gc.map.Util.setVisibleSection(this.resultTag.id,true);this.resultTag.parentNode.style.display="none";}if(this.searchCategory){this.searchCategory.setVisible(false);}
gc.net.XHR.newRequest(this.searchUrl+encodeURIComponent(this.searchText)+"&resultpage="+this.resultPage,this.onSearchResult,this,gc.net.Request.prototype.RESPONSE_TEXT,true,null,true);this.menu.startLoad();},execSearchAddress:function(){if(this.resultTagAddress){this.resultTagAddress.innerHTML="";gc.map.Util.setVisibleSection(this.resultTagAddress.id,true);this.resultTagAddress.parentNode.style.display="none";}var _6=this;if(this.menu.map.geocode(this.searchText,function(_7){_6.onSearchResultAddress(_7);},true)){this.menu.startLoad();}},showResult:function(_8){if(this.searchResult&&_8>=0&&_8<this.searchResult.length){var _9=this.menu.map.markerManager.getCategory(this.searchResult[_8].attributes.layer);if(_9){if(this.searchResult[_8].geometry){this.menu.map.setCenter(this.searchResult[_8].geometry.x,this.searchResult[_8].geometry.y);this.menu.map.markerManager.setHighlight(this.searchResult[_8].geometry.x,this.searchResult[_8].geometry.y);}_9.loadDetails(this.searchResult[_8].fid);}}
},onSearchResultAddress:function(_a){this.menu.stopLoad();if(this.resultTagAddress&&_a&&_a.Placemark){var _b="";var _c=this.menu.map.map.maxExtent;for(var i=0;i<_a.Placemark.length;++i){if(_c.left<=_a.Placemark[i].x&&_c.right>=_a.Placemark[i].x&&_c.bottom<=_a.Placemark[i].y&&_c.top>=_a.Placemark[i].y){_b+="<div class=\"gc_map_searchresult_address\""+" onclick=\"gc.Map.instances['"+this.menu.map.name+"'].setCenter("+_a.Placemark[i].x+","+_a.Placemark[i].y+");\">"+_a.Placemark[i].address.replace(", Germany","")+"</div>";}}if(_b!=""){this.resultTagAddress.innerHTML=_b;this.resultTagAddress.parentNode.style.display="";}else{this.resultTagAddress.innerHTML="";this.resultTagAddress.parentNode.style.display="none";}}},onSearchResult:function(_e){this.menu.stopLoad();if(this.resultTag&&_e){this.searchResult=this.parser.read(_e,"FeatureCollection");var _f="";for(var i=0;i<this.searchResult.length;++i){_f+=this.searchResult[i].attributes.html;}if(_f!=""){this.resultTag.innerHTML=_f;
this.resultTag.parentNode.style.display="";}else{this.resultTag.innerHTML="";this.resultTag.parentNode.style.display="none";}var _11,_12,_13,_14;var cat;if(!this.searchCategory){this.searchCategory=this.menu.map.markerManager.addCategory(null,"intern___searchresult");}for(var i=0;i<this.searchResult.length;++i){if(i==0||this.searchResult[i].geometry.x<_11){_11=this.searchResult[i].geometry.x;}if(i==0||this.searchResult[i].geometry.y<_12){_12=this.searchResult[i].geometry.y;}if(i==0||this.searchResult[i].geometry.x>_13){_13=this.searchResult[i].geometry.x;}if(i==0||this.searchResult[i].geometry.y>_14){_14=this.searchResult[i].geometry.y;}this.searchResult[i].layer=this.menu.map.markerManager.layer;this.searchResult[i].attributes.level=null;this.searchResult[i].data.level=null;cat=this.menu.map.markerManager.getCategory(this.searchResult[i].attributes.layer);if(!this.searchResult[i].marker&&cat){icon=cat.icon.clone();icon.imageDiv.style.cursor="pointer";
this.searchResult[i].lonlat=new OpenLayers.LonLat(this.searchResult[i].geometry.x,this.searchResult[i].geometry.y);this.searchResult[i].marker=new OpenLayers.Marker(this.searchResult[i].lonlat,icon);}}if(this.searchResult.length>1){this.menu.map.map.zoomToExtent(new OpenLayers.Bounds(_11,_12,_13,_14));}else{if(this.searchResult.length==1){this.menu.map.setCenter(this.searchResult[0].geometry.x,this.searchResult[0].geometry.y);}}this.searchCategory.setFeatures(this.searchResult);this.searchCategory.setVisible(true);}}});
gc.initClass("gc.event.Custom",false,{object:null,listeners:null,constructor:function(_1){this.object=_1;this.listeners={};},register:function(_2,_3,_4){if(!this.listeners[_2]){this.listeners[_2]=[];}this.listeners[_2][this.listeners[_2].length]={func:_3,obj:_4};},unregister:function(_5,_6,_7){if(this.listeners[_5]){for(i in this.listeners[_5]){if(this.listeners[_5][i]&&this.listeners[_5][i].func==_6&&this.listeners[_5][i].obj==_7){this.listeners[_5][i]=null;}}}},trigger:function(_8,_9){if(_9){_9.object=this.object;}if(this.listeners[_8]){for(i in this.listeners[_8]){if(this.listeners[_8][i]&&this.listeners[_8][i].func){if(this.listeners[_8][i].obj){this.listeners[_8][i].func.call(this.listeners[_8][i].obj,_9);}else{this.listeners[_8][i].func(_9);}}}}}});
gc.initClass("gc.event.Mouse",true,{BUTTON_LEFT:1,BUTTON_RIGHT:2,BUTTON_MIDDLE:4,registered:false,listeners:new Array(),is_drag:false,drag_x:0,drag_y:0,drag_target:null,register:function(){this.registered=true;document.body.onmouseover=this.onMouseOver;document.body.onmouseout=this.onMouseOut;document.body.onmousemove=this.onMouseMove;document.body.onmousedown=this.onMouseDown;document.body.onmouseup=this.onMouseUp;if(window.addEventListener){window.addEventListener("DOMMouseScroll",this.onMouseWheel,false);}else{document.body.onmousewheel=this.onMouseWheel;}document.body.onselectstart=function(e){return !gc.event.Mouse.is_drag;};},unregister:function(){this.registered=false;document.body.onmouseover=null;document.body.onmouseout=null;document.body.onmousemove=null;document.body.onmousedown=null;document.body.onmouseup=null;if(window.addEventListener){window.removeEventListener("DOMMouseScroll",this.onMouseWheel,false);}else{document.body.onmousewheel=null;}
document.body.onselectstart=null;},addListener:function(_2){this.listeners.push(_2);if(!this.registered){this.register();}},removeListener:function(_3){for(var i=0;i<this.listeners.length;++i){if(this.listeners[i]==_3){this.listeners.splice(i,1);--i;}}if(this.listeners.length==0&&this.registered){this.unregister();}},onMouseOver:function(_5){if(!_5){_5=window.event;}var _6=gc.event.getTarget(_5);var x=gc.event.getOffsetX(_5);var y=gc.event.getOffsetY(_5);var _9=gc.event.getPageX(_5);var _a=gc.event.getPageY(_5);for(var i=0;i<gc.event.Mouse.listeners.length;++i){if(gc.event.Mouse.listeners[i].onMouseOver){gc.event.Mouse.listeners[i].onMouseOver(_5,_6,x,y,_9,_a);}}},onMouseOut:function(_c){if(!_c){_c=window.event;}var _d=gc.event.getTarget(_c);var x=gc.event.getOffsetX(_c);var y=gc.event.getOffsetY(_c);var _10=gc.event.getPageX(_c);var _11=gc.event.getPageY(_c);for(var i=0;i<gc.event.Mouse.listeners.length;++i){if(gc.event.Mouse.listeners[i].onMouseOut){
gc.event.Mouse.listeners[i].onMouseOut(_c,_d,x,y,_10,_11);}}},onMouseMove:function(_13){if(!_13){_13=window.event;}var _14=gc.event.getTarget(_13);var x=gc.event.getOffsetX(_13);var y=gc.event.getOffsetY(_13);var _17=gc.event.getPageX(_13);var _18=gc.event.getPageY(_13);for(var i=0;i<gc.event.Mouse.listeners.length;++i){if(gc.event.Mouse.listeners[i].onMouseMove){gc.event.Mouse.listeners[i].onMouseMove(_13,_14,x,y,_17,_18);}}gc.event.Mouse.onMouseDrag(_13);},onMouseDown:function(_1a){if(!_1a){_1a=window.event;}var _1b=gc.event.getTarget(_1a);var x=gc.event.getOffsetX(_1a);var y=gc.event.getOffsetY(_1a);var _1e=gc.event.getPageX(_1a);var _1f=gc.event.getPageY(_1a);for(var i=0;i<gc.event.Mouse.listeners.length;++i){if(gc.event.Mouse.listeners[i].onMouseDown){gc.event.Mouse.listeners[i].onMouseDown(_1a,_1b,x,y,_1e,_1f);}}gc.event.Mouse.onMouseDragStart(_1a);},onMouseUp:function(_21){if(!_21){_21=window.event;}var _22=gc.event.getTarget(_21);var x=gc.event.getOffsetX(_21);
var y=gc.event.getOffsetY(_21);var _25=gc.event.getPageX(_21);var _26=gc.event.getPageY(_21);for(var i=0;i<gc.event.Mouse.listeners.length;++i){if(gc.event.Mouse.listeners[i].onMouseUp){gc.event.Mouse.listeners[i].onMouseUp(_21,_22,x,y,_25,_26);}}gc.event.Mouse.onMouseDragStop(_21);},onMouseWheel:function(_28){if(!_28){_28=window.event;}var _29=gc.event.getTarget(_28);var x=gc.event.getOffsetX(_28);var y=gc.event.getOffsetY(_28);var _2c=gc.event.getPageX(_28);var _2d=gc.event.getPageY(_28);var _2e=0;if(_28.wheelDelta){_2e=_28.wheelDelta/120;if(window.opera){_2e=-_2e;}}else{if(_28.detail){_2e=-_28.detail/3;}}var _2f=false;for(var i=0;i<gc.event.Mouse.listeners.length;++i){if(gc.event.Mouse.listeners[i].onMouseWheel){if(gc.event.Mouse.listeners[i].onMouseWheel(_28,_2e,_29,x,y,_2c,_2d)){_2f=true;}}}if(_2f){if(_28.preventDefault){_28.preventDefault();}_28.returnValue=false;}},onMouseDragStart:function(_31){if(!_31.button||_31.button==this.BUTTON_LEFT){var _32=gc.event.getTarget(_31);
var x=gc.event.getOffsetX(_31);var y=gc.event.getOffsetY(_31);var _35=gc.event.getPageX(_31);var _36=gc.event.getPageY(_31);for(var i=0;i<this.listeners.length;++i){if(this.listeners[i].onMouseDragStart){if(this.listeners[i].onMouseDragStart(_31,_32,x,y,_35,_36)){this.is_drag=true;}}}if(this.is_drag){this.drag_x=_35;this.drag_y=_36;this.drag_target=_32;}}},onMouseDragStop:function(_38){if(this.is_drag){var _39=gc.event.getTarget(_38);var x=gc.event.getOffsetX(_38);var y=gc.event.getOffsetY(_38);var _3c=gc.event.getPageX(_38);var _3d=gc.event.getPageY(_38);this.is_drag=false;this.drag_x=0;this.drag_y=0;this.drag_target=null;for(var i=0;i<this.listeners.length;++i){if(this.listeners[i].onMouseDragStop){this.listeners[i].onMouseDragStop(_38,_39,x,y,_3c,_3d);}}}},onMouseDrag:function(_3f){if(this.is_drag){var x=gc.event.getPageX(_3f)-this.drag_x;var y=gc.event.getPageY(_3f)-this.drag_y;var _42=false;if(x!=0||y!=0){this.drag_x=gc.event.getPageX(_3f);this.drag_y=gc.event.getPageY(_3f);
for(var i=0;i<this.listeners.length;++i){if(this.listeners[i].onMouseDrag){if(this.listeners[i].onMouseDrag(_3f,this.drag_target,x,y)){_42=true;}}}}if(_42){if(_3f.preventDefault){_3f.preventDefault();}_3f.returnValue=false;}}}});

