var iItemX=0;var iItemY=0;var sBalloonDiv="balloondiv";var sMCDiv="my-connections";var iCheckCount=0;var goBalloonCache=new Array();var bInvoke=false;var dtLastSearch;var bDisableClick=false;var sCmdNext="ctlPagingBottom_cmdNext";var sCmdPrev="ctlPagingBottom_cmdPrev";var sCmdChange="ctlResBtnsBottom_cmdChangeInput";var sCmdNew="ctlResBtnsBottom_cmdNew";var sCmdConnBack="ctlResBtnsBottom_cmdConnBack";var gasHistoryPOI=null;var gasHistoryAP=null;var bBalloonClick=false;var giDown=0;var giTop=0;var giRight=0;var giLeft=0;function GetKeyCodeBase(e){try{var keyCode=-1;if(window.event){if(window.event.keyCode>-1&&!window.event.ctrlKey&&!window.event.altKey)return window.event.keyCode;}keyCode=-1;if(e&&keyCode<=0){keyCode=e.charCode;if(keyCode<=0){keyCode=e.keyCode;}if(keyCode>-1&&!e.ctrlKey&&!e.altKey)return keyCode;}return-1;}catch(err){HandlerError(err);}}function GetKeyCodeBaseAll(e){try{var keyCode=-1;if(window.event){if(window.event.keyCode>-1)return window.event.keyCode;}keyCode=-1;if(e&&keyCode<=0){keyCode=e.charCode;if(keyCode<=0){keyCode=e.keyCode;}if(keyCode>-1)return keyCode;}return-1;}catch(err){HandlerError(err);}}function DisInput(sInputID){try{var oEl=document.getElementById(sInputID);if(oEl){oEl.disabled=true;}}catch(err){HandlerError(err);}}function EnInput(sInputID){try{var oEl=document.getElementById(sInputID);if(oEl){oEl.disabled=false;}}catch(err){HandlerError(err);}}function SetDisplayBlock(sId){var oEl=document.getElementById(sId);if(oEl!=null){oEl.style.display="block";}}function SetDisplayInline(sId){var oEl=document.getElementById(sId);if(oEl!=null){oEl.style.display="inline";}}function SetDisplayNone(sId){var oEl=document.getElementById(sId);if(oEl!=null){oEl.style.display="none";}}function EvalHrefById(sID){var myEl;myEl=document.getElementById(sID);if(!myEl){return false;}if(!myEl.href){return false;}if(myEl.href.length==0){return false;}eval(myEl.href);}function IsPopUpWindow(){return(typeof(LoadPopupPage)!="undefined");}function SetLng(lng){try{oBaseParams.set_Lang(lng);return true;}catch(err){alert(err);}return false;}function toggleClass(oEl,sClassName){var bRet;var sTmp=oEl.className;if(sTmp.indexOf(sClassName)>=0){sTmp=sTmp.replace(sClassName,"");sTmp=sTmp.replace(/^[ ]*/,"");sTmp=sTmp.replace(/[ ]*$/,"");bRet=false;}else{sTmp=sTmp+" "+sClassName;bRet=true;}oEl.className=sTmp;return bRet;}function IsNSOperaDblClick(event){return(event&&event.type=='dblclick'&&(NS||OPERA));}var sActDiv="";function SetItemPosition(sId){if(IsPopUpWindow()){ItemToMotherInPos(sId,'popmother-inner');ItemToBody(sId,'popupbody');}else{ItemToMotherInPos(sId,'mother-inner');ItemToBody(sId,'mainbody');}}function ItemToMotherInPos(sID,sToID){oEl2=document.getElementById(sID);if(oEl2){var pos=getAbsolutePos(oEl2,sToID);iItemX=pos.x;iItemY=pos.y;}else{iItemX=0;iItemY=0;}}function ItemToBody(sID,sToID){oEl2=document.getElementById(sID);if(oEl2){var pos=getAbsolutePos(oEl2,sToID);var scroll=GetScrollXY();giTop=pos.y-scroll[1];giDown=GetBody().clientHeight-giTop;giLeft=pos.x-scroll[0];giRight=GetBody().clientWidth-giRight;}else{giTop=0;giDown=0;giLeft=0;giRight=0;}}function GetScrollXY(){var iX=0;var iY=0;if(typeof(window.pageYOffset)=='number'){iY=window.pageYOffset;iX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){iY=document.body.scrollTop;iX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){iY=document.documentElement.scrollTop;iX=document.documentElement.scrollLeft;}return[iX,iY];}function getAbsolutePos(el,sStopID){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent&&el.offsetParent.id!=sStopID){var tmp=this.getAbsolutePos(el.offsetParent,sStopID);r.x+=tmp.x;r.y+=tmp.y;}return r;}function GetBody(){if(document.compatMode&&document.compatMode!="BackCompat"){return document.documentElement;}else{return document.body;}}function SetDivPosition(oEl){var iShiftLeft=50;var iDownAux=0;var iLeft=0;if(sActDiv=="ttsel"){iDownAux=43;iLeft=46;}else if(sActDiv=="ttinfo"){iDownAux=20;iLeft=46;}else if(sActDiv.indexOf("cmdConnFixed")>-1){iDownAux=28;iLeft=10;}else{iDownAux=20;if(iShiftLeft>giLeft){iLeft=iItemX-giLeft;}else{var iDiffX=giLeft-iItemX;iLeft=iItemX-iShiftLeft;var iDiffXLeft=iDiffX+iLeft;if((iDiffXLeft+oEl.offsetWidth)>=GetBody().clientWidth){var bOK=false;while(iDiffXLeft>0&&!bOK){iDiffXLeft-=1;if((iDiffXLeft+oEl.offsetWidth)<GetBody().clientWidth){bOK=true;}}if(IsMSIE6older()){iDiffXLeft-=20;}if(iDiffXLeft<0){iDiffXLeft=0;}iLeft=(iDiffXLeft-iDiffX);}}}oEl.style.left=iLeft+"px";var iTopAux=5;if(giDown>0&&giDown<(oEl.offsetHeight+iDownAux)&&giTop>0&&giTop>=(oEl.offsetHeight-iTopAux)){oEl.style.top=(iItemY-oEl.offsetHeight-iTopAux)+"px";}else{oEl.style.top=(iItemY+iDownAux)+"px";}}function BodyClick(event){if(sActDiv!=''&&!bBalloonClick){HideDiv(sBalloonDiv);}bBalloonClick=false;}function BalloonClick(event){bBalloonClick=true;}function ShowHideDiv(event,sCmd,sParams){try{_ShowHideDiv(sCmd,sParams,"anch_"+sCmd);}catch(err){HandlerError(err);}if(event)return stopEvent(event);}function ShowHideDiv2(event,sCmd,sParams){try{var targetId=event.target?event.target.id:event.srcElement.id;_ShowHideDiv(sCmd,sParams,targetId);}catch(err){HandlerError(err);}if(event)return stopEvent(event);}function _ShowHideDiv(sCmd,sParams,targetId){var oEl1=document.getElementById(sBalloonDiv);if(oEl1!=null){if(sCmd!=sActDiv){HideDiv(sActDiv);sActDiv=sCmd;SetItemPosition(targetId);DoDivAjax(oEl1.id,sCmd,sParams);}else{HideBalloonDiv(oEl1);}}}function ShowHideDiv_Fix(event,sParams){try{sId=sResultPrefix+sParams;var oEl1=document.getElementById(sBalloonDiv);if(oEl1!=null){if(sId+"div"!=sActDiv){HideDiv(sActDiv);sActDiv=sId+"div";SetItemPosition(sId);DoDivAjax(oEl1.id,"fixlink","");}else{HideBalloonDiv(oEl1);}}}catch(err){HandlerError(err);}if(event)return stopEvent(event);}function HideBalloonDiv(oEl1){oEl1.style.display="none";if(IsMSIE6older()){if(IsPopUpWindow()){HideIframe.Discard(sBalloonDiv,'popmother-inner');}else{HideIframe.Discard(sBalloonDiv,'mother-inner');}}sActDiv="";}function HideDiv(sDiv){try{oEl=document.getElementById(sDiv);if(oEl){HideBalloonDiv(oEl);}}catch(e){HandlerError(e);}}function IsMSIE7(){return(IsMSIE()&&navigator.appVersion.indexOf("MSIE 7.0;")>=0);}function IsMSIE6older(){return(IsMSIE()&&(navigator.appVersion.indexOf("MSIE 6.0;")>=0||navigator.appVersion.indexOf("MSIE 5.5;")>=0));}function IsMSIE(){return navigator.appName==="Microsoft Internet Explorer";}IE=null;NS=null;OPERA=null;ua=navigator.appName.toLowerCase();if(ua.indexOf('explorer')>-1&&document.getElementById&&document.childNodes&&!document.addEventListener){IE=true;}if(ua.indexOf('netscape')>-1&&document.getElementById&&document.childNodes&&!document.all){NS=true;}if(ua.indexOf('opera')>-1&&document.getElementById&&document.childNodes){OPERA=true;}if(!IE&&!NS&&!OPERA&&document.addEventListener){OPERA=true;}var dragobj;var dragobj;function m_down(event,object){dragobj=object;dragobj.style.zIndex="100";if(!dragobj.style.left)dragobj.style.left=dragobj.offsetLeft;if(!dragobj.style.top)dragobj.style.top=dragobj.offsetTop;dragobj.clickX=event.clientX;dragobj.clickY=event.clientY;dragobj.left=parseInt(dragobj.offsetLeft);dragobj.top=parseInt(dragobj.offsetTop);if(IE){document.attachEvent('onmousemove',m_move);document.attachEvent('onmouseup',m_up);}if(NS||OPERA){document.addEventListener('mousemove',m_move,true);document.addEventListener('mouseup',m_up,true);}return stopEvent(event);}function m_move(event){dragobj.ondragdrop(event.clientX-dragobj.clickX,event.clientY-dragobj.clickY,event);return stopEvent(event);}function m_up(event){if(IE){document.detachEvent('onmousemove',m_move);document.detachEvent('onmouseup',m_up);if(typeof oAdvTooltip=='object')$(document).mousemove(function(event){oAdvTooltip.Position(event)});if(dragobj.ondragend)dragobj.ondragend(event);oEl1=document.getElementById("WCHhider"+dragobj.id);if(oEl1!=null){oEl1.style.left=dragobj.style.left;oEl1.style.top=dragobj.style.top;oEl1.style.width=dragobj.offsetWidth+"px";oEl1.style.height=dragobj.offsetHeight+"px";}}if(NS||OPERA){document.removeEventListener('mousemove',m_move,true);document.removeEventListener('mouseup',m_up,true);if(dragobj.ondragend)dragobj.ondragend(event);}return stopEvent(event);}function startDrag(what,oEl1){oEl1.onmousedown=function(e){if(e){event=e;}m_down(event,what);}what.drag=1;}function stopDrag(what){what.onmousedown=null;what.drag=0;}function stopEvent(event){if(IE){event.cancelBubble=true;return false;}if(NS||OPERA){event.stopPropagation();event.preventDefault();return false;}}function StartDragElAjax(oEl){if(IE||NS||OPERA){oEl1=document.getElementById("lista_"+oEl.id);if(oEl!=null){oEl.ondragdrop=function(posunx,posuny){this.style.left=(this.left+posunx)+"px";this.style.top=(this.top+posuny)+"px";}startDrag(oEl,oEl1,1);}}}var HideIframe_Constructor=function(){if(!(document.all&&document.getElementById&&!window.opera&&navigator.userAgent.toLowerCase().indexOf("mac")==-1)){this.Apply=function(){};this.Discard=function(){};return;}var _bIE55=false;var _bIE6=false;var _oRule=null;var _bSetup=true;var _oSelf=this;this.Apply=function(vLayer,vContainer,bResize){if(_bSetup)_Setup();if(_bIE55&&(oIframe=_Hider(vLayer,vContainer,bResize))){oIframe.style.visibility="visible";}else if(_oRule!=null){_oRule.style.visibility="hidden";}};this.Discard=function(vLayer,vContainer){if(_bIE55&&(oIframe=_Hider(vLayer,vContainer,false))){oIframe.style.visibility="hidden";}else if(_oRule!=null){_oRule.style.visibility="visible";}};function _Hider(vLayer,vContainer,bResize){var oLayer=_GetObj(vLayer);var oContainer=((oTmp=_GetObj(vContainer))?oTmp:document.getElementsByTagName("body")[0]);if(!oLayer||!oContainer)return;if(oLayer.id=="")oLayer.id="WCHid"+(new Date()).getTime();var oIframe=document.getElementById("WCHhider"+oLayer.id);if(!oIframe){var sFilter=(_bIE6)?"filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);":"";var zIndex=oLayer.style.zIndex;if(zIndex=="")zIndex=oLayer.currentStyle.zIndex;zIndex=parseInt(zIndex);if(isNaN(zIndex))return null;if(zIndex<2)return null;zIndex--;var sHiderID="WCHhider"+oLayer.id;oContainer.insertAdjacentHTML("BeforeEnd",'<iframe class="WCHiframe" src="javascript:false;" id="'+sHiderID+'" scroll="no" frameborder="0" style="position:absolute;visibility:hidden;'+sFilter+'border:0;top:0;left;0;width:0;height:0;background-color:#ccc;z-index:'+zIndex+';"></iframe>');oIframe=document.getElementById(sHiderID);_SetPos(oIframe,oLayer);}else if(bResize){_SetPos(oIframe,oLayer);}return oIframe;};function _SetPos(oIframe,oLayer){oIframe.style.width=oLayer.offsetWidth+"px";oIframe.style.height=oLayer.offsetHeight+"px";oIframe.style.left=oLayer.offsetLeft+"px";oIframe.style.top=oLayer.offsetTop+"px";};function _GetObj(vObj){var oObj=null;switch(typeof(vObj)){case"object":oObj=vObj;break;case"string":oObj=document.getElementById(vObj);break;}return oObj;};function _Setup(){_bIE55=(typeof(document.body.contentEditable)!="undefined");_bIE6=(typeof(document.compatMode)!="undefined");if(!_bIE55){if(document.styleSheets.length==0)document.createStyleSheet();var oSheet=document.styleSheets[0];oSheet.addRule(".WCHhider","visibility:visible");_oRule=oSheet.rules(oSheet.rules.length-1);}_bSetup=false;};};var HideIframe=new HideIframe_Constructor();function PopupOpen(event,sPage){var w=700;var h=700;var sUrl="";switch(sPage){case"connmore":w=800;h=750;sUrl=GetSrcElement(event).href;break;case"route":w=800;h=700;sUrl=GetSrcElement(event).href;break;case"map":w=800;h=700;var oCookie=new Cookie(document,'IdosMap',365*24,'/');oCookie.load();if(oCookie.w&&window.screen.width>=oCookie.w){w=oCookie.w*1;}if(oCookie.h&&window.screen.height>=oCookie.h){h=oCookie.h*1;}sUrl=GetSrcElement(event).href;break;case"delay":case"prere":w=800;h=700;sUrl=GetSrcElement(event).parentNode.href;break;case"fileinfo":w=994;h=700;sUrl=GetSrcElement(event).href;break;case"mpv":w=540;h=540;sUrl=GetSrcElement(event).href;break;case"trainorder":w=994;h=700;sUrl=GetSrcElement(event).parentNode.href;break;case"help":w=800;h=700;sUrl=GetSrcA(event).href;break;case"connsms":w=700;h=200;sUrl=GetSrcElement(event).href;break;}var left=(window.screen.width-(w+60))/2;var top=(window.screen.height-(h+80))/2;var oWin=window.open(sUrl,sPage,"height="+h+",width="+w+",left="+left+",top="+top+", location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes");oWin.focus();return stopEvent(event);}function GetSrcElement(event){if(IE){return event.srcElement;}if(NS||OPERA){return event.target;}}function GetSrcA(event){if(event.srcElement)return GetSrcACore(event.srcElement,0,2);if(event.target)return GetSrcACore(event.target,0,2);}function GetSrcACore(oNode,iRec,iMax){if(oNode.tagName.toLowerCase()=='a'||oNode.tagName.toLowerCase()=='area'){return oNode;}else{if(iRec>=iMax){alert('Odkaz nebyl nalezen.');return null;}else{return GetSrcACore(oNode.parentNode,iRec+1,iMax)}}}function PrintPopup(sUrl,sWinName){var w=850;var h=700;var left=(window.screen.width-(w+60))/2;var top=(window.screen.height-(h+80))/2;var sDestURL="";if(!sUrl==""){sDestURL=oBaseParams.addToURL(UpdateUrl(sUrl),true,false);}var oWin=window.open(sDestURL,sWinName,"height="+h+",width="+w+",left="+left+",top="+top+", location=no,menubar=yes,status=no,toolbar=no,scrollbars=yes,resizable=yes");try{if(typeof(oWin.focus)!="undefined"){oWin.focus();}}catch(err){}}function MailPopup(sUrl,sWinName){var w=700;var h=440;var left=(window.screen.width-(w+60))/2;var top=(window.screen.height-(h+80))/2;var sDestURL="";if(!sUrl==""){sDestURL=oBaseParams.addToURL(UpdateUrl(sUrl),true,false);}var oWin=window.open(sDestURL,sWinName,"height="+h+",width="+w+",left="+left+",top="+top+", location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes");oWin.focus();}function MapSelectPopup(sUrl,sWinName){var w=800;var h=700;var oCookie=new Cookie(document,'IdosMap',365*24,'/');oCookie.load();if(oCookie.w&&window.screen.width>=oCookie.w){w=oCookie.w*1;}if(oCookie.h&&window.screen.height>=oCookie.h){h=oCookie.h*1;}var left=(window.screen.width-(w+60))/2;var top=(window.screen.height-(h+80))/2;var sDestURL="";if(!sUrl==""){sDestURL=UpdateUrl(sUrl);}var oWin=window.open(sDestURL,sWinName,"height="+h+",width="+w+",left="+left+",top="+top+", location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes");oWin.focus();}Cookie=function(document,name,hours,path){this._document=document;this._name=name;if(hours)this._expiration=new Date((new Date()).getTime()+hours*3600000);else this._expiration=null;if(path)this._path=path;else this._path=null;}Cookie.prototype={store:function(){var cookieval='';for(var prop in this){if((prop.charAt(0)=='_')||((typeof this[prop])=='function'))continue;if(cookieval!='')cookieval+='&';cookieval+=prop+'='+this[prop];}var cookie=this._name+'='+cookieval;if(this._expiration)cookie+='; expires='+this._expiration.toGMTString();if(this._path)cookie+='; path='+this._path;this._document.cookie=cookie;},load:function(){var allcookies=this._document.cookie;if(allcookies=='')return false;var start=allcookies.indexOf(this._name+'=');if(start==-1)return false;start+=this._name.length+1;var end=allcookies.indexOf(';',start);if(end==-1)end=allcookies.length;var cookieval=allcookies.substring(start,end);var a=cookieval.split('&');for(var i=0;i<a.length;i++){a[i]=a[i].split('=');}for(var i=0;i<a.length;i++){this[a[i][0]]=a[i][1];}return true;}}BaseParams=function(sTTCombID,sTTCombName,bOnlyOneComb){this._Lang=sAppLangDefault;this._TTCombID=sTTCombID;this._TTCombName=sTTCombName;this._OnlyOneComb=bOnlyOneComb;this._IsAdvancedForm=false;this._MCHandle=-1;this._MCItemCount=0;this._MCMode=0;this._PortalID='';this._idosCookie=new Cookie(document,'Idos',null,'/');this.loadCookie();if(!this._idosCookie.ch){this._storeCookie();}}BaseParams.prototype={get_Lang:function(){return this._Lang;},set_Lang:function(value){this._Lang=value;this._storeCookie();},get_TTCombID:function(){return this._TTCombID;},set_TTCombID:function(value){this._TTCombID=value;},get_TTCombName:function(){return this._TTCombName;},set_TTCombName:function(value){this._TTCombName=value;},get_OneComb:function(){return this._OnlyOneComb;},set_OneComb:function(value){this._OnlyOneComb=value;},get_IsAdvancedForm:function(){return this._IsAdvancedForm;},set_IsAdvancedForm:function(value){this._IsAdvancedForm=value;this._storeCookie();},get_MCHandle:function(){return this._MCHandle;},set_MCHandle:function(value){this._MCHandle=value;this._storeCookie();},get_MCItemCount:function(){return this._MCItemCount;},set_MCItemCount:function(value){this._MCItemCount=value;this._storeCookie();},get_MCMode:function(){return this._MCMode;},set_MCMode:function(value){this._MCMode=value;this._storeCookie();},get_PortalID:function(){return this._PortalID;},set_PortalID:function(value){this._PortalID=value;this._storeCookie();},addToURL:function(sUrl,bUrlToISAPI,bDellAllParams){if(bUseISAPI){if(bDellAllParams){sUrl=this._delAllParams(sUrl);}else{sUrl=this._delParam(sUrl,"tt");}if(bUrlToISAPI){sUrl=this._UpdateUrlISAPI(sUrl);}}else{sUrl=this._addParam(sUrl,'tt',this._TTCombID,true);}return sUrl;},_UpdateUrlISAPI:function(sUrl){for(var i=0;i<asScript.length;i++){var regex=new RegExp(asScript[i],"i");if(sUrl.search(regex)>-1){return this._addScriptToUrl(sUrl,asScript[i],asUrl[i]);}}return sUrl;},_addScriptToUrl:function(sUrl,sSkript,sPartUrl){var regex=new RegExp("(.*)"+sSkript,"i");if(this._OnlyOneComb){return sAppPath+sPartUrl+"/"+sUrl.replace(regex,"");}else{return sAppPath+this._TTCombName+"/"+sPartUrl+"/"+sUrl.replace(regex,"");}},addToDialogURL:function(sUrl){sUrl=this._addParam(sUrl,'tt',this._TTCombID,true)var lang=this._Lang.substr(0,1);sUrl=this._addParam(sUrl,'l',lang,(lang!='C'))return sUrl;},_addParam:function(sUrl,sParam,sVal,bCreate){var sNewParam=sParam+"="+sVal;var re1=new RegExp(sParam+"=","i");if(sUrl.search(re1)>-1){var regex=new RegExp(sParam+"=[^&]*","i");sUrl=sUrl.replace(regex,sNewParam);}else if(bCreate){re1=new RegExp("aspx\\?","i");if(sUrl.search(re1)>-1){sUrl=sUrl+"&"+sNewParam;}else{sUrl=sUrl+"?"+sNewParam;}}return sUrl;},_delParam:function(sUrl,sParam){var regex=new RegExp(sParam+"=","i");if(sUrl.search(regex)>-1){regex=new RegExp("\\?"+sParam+"=","i");if(sUrl.search(regex)>-1){regex=new RegExp(sParam+"=[^&]*&?","i");sUrl=sUrl.replace(regex,"");}else{regex=new RegExp("&?"+sParam+"=[^&]*","i");sUrl=sUrl.replace(regex,"");}regex=new RegExp("\\?$","i");sUrl=sUrl.replace(regex,"");}return sUrl;},_delAllParams:function(sUrl){var regex=new RegExp("\\?.*$","i");return sUrl.replace(regex,"");},loadCookie:function(){this._idosCookie.load();if(this._idosCookie.ch){this._MCHandle=this._idosCookie.ch;};if(this._idosCookie.cc){this._MCItemCount=this._idosCookie.cc;};if(this._idosCookie.cm){this._MCMode=this._idosCookie.cm;};if(this._idosCookie.lng){this._Lang=this._idosCookie.lng;};if(this._idosCookie.af){this._IsAdvancedForm=(this._idosCookie.af=="true");};if(this._idosCookie.portal){this._PortalID=this._idosCookie.portal;};},_storeCookie:function(){this._idosCookie.ch=this._MCHandle;this._idosCookie.cc=this._MCItemCount;this._idosCookie.cm=this._MCMode;this._idosCookie.lng=this._Lang;this._idosCookie.af=this._IsAdvancedForm;this._idosCookie.portal=this._PortalID;this._idosCookie.store();}}function SetLinkParams(link){link.href=oBaseParams.addToURL(link.href,false,true);}function SetFormParams(bPrint){if(!bPrint)StoreAllTxtValue();var form=document.getElementById("aspnetForm");form.action=oBaseParams.addToURL(form.action,true,!bPrint);return true;}function AddParamsToURL(url){return oBaseParams.addToDialogURL(url)}function AppFormSubmit(form,bPrint){SetFormParams(bPrint);if(form){form.submit();}}function UpdateUrl(sUrl){var re1=new RegExp("^http:","i");if(sUrl.search(re1)==-1){return sAppPath+sUrl;}return sUrl;}function ErrLoad(){var oEl=document.getElementById("CmdButton");if(oEl)oEl.focus();}function StoreAllTxtValue(){try{var sText="";var aoEl=document.getElementsByTagName('input');for(i=0;i<aoEl.length;i++){if(aoEl[i]&&aoEl[i].type=="text"){if(sText!="")sText+="#|#";sText+=aoEl[i].id+"#*#"+aoEl[i].value;}}var oEl=$get("txtval");if(oEl){oEl.value=sText;}}catch(err){HandlerError(err);}}function LoadAllTxtValue(){try{if(bIsAdvancedForm!=oBaseParams.get_IsAdvancedForm()){oBaseParams.set_IsAdvancedForm(bIsAdvancedForm);}var oEl=$get("txtval");if(oEl){var sText=oEl.value;if(sText!=""){var asTxt=sText.split("#|#");var asIDs=new Array();var asValues=new Array();for(j=0;j<asTxt.length;j++){var asAux=asTxt[j].split("#*#");if(asAux.length==2){asIDs[j]=asAux[0];asValues[j]=asAux[1];}}var aoEl=document.getElementsByTagName('input');var iDel=0;var asDelTxt=new Array();for(j=0;j<aoEl.length;j++){if(aoEl[j]&&aoEl[j].type=="text"){var sDelTxt=IsDeleteTxt(asIDs,aoEl[j].id);if(sDelTxt!=""){asDelTxt[iDel]=sDelTxt;iDel++;}}}if(asDelTxt.length>0){for(j=asDelTxt.length-1;j>=0;j--){regex=new RegExp("(.*)_","i");var sNumSuf=asDelTxt[j].replace(regex,"");regex=new RegExp(".?$","i");sNumSuf=sNumSuf.replace(regex,"");DelInput(GetPrefix(asDelTxt[j]),GetType(asDelTxt[j]),sNumSuf);}}for(j=0;j<asIDs.length;j++){var oTxt=$get(asIDs[j]);if(oTxt){oTxt.value=asValues[j];regex=new RegExp("t$","i");if(asIDs[j].search(regex)>-1&&oTxt.value!=""&&asIDs[j].toLowerCase()!="date"&&asIDs[j].toLowerCase()!="time"){var oCombo=$get(asIDs[j].replace(regex,"k"));if(oCombo){ShowInput(asIDs[j].replace(regex,""),false);}}}else{AddTxt(asIDs[j],asValues[j]);}}FocusElement(sSearchButton);}}}catch(err){HandlerError(err);}}function IsDeleteTxt(asIDs,sTxtID){for(l=0;l<asIDs.length;l++){if(sTxtID==asIDs[l]){return"";}}var regex=new RegExp("c[FT]_0t","i");if(sTxtID.search(regex)>-1||sTxtID.toLowerCase()=="date"||sTxtID.toLowerCase()=="time"){return"";}return sTxtID;}function GetPrefix(sId){if(sId=="")return"";var regex=new RegExp("_(.{2})$","i");return sId.replace(regex,"_");}function GetType(sId){if(sId.indexOf("_cF_")>-1){return"FROM";}else if(sId.indexOf("_cT_")>-1){return"TO";}else if(sId.indexOf("_cCh_")>-1){return"CHANGE";}else if(sId.indexOf("_cV_")>-1){return"VIA";}else if(sId.indexOf("_cM_")>-1){return"MASK";}else if(sId.indexOf("cA_")>-1){return"ADDRESS";}return"";}function GetTypeIdx(sType){switch(sType){case"FROM":return 0;case"TO":return 1;case"VIA":return 2;case"CHANGE":return 3;case"MASK":return 4;case"ADDRESS":return 5;}return 0;}function AddTxt(sId,sValue){var sPrefixId=GetPrefix(sId);var sType=GetType(sId);if(sType=="CHANGE"){var oAnch=$get('anchsetChange');Calendar.addClass(oAnch,"link-disable");oAnch.removeAttribute('href');}else if(sType=="VIA"){var oAnch=$get('anchsetVia');Calendar.addClass(oAnch,"link-disable");oAnch.removeAttribute('href');}if(sType!=""){AddInput(sPrefixId,sType);SetValue(sId,sValue);}}function ShowWaitingDiv(){var oEl=document.getElementById('waitingdiv');if(oEl){oEl.style.display='block';oEl.style.zIndex=10000;oEl.style.top=0;oEl.style.left=0;oEl.style.width=window.document.documentElement.clientWidth+'px';oEl.style.height=window.document.documentElement.clientHeight+'px';if(IsMSIE6older()){oEl.style.position='absolute';}else{oEl.style.position='fixed';}}var oEl=document.getElementById('waitingdivtext');if(oEl){oEl.style.display='block';oEl.style.zIndex=10001;if(IsMSIE6older()){oEl.style.position='absolute';}else{oEl.style.position='fixed';}oEl.style.top=(window.document.documentElement.clientHeight/2-(oEl.offsetHeight/2))+'px';oEl.style.left=(window.document.documentElement.clientWidth/2-(oEl.offsetWidth/2))+'px';}}function HideWaitingDiv(){var oEl=document.getElementById('waitingdiv');if(oEl){oEl.style.display='none';}var oEl=document.getElementById('waitingdivtext');if(oEl){oEl.style.display='none';}}DateLimit=function(){this._startDay=new Date();this._aiDateLim=new Array();this._actMonthIndex=0;this._innerHtml='';this._id='';this._recap='';}DateLimit.prototype={getDivConn:function(event,sParams){try{this._getDiv('datelimconn',sParams);}catch(err){}if(event)return stopEvent(event);},getDivRoute:function(event,sParams){try{this._getDiv('datelimroute',sParams);}catch(err){HandlerError(err);}if(event)return stopEvent(event);},_getDiv:function(sType,sParams){var sId=sType+sParams;var oEl1=document.getElementById(sBalloonDiv);if(oEl1!=null){if(sId+"div"!=sActDiv){HideDiv(sActDiv);sActDiv=sId+"div";SetItemPosition(sId);this._doDateLimAjax(oEl1.id,sType,sParams);}else{HideBalloonDiv(oEl1);}}},prepareData:function(sId,result){eval(result);this._id=sId;oDateLimit.ajaxDivReplace(this._id,this._generateMonthFst());},showMonth:function(event,iActMonth){try{if(IsNSOperaDblClick(event))return false;this._actMonthIndex=iActMonth;this._generateMonthPrevNext();}catch(err){alert(err);}if(event)return stopEvent(event);},_generateMonthFst:function(){var sResult=this._recap;var oDate=this._setDate();sResult+='<div id="limitnavl">';sResult+=this._getNavigation(oDate);sResult+='</div>';sResult+='<div id="monthdays">';sResult+=this._getMonthDays(oDate);sResult+='</div>';sResult+=this._getLegend();return this._innerHtml.replace('#REPLACE#',sResult);},_generateMonthPrevNext:function(){var oDate=this._setDate();var oDays=document.getElementById('monthdays');var oNavl=document.getElementById('limitnavl');if(oDays&&oNavl){oDays.innerHTML=this._getMonthDays(oDate);oNavl.innerHTML=this._getNavigation(oDate);}},_setDate:function(){var oDate=new Date();var iMonth=this._startDay.getMonth()+this._actMonthIndex;var iYear=0;while(iMonth>11){iYear+=1;iMonth-=12;}oDate.setFullYear(this._startDay.getFullYear()+iYear,iMonth,1);return oDate;},_getMonthDays:function(oDate){var sResult='';sResult+='<table class="limitmonth">';sResult+='<thead><tr>';sResult+=this._getDayHead();sResult+='</tr></thead>';var iDayOfWeek=oDate.getDay()-1;if(iDayOfWeek==-1)iDayOfWeek=6;sResult+='<tbody><tr>';for(i=0;i<iDayOfWeek;i++){sResult+=this._getDayHtml(3,'&nbsp;');}var iLen=this._aiDateLim[this._actMonthIndex].length;var bInsLastTrEnd=false;for(j=0;j<iLen;j++){sResult+=this._getDayHtml(this._aiDateLim[this._actMonthIndex][j],j+1);iDayOfWeek+=1;if(iDayOfWeek>6){iDayOfWeek=0;if(j==(iLen-1)){bInsLastTrEnd=true;sResult+='</tr>';}else{sResult+='</tr><tr>';}}}if(iDayOfWeek>0){for(k=iDayOfWeek;k<7;k++){sResult+=this._getDayHtml(3,'&nbsp;');}}if(!bInsLastTrEnd)sResult+='</tr>';sResult+='</tbody></table>';return sResult;},_getLegend:function(){var sText='<div class="limitlegend"></div><table class="legendtbl">';sText+=this._addOneLegend('legendsqron',Calendar._TT["RUN"]);sText+=this._addOneLegend('legendsqroff',Calendar._TT["RUNNOT"]);sText+=this._addOneLegend('legendsqrout',Calendar._TT["NOINFO"]);sText+='</table>';return sText;},_addOneLegend:function(sCssClass,sText){return'<tr><td class="legendtd"><div class="'+sCssClass+'"></div></td><td class="legendtext">'+sText+'</td></tr>';},_getDayHead:function(){var sText='';for(k=1;k<7;k++){sText+='<th class="daylim"><div class="dayhead">'+Calendar._SDN[k]+'</div></th>';}sText+='<th class="daylim"><div class="dayhead">'+Calendar._SDN[0]+'</div></th>';return sText;},_getDayHtml:function(iStatus,sDayNum){var sCssClass='';var sTitle='';switch(iStatus){case 0:sCssClass='dayoff';sTitle=Calendar._TT["RUNNOT"]break;case 1:sCssClass='dayon';sTitle=Calendar._TT["RUN"]break;case 2:sCssClass='dayout';sTitle=Calendar._TT["NOINFO"]break;case 3:sCssClass='monthout';break;}return'<td  ><div title ="'+sTitle+'" class="'+sCssClass+'">'+sDayNum+'</div></td>';},_getNavigation:function(oDate){var sNav='<table class="limitnavtbl"><tr><td class="navempptd">&nbsp;</td><td class="navtd">';if(this._actMonthIndex>0){sNav+=this._getNavItem(0,String.fromCharCode(171),Calendar._TT["BEGIN"]);sNav+='</td><td class="navtd">';sNav+=this._getNavItem(this._actMonthIndex-1,String.fromCharCode(8249),Calendar._TT["PREV_MONTH"]);}else{sNav+=this._getDisableNavItem(String.fromCharCode(171),Calendar._TT["BEGIN"]);sNav+='</td><td class="navtd">';sNav+=this._getDisableNavItem(String.fromCharCode(8249),Calendar._TT["PREV_MONTH"]);}sNav+='</td><td class="monthyear">'+Calendar._MN[oDate.getMonth()]+', '+oDate.getFullYear()+'</td><td class="navtd">';if(this._actMonthIndex<this._aiDateLim.length-1){sNav+=this._getNavItem(this._actMonthIndex+1,String.fromCharCode(8250),Calendar._TT["NEXT_MONTH"]);sNav+='</td><td class="navtd">';sNav+=this._getNavItem(this._aiDateLim.length-1,String.fromCharCode(187),Calendar._TT["END"]);}else{sNav+=this._getDisableNavItem(String.fromCharCode(8250),Calendar._TT["NEXT_MONTH"]);sNav+='</td><td class="navtd">';sNav+=this._getDisableNavItem(String.fromCharCode(187),Calendar._TT["END"]);}return sNav+'<td><td class="navempptd">&nbsp;</td></tr></table>';},_getNavItem:function(iIndex,sText,sTitle){return'<a onclick="javascript:return oDateLimit.showMonth(event, '+iIndex+');" '+'ondblclick="javascript:return oDateLimit.showMonth(event, '+iIndex+');" href="#" class="limnav" title="'+sTitle+'" >'+sText+'</a> ';},_getDisableNavItem:function(sText,sTitle){return'<span class="limnav" title="'+sTitle+'" >'+sText+'</span> ';},_doDateLimAjax:function(control,sCmd,params){var sKey=sCmd+params;if(goBalloonCache[sKey]){OnAjaxDateLimComplete(goBalloonCache[sKey],GetObjectParams(control,sKey,false),"GetDateLimit");}else{AjaxUPbeginRequest();var settings={url:sAppPath+'AJAXService.asmx/GetDateLimit',data:'{"iLang":"'+oBaseParams.get_Lang()+'","sCmd":"'+sCmd+'","sControl":"'+control+'","sParams":"'+params+'","bDivHtml":'+(this._innerHtml=='')+'}',success:function(data){OnAjaxDateLimComplete(data.d,GetObjectParams(control,sKey,true),'GetDateLimit');}}$.ajax($.extend(AjaxDefaultSettings(),settings));}},ajaxDivReplace:function(sId,sResult){var oNewElemContainer=document.createElement("div");var oOldNode=document.getElementById(sId);if(sId==sBalloonDiv){if(oOldNode){oNewElemContainer.innerHTML=sResult;oNewElemContainer.childNodes[0].style.display="block";oOldNode.parentNode.replaceChild(oNewElemContainer.childNodes[0],oOldNode);oOldNode=document.getElementById(sId);$(oOldNode).click(BalloonClick);if(oOldNode){SetDivPosition(oOldNode);}}if(IsMSIE6older()){if(IsPopUpWindow()){HideIframe.Apply(sBalloonDiv,'popmother-inner',true);}else{HideIframe.Apply(sBalloonDiv,'mother-inner',true);}}StartDragElAjax(document.getElementById(sBalloonDiv));}}}function OnAjaxDateLimComplete(result,aoParams,methodName){try{if(aoParams['postback']==true)AjaxUPendRequest();if(IsAJAXResultOK(result)){oDateLimit.prepareData(aoParams['control'],result);if(aoParams['postback']==true&&result!=''&&aoParams['key']!=''){goBalloonCache[aoParams['key']]=result;}}else{HideDiv(sBalloonDiv);}}catch(err){alert(err);}}function DoDivAjax(control,sCmd,params){var sKey=sCmd+params;if(goBalloonCache[sKey]){onAjaxDivComplete(goBalloonCache[sKey],GetObjectParams(control,sKey,false),"GetDiv");}else{AjaxUPbeginRequest();var settings={url:sAppPath+'AJAXService.asmx/GetDiv',data:'{"iLang":"'+oBaseParams.get_Lang()+'","sControl":"'+control+'","sCmd":"'+sCmd+'","sParams":"'+params+'"}',success:function(data){onAjaxDivComplete(data.d,GetObjectParams(control,sKey,true),'GetDiv');}}$.ajax($.extend(AjaxDefaultSettings(),settings));}}function GetObjectParams(sControl,sKey,bIsPostback){var aoArray=new Array();aoArray['control']=sControl;aoArray['key']=sKey;aoArray['postback']=bIsPostback;return aoArray;}function onAjaxDivComplete(result,aoParams,methodName){try{if(aoParams['postback']==true)AjaxUPendRequest();if(IsAJAXResultOK(result)){switch(methodName){case"GetDiv":try{if(aoParams['postback']==true&&result!=''&&aoParams['key']!=''){goBalloonCache[aoParams['key']]=result;}if(aoParams['control']!='')AjaxDivReplace(aoParams['control'],result);if(aoParams['key'].indexOf('PrintSettings')==0)PrintSettings.Load();}catch(err){HandlerError(err);}break;case"GetMC":GetMCHandle(aoParams['control'],result);break;case"MCAddConnections":case"MCDeleteConnection":GetMCHandle(aoParams['control'],result);MCPanelChanged();break;case"DeleteConnection":if(IsPopUpWindow())MCWindowChanged(-1);break;}}}catch(err){alert(err);}}function AjaxDivReplace(sId,sResult){var oNewElemContainer=document.createElement("div");var oOldNode=document.getElementById(sId);if(sId==sBalloonDiv){if(oOldNode){oNewElemContainer.innerHTML=sResult;oNewElemContainer.childNodes[0].style.display="block";oOldNode.parentNode.replaceChild(oNewElemContainer.childNodes[0],oOldNode);oOldNode=document.getElementById(sId);$(oOldNode).click(BalloonClick);if(oOldNode){SetDivPosition(oOldNode);}if(sActDiv=="ttsel"){oComb=$get("tt1st");if(oComb)oComb.focus();}}if(IsMSIE6older()){if(IsPopUpWindow()){HideIframe.Apply(sBalloonDiv,'popmother-inner',true);}else{HideIframe.Apply(sBalloonDiv,'mother-inner',true);}}StartDragElAjax(document.getElementById(sBalloonDiv));}}function onAjaxDivFailed(xhr,status,exception){try{AjaxUPendRequest();if(xhr.status==0){return;}if(status=='timeout'){alert(sTimeOut);}else{alert(sNoData1+xhr.statusText+sNoData2+xhr.status+")");}}catch(err){HandlerError(err);}}function AjaxUPbeginRequest(){try{window.status=sLoadingData;document.body.className+=" ajaxwait";document.getElementById("pagehourglass").style.display="block";if(IsMSIE6older()){if(IsPopUpWindow()){HideIframe.Apply("pagehourglass",'popupbody',true);}else{HideIframe.Apply("pagehourglass",'mainbody',true);}}}catch(e){HandlerError(e);}}function AjaxUPendRequest(sender,args){try{if(IsMSIE6older()){if(IsPopUpWindow()){HideIframe.Discard("pagehourglass",'popupbody');}else{HideIframe.Discard("pagehourglass",'mainbody');}}window.status="";document.body.className=document.body.className.replace(/ajaxwait/g,"");try{document.getElementById("pagehourglass").style.display="none";}catch(ex){}}catch(e){HandlerError(e);}}function IsAJAXResultOK(sResult){if(sResult==null){return false}if(sResult.indexOf("<error>")>=0){var s=sResult.replace(/<inner>/g,"").replace(/<\/inner>/g,"").replace(/<message>/g,"").replace(/<\/message>/g,"").replace(/<error>/g,"").replace(/<\/error>/g,"").replace(/\r\n\r\n/g,"\r\n").replace(/\r\n\r\n/g,"\r\n");while(s.indexOf('\r\n')==0)s=s.substr(2);alert(s);return false;}else{return true;}}function AjaxDefaultSettings(){return{type:"POST",contentType:"application/json; charset=utf-8",dataType:'json',beforeSend:function(xhr){xhr.setRequestHeader('idoskey',sIDOSKey);},error:function(xhr,status,exception){onAjaxDivFailed(xhr,status,exception);}}}InputObject=function(textBoxId,hiddenId,serviceUrl,bindElementId,selectedTT,historyDisabled){this._textBoxId=textBoxId;this._hiddenId=hiddenId;this._serviceUrl=serviceUrl;this._bindElementId=bindElementId;this._selectedTT=selectedTT;this._historyDisabled=historyDisabled;this._selmodeID=this._textBoxId.substring(0,this._textBoxId.length-1)+'sel';}InputObject.prototype={init:function(){this._initAutocomplete();if(typeof($('#'+this._selmodeID).jeegoocontext)!="undefined")$('#'+this._selmodeID).jeegoocontext('menu',this._textBoxId.substring(0,this._textBoxId.length-1));if(typeof(oSelMode)!="undefined")oSelMode.SetTxt(this._selmodeID);},_initAutocomplete:function(){var me=this;var options={selectFirst:false,dataType:"json",max:20,delay:200,scroll:false,matchSubset:false,highlight:false,cacheLength:0,extraParams:{selectedTT:this._selectedTT,bindElementValue:function(){if(!me._bindElementId)return'';return $('#'+me._bindElementId).val();}},formatItem:function(data,i,max,value,term){return data.Text;},parse:function(data){var array=new Array();if(data.d){for(var i=0;i<data.d.length;i++){array[array.length]={data:data.d[i],value:data.d[i].Value,result:data.d[i].Text};}}return array;}}if(!this._historyDisabled){options.getEmptySelectionData=function(){if(typeof(oSelMode)=="undefined"){return ACEGetHistory(gasHistoryPOI,"IdosHist");}var oSel=oSelMode.GetSelHValues(me._selmodeID);if(oSel.sSelectMode=="1"){return ACEGetHistory(gasHistoryAP,"IdosHistAP");}else{return ACEGetHistory(gasHistoryPOI,"IdosHist");}}}$('#'+this._textBoxId).autocomplete(this._serviceUrl,options);$('#'+this._textBoxId).result(function(event,data,formatted){var sValue=data.Value;if(sValue=='#')sValue='';if(me._hiddenId)$('#'+me._hiddenId).val(data.Text+"%"+sValue);});},unautocomplete:function(){$('#'+this._textBoxId).unautocomplete();},Title:function(){if(typeof(asTxtCatIdTitle)=='undefined')return;var oSel=oSelMode.GetSelHValues(this._selmodeID);var sText='';var iTextBoxId=GetTypeIdx(GetType(this._textBoxId));if(iTextBoxId!=5){sText=asTxtTitle[iTextBoxId]+', ';}var sCss='';switch(oSel.sSelectMode){case'1':if(iTextBoxId==5){sAdrTitle=sAdrTitle.substr(0,1).toUpperCase()+sAdrTitle.substr(1,sAdrTitle.length-1);}sText+=sAdrTitle;break;default:for(i=0;i<=asTxtCatIdTitle.length;i++){if((asTxtCatIdTitle[i]==oSel.sCat&&oSel.sCat!='')||(i==0&&oSel.sCat=='')){sText+=sPoiTitleStart+' '+asTxtCatTitle[i];}}sText+=sPoiTitleEnd;break;}var oText=$("#"+this._textBoxId)[0];oText.title=sText;}}InputObjectManagerClass=function(){this._items=[];}InputObjectManagerClass.prototype={add:function(id,inputObject){this._items[id]=inputObject;inputObject.init();},remove:function(id){this._items[id].unautocomplete();this._items[id]=null;},getItem:function(id){if(this._items[id]&&this._items[id]._textBoxId==id){return this._items[id]}return null;}}var InputObjectManager=new InputObjectManagerClass();function ACEGetHistory(gasHistory,sCookieID){try{if(gasHistory!=null)return gasHistory;var oHistory=new Cookie(document,sCookieID,null,null);oHistory.load();gasHistory=new Array();for(i=1;i<=6;i++){var sStat=unescape(decodeURI((eval("oHistory.o"+i)))).replace(/\+/g,' ');if(sStat!=undefined&&sStat!="undefined"){gasHistory[i-1]={data:{Text:sStat,Value:''},value:sStat,result:sStat};}else{return gasHistory;}}return gasHistory;}catch(e){gasHistory=null;return null;}}function STp(iID){if(typeof oAdvTooltip=='object'){return oAdvTooltip.delayShowTip(iID);}}function HTp(){if(typeof oAdvTooltip=='object'){return oAdvTooltip.HideTip();}}AdvancedToolTip=function(asTexts,aoItems){this._offsetxpoint=-3;this._offsetypoint=25;this._tipobj=$('#advtooltip')[0];this._showTip=false;this._ns6=document.getElementById&&!document.all;this._aoAdvTitleItem=aoItems;this._asTexts=asTexts;this._delayID=-1;this._delayEvent=null;this._delay=null;}AdvancedToolTip.prototype={Position:function(e){if(this._showTip){var curX=(this._ns6)?e.pageX:e.clientX+this._getBody().scrollLeft;var curY=(this._ns6)?e.pageY:e.clientY+this._getBody().scrollTop;var rightedge=document.all&&!window.opera?this._getBody().clientWidth-e.clientX-this._offsetxpoint:window.innerWidth-e.clientX-this._offsetxpoint-20;var bottomedge=document.all&&!window.opera?this._getBody().clientHeight-e.clientY-this._offsetypoint:window.innerHeight-e.clientY-this._offsetypoint-20;var leftedge=(this._offsetxpoint<0)?this._offsetxpoint*(-1):-1000;if(rightedge<this._tipobj.offsetWidth){this._tipobj.style.left=document.all?this._getBody().scrollLeft+e.clientX-this._tipobj.offsetWidth+"px":window.pageXOffset+e.clientX-this._tipobj.offsetWidth+"px"}else if(curX<leftedge){this._tipobj.style.left="5px";}else{this._tipobj.style.left=curX+this._offsetxpoint+"px";}if(bottomedge<this._tipobj.offsetHeight){this._tipobj.style.top=document.all?this._getBody().scrollTop+e.clientY-this._tipobj.offsetHeight-this._offsetypoint+"px":window.pageYOffset+e.clientY-this._tipobj.offsetHeight-this._offsetypoint+"px";}else{this._tipobj.style.top=curY+this._offsetypoint+"px";}this._tipobj.style.visibility="visible";}else if(this._delayEvent){this._delayEvent.pageX=e.pageX;this._delayEvent.pageY=e.pageY;this._delayEvent.clientX=e.clientX;this._delayEvent.clientY=e.clientY;}},delayShowTip:function(iID){this._delayID=iID;this._delayEvent=new ATIEvent;setTimeout("oAdvTooltip.ShowTip("+iID+")",250);},ShowTip:function(iID){if(iID==this._delayID&&this._delayEvent&&this._delayEvent.pageX>-1){if(this._ns6||document.all){this._tipobj.innerHTML=this._aoAdvTitleItem[iID].Show(this._asTexts);this._showTip=true;this.Position(this._delayEvent);return false;}}},HideTip:function(){if(this._ns6||document.all){clearTimeout(this._delay);this._showTip=false;this._tipobj.style.visibility="hidden";this._tipobj.style.left="-500px";this._delayID=-1;this._delayEvent=null;}},_getBody:function(){if(document.compatMode&&document.compatMode!="BackCompat"){return document.documentElement;}else{return document.body;}}}ATI=function(sPricina,sOd,sPlanDo,sAktual,sUsek){this._sPricina=sPricina;this._sOd=sOd;this._sPlanDo=sPlanDo;this._sAktual=sAktual;this._sUsek=sUsek;}ATI.prototype={Show:function(asTexts){var sText='';sText+='<div class="advtiphead"><h2>'+asTexts[0]+': '+this._sUsek+'</h2></div><div class="advtipbody">';if(this._sPricina!=''){sText+=asTexts[1]+': '+this._sPricina+'<br />';}if(this._sOd!=''){sText+=asTexts[2]+': '+this._sOd+'<br />';}if(this._sPlanDo!=''){sText+=asTexts[3]+': '+this._sPlanDo+'<br />';}if(this._sAktual!=''){sText+=asTexts[4]+': '+this._sAktual;}return sText+'</div>';}}ATIEvent=function(){this.pageX=-1;this.pageY=0;this.clientX=0;this.clientY=0;}function $get(id){return document.getElementById(id);}function HandlerError(e){}function dumpProps(obj,parent){for(var i in obj){if(parent){var msg=parent+"."+i+"\n"+obj[i];}else{var msg=i+"\n"+obj[i];}if(!confirm(msg)){return;}if(typeof obj[i]=="object"){if(parent){dumpProps(obj[i],parent+"."+i);}else{dumpProps(obj[i],i);}}}}PrintSettingsObject=function(){this._Cookie=new Cookie(document,'IdosSettings',365*24,'/');this._Cookie.load();if(!this._Cookie.prn){this._Cookie.prn=127;this._Cookie.store();}}PrintSettingsObject.prototype={Load:function(){this._Cookie.load();var printSettings=$('div.printsettings input[id^=print]');var printValue=this._Cookie.prn;for(var i=0;i<printSettings.length;i++){printSettings[i].checked=(printValue&printSettings[i].value)!=0;}},Save:function(){var printSettings=$('div.printsettings input[id^=print]');var printValue=this._Cookie.prn;for(var i=0;i<printSettings.length;i++){if(printSettings[i].checked){printValue=(printValue|printSettings[i].value);}else{printValue=(printValue&~printSettings[i].value);}}this._Cookie.prn=printValue;this._Cookie.store();HideDiv('balloondiv');},Default:function(){var printSettings=$('div.printsettings input[id^=print]');for(var i=0;i<printSettings.length;i++){printSettings[i].checked=true;}}}var PrintSettings=new PrintSettingsObject();function IsCoor(sText){var regex=new RegExp("(utm|s42|jtsk|loc):(.+);(.+)","i");return(sText.search(regex)>-1)}