﻿
/*******************************************************************/
/*                                                                 */
/* Copyright (c) 2005-2008 Jasob.com                               */
/*                                                                 */
/* This obfuscated code was created by Jasob 3.1 Trial Version.    */
/* The code may be used for evaluation purposes only.              */
/* To obtain full rights to the obfuscated code you have to        */
/* purchase the license key (http://www.jasob.com/Purchase.html).  */
/*                                                                 */
/*******************************************************************/

var _ReportScriptToEvalAfterLoadingReport=null;function ExecuteReportScriptToEvalAfterLoadingReport(){eval(_ReportScriptToEvalAfterLoadingReport);};function ViewPropertyReport(g,cS,ga){var F=_SSR.GetResultByID(g,"SITES");if(F==null){RequestSiteByID(g,{Tab:cS,Radius:ga});}else{_SSR._StopProcessCurrentIterativeAsyncResultOperation=true;RemoveMarkers(_mapBar.map,_propertyMarkers);var H=FindPropertyMarker(g);if(H==null){H=_SiteSearchResultBuilder.CreateMarker(null,F);};_mapBar.map.addOverlay(H);_propertyMarkers=[];_propertyMarkers.push(H);ZoomToProperty(H.ID);var l="~/main/PropertyDetails.aspx?ID="+g;l+="&RIDA="+_GISP_Theme;CreateLoadingScreen("CONTENT");CreateCurrentReportHeaderAndFooter();if(cS!=null){l+="&tab="+cS;};var c=_SSR.GetReportByTypeAndID("SITES",g);if(c!=null){_SSR._CurrentReportID=c.UniqueID;ShowCurrentReport();c.TabCollection.SetTabByToken("FULL");}else{c=new GISP_Report({Name:"Property Report",Parameters:{Lat:F.lat,Lng:F.lng,RIDA:_GISP_Theme,Radius:ga}});c.ID=g;c.Type="SITES";_SSR._Reports.push(c);l+="&UniqueID="+c.UniqueID;if(ga!=null){l+="&Radius="+ga}TVAGoogle.common.services.DocumentLoader.GetReportAsHTML(l,c.UniqueID,DisplayReport);};};};function RequestSiteByID(g,r){CreateLoadingScreen("CONTENT");var fn=GISPlanning_MapUtilities_GUID();TVAGoogle.common.services.Sites.GetSiteByIDWithInputParams(g.replace("SITES_",""),r,fn,RequestSiteByIDSuccess,RequestSiteByIDFailed);};function RequestSiteByIDSuccess(f){f.Results[0].ID="SITES_"+f.Results[0].ID;_SSR._AddResult(f.Results[0],f.Type);ViewPropertyReport(f.Results[0].ID,f.InputParameters[1].Tab,f.InputParameters[1].Radius);};function RequestSiteByIDFailed(dk){alert("Unable to find site:"+dk._message);};function ViewCommunityReport(g,cS){var F=_SSR.GetResultByID(g,"COMMUNITY");if(F==null){RequestCommunityByID(g,{Tab:cS});}else{_SSR._StopProcessCurrentIterativeAsyncResultOperation=true;RemoveMarkers(_mapBar.map,_propertyMarkers);var H=FindPropertyMarker(g);if(H==null){H=_CommunitySearchResultBuilder.CreateMarker(null,F);};_mapBar.map.addOverlay(H);_propertyMarkers=[];_propertyMarkers.push(H);var l="~/main/CommunityDetails.aspx?ID="+g+"&Placecode="+F.Placecode;CreateLoadingScreen("CONTENT");CreateCurrentReportHeaderAndFooter();if(cS!=null){l+="&tab="+cS;};var c=_SSR.GetReportByTypeAndID("COMMUNITY",g);if(c!=null){_SSR._CurrentReportID=c.UniqueID;ShowCurrentReport();c.TabCollection.SetTabByToken("FULL");}else{c=new GISP_Report({Name:"Community Report",Parameters:{Lat:F.lat,Lng:F.lng,Placecode:F.Placecode}});c.ID=g;c.Type="COMMUNITY";_SSR._Reports.push(c);l+="&UniqueID="+c.UniqueID;TVAGoogle.common.services.DocumentLoader.GetReportAsHTML(l,c.UniqueID,DisplayReport);};};};function RequestCommunityByID(g,r){CreateLoadingScreen("CONTENT");var fn=GISPlanning_MapUtilities_GUID();TVAGoogle.common.services.Community.GetCommunityByIdWithInputParameters(g.replace("COMMUNITY_",""),r,fn,RequestCommunityByIDSuccess,RequestCommunityByIDFailed);};function RequestCommunityByIDSuccess(f){_SSR._AddResult(f.Results[0],f.Type);ViewCommunityReport(f.Results[0].ID,f.InputParameters[1].Tab);};function RequestCommunityByIDFailed(dk){alert("Unable to find community:"+dk._message);};function ViewBusinessReport(g){var c=_SSR.GetReportByTypeAndID("SITES",g);if(c!=null){_SSR._CurrentReportID=c.UniqueID;ShowCurrentReport();c.TabCollection.SetTabByToken("BUSINESS");}else{ViewPropertyReport(g,"BUSINESS");};};function ViewDemographicReport(g,d){var m=g.substring(0,g.indexOf("_"));var F=_SSR.GetResultByID(g,m);var c=_SSR.GetReportByTypeAndID(m,g);if(c!=null){var v=_SSR.GetReportByUniqueID(c.SubReports[d]);_SSR._CurrentReportID=c.UniqueID;ShowCurrentReport();c.TabCollection.SetTabByToken(d);}else{switch(m){case "SITES":ViewPropertyReport(g,d);break;case "COMMUNITY":ViewCommunityReport(g,d);break;};};};function ViewComparisonReport(fK,d){_SSR._StopProcessCurrentIterativeAsyncResultOperation=true;var l="~/main/ComparisonReport.aspx?IDS="+fK+"&Type="+d;CreateLoadingScreen("CONTENT");CreateCurrentReportHeaderAndFooter();var c=new GISP_Report({Name:"Comparison Report",Parameters:{IDs:fK,Type:d}});c.ID=GISPlanning_MapUtilities_GUID();c.Type="COMPARISON";_SSR._Reports.push(c);l+="&UniqueID="+c.UniqueID;TVAGoogle.common.services.DocumentLoader.GetReportAsHTML(l,c.UniqueID,DisplayReport);};function CreateResultsReport(hz){var c=new GISP_Report({Name:"Results Report",Parameters:{Title:"Results Report",Icon:"RESULTS"}});c.ID=c.UniqueID;c.Type="GENERIC";c.Content='\
        <form>\
            <div id="divScriptToEval">\
                <script type="text/javascript">\
                    var c = _SSR.GetReportByUniqueID(\''+c.UniqueID+'\');\
                    c.TabCollection = new GISP_ReportTabs([\
                        new GISP_ReportTab($(\'#hrefReportTab_0\')[0], { Token: "REPORT", Name: "Report", Active: true, Tooltip: "Click here to view the report", Callback: function() { LoadGenericSubReport(\''+c.UniqueID+'\'); } })\
                    ]);\
                </script>\
            </div>\
            <div>\
                <table cellpadding="0" cellspacing="0" border="0" width="100%" class="ReportHeaderTable left">\
                    <tr>\
                        <td id="exportReportHeader"></td>\
                    </tr>\
                    <tr>\
                        <td colspan="3" id="tdSubReportPlaceholder">\
                            <div id="SubReportNodeToReplace"></div>\
                        </td>\
                    </tr>\
                </table>\
            </div>\
            <div id="rptParamaters"></div>\
            </form>';var v=new GISP_Report({Name:"Results Report",Parameters:{Title:"Results Report",Icon:"RESULTS"}});v.Properties["ParentReportID"]=c.UniqueID;v.Type="GENERIC";v.Content=hz;c.SubReports["GENERIC"]=v.UniqueID;_SSR._Reports.push(c);_SSR._Reports.push(v);return v.UniqueID;};function ViewGenericReport(I){var c=_SSR.GetReportByUniqueID(I);_SSR._StopProcessCurrentIterativeAsyncResultOperation=true;RemoveMarkers(_mapBar.map,_propertyMarkers);var l="~/main/GenericReport.aspx?UniqueID="+I;l+="&Title="+c.Parameters["Title"];l+="&Icon="+c.Parameters["Icon"];CreateLoadingScreen("CONTENT");CreateCurrentReportHeaderAndFooter();TVAGoogle.common.services.DocumentLoader.GetReportAsHTML(l,c.UniqueID,DisplayReport);};function DisplayReport(cK){var aF=document.createElement("div");aF.innerHTML=cK.Value;var cb=aF.getElementsByTagName("form")[0];var cQ=aF.getElementsByTagName("script");var df=document.createElement("div");df.innerHTML=cb.innerHTML;var c=_SSR.GetReportByUniqueID(cK.Key);c.Content=df;_SSR._CurrentReportID=c.UniqueID;ShowCurrentReport();if(cQ.length>0){var au=function(){eval(cQ[0].innerHTML);};setTimeout(au,10);};};function ShowCurrentReport(){SetCurrentTypeButton("Current");_SSR.ClearCurrentReportOverlays();CreateCurrentReportHeaderAndFooter();if(_SSR._CurrentReportID==null){DisplayNoResultsMessage("There is not a report currently being viewed. Select a report from a property or the menu.");}else{var c=_SSR.GetCurrentReport();ReplaceView("CONTENT",c.Content);c.ZoomBounds();};};function CreateCurrentReportHeaderAndFooter(){ClearHeaderAndFooter();};function ShowSavedReports(){SetCurrentTypeButton("Reports");_SSR.ClearCurrentReportOverlays();if(_SSR._SavedReports.length==0){DisplayNoResultsMessage("You currently have not saved a report. When viewing a report, click the SAVE button and it will be viewable here.");}else{var gb=document.createElement("div");var ac='<table cellpadding="2" cellspacing="0" border="0" style="width:100%">';for(var i=0;i<_SSR._SavedReports.length;i++){var c=_SSR.GetReportByUniqueID(_SSR._SavedReports[i]);var cz=i%2==0?"rowStyle_a":"rowStyle_b";ac+='<tr class="'+cz+'"><td><img src="'+c.Icon+'" alt="icon"/></td><td><div class="title">'+c.Description+'</div></td><td><a href="javascript:ViewSavedReport(\''+c.UniqueID+'\')">View Report</a></td></tr>';}ac+="</table>";gb.innerHTML=ac;ReplaceView("CONTENT",gb,true);};var dT=document.createElement("div");GISPlanning_MapUtilities_SetHTMLAttributes(dT,{className:"right"});GISPlanning_MapUtilities_SetHTMLAttributes(dT.style,{paddingRight:"10px",paddingBottom:"3px"});var fU=document.createElement("a");GISPlanning_MapUtilities_SetHTMLAttributes(fU,{className:"tinyButtonLink PagingLink",href:"javascript:ShowReportExporter();",innerHTML:"<img src='/common/images/buttons/export_inactive.png' align='absmiddle'><span>Export</span>&nbsp;&nbsp;&nbsp;"});dT.appendChild(fU);ReplaceView("HEADER",dT);var myExportLink2 = document.createElement("a");GISPlanning_MapUtilities_SetHTMLAttributes(myExportLink2, { className: "tinyButtonLink PagingLink", href: "javascript:clearreports();", innerHTML: "<img src='/common/images/buttons/save_inactive.png' align='absmiddle'><span>Clear Reports</span>" });dT.appendChild(myExportLink2);}function ViewSavedReport(ao){SetCurrentTypeButton("Current");var c=_SSR.GetReportByUniqueID(ao);var T=_SSR.GetReportByUniqueID(c.Properties["ParentReportID"]);if((FindPropertyMarker('<%=_ID %>')==null)&&(T.PropertyMarker!=null)){_propertyMarkers.push(T.PropertyMarker);_mapBar.map.addOverlay(T.PropertyMarker);ZoomToProperty(T.PropertyMarker.ID);};ReplaceView("CONTENT",T.Content);T.TabCollection.SetTabByToken(c.Type);};function SaveReport(ao){var c=_SSR.GetReportByUniqueID(ao);_SSR.SaveReport(ao);if(c.SaveFunction!=null){c.SaveFunction();};jQuery.noticeAdd({text:'Your report has been saved, you can view it here.',stay:false,appendTo:'#divSavedReportsCell'});};function PopoutReport(cJ){var c=_SSR.GetReportByUniqueID(cJ);var T=_SSR.GetReportByUniqueID(c.Properties.ParentReportID);var cO=GISPlanning_MapUtilities_GUID();var bJ=$(T.Content).clone()[0];var al=$(c.Content).clone()[0];GISP_RemoveNonPopout(bJ);GISP_RemoveNonPopout(al);$(al).find("a:not(.functionOveride)").each(function(){this.setAttribute("href",this.href.replace("javascript:","javascript:window.opener."));});$(bJ).find("a:not(.functionOveride)").each(function(){this.setAttribute("href",this.href.replace("javascript:","javascript:window.opener."));});var ct=bJ.innerHTML;_popupTracker.AddContent(cO,ct);var l="main/reportViewers/default.aspx";switch(c.Type){case "BUSINESS":l="main/reportViewers/business.aspx";};l+="?id="+cO;GISPlanning_Popup_Window(l,{});};function ViewReportHistory(){alert("This has not been implemented yet");};function PrintReport(cJ){var c=_SSR.GetReportByUniqueID(cJ);var T=_SSR.GetReportByUniqueID(c.Properties.ParentReportID);var cO=GISPlanning_MapUtilities_GUID();var bJ=$(T.Content).clone()[0];var al=$(c.Content).clone()[0];GISP_RemoveNonPopout(bJ);GISP_RemoveNonPopout(al);GISP_RemoveNonExportable(bJ);GISP_RemoveNonExportable(al);var ct=bJ.innerHTML;_popupTracker.AddContent(cO,ct);var l="main/reportViewers/printreport.aspx";l+="?id="+cO;GISPlanning_Popup_Window(l,{});};function ExportReport(cJ){$find("mpeExport").show();ResetExportForm();var bO=$get("hfldExport");bO.value=cJ;var cW=$get("ifrmExport");cW.style.display="none";$get("tblExport").style.display="none";$get("tblExportLoading").style.display="block";var bO=$get("hfldExport");var dc=bO.value;var fp=function(){var c=_SSR.GetReportByUniqueID(dc);var T=_SSR.GetReportByUniqueID(c.Properties.ParentReportID);var bK=$(T.Content).find("#exportReportHeader").clone()[0];var al=$(c.Content).clone()[0];GISP_RemoveNonExportable(bK);GISP_RemoveNonExportable(al);GISP_RemoveFunctionHyperlinks(bK);GISP_RemoveFunctionHyperlinks(al);var aQ=$("#mapCell").clone()[0];GISP_RemoveNonExportable(aQ);$(aQ).find(".gmnoprint").remove();var dm="<div style='padding:10px'><div style='position:relative;width:960px;height:450px;'>"+aQ.innerHTML+"</div></div>";var al=bK.innerHTML+al.innerHTML;var cf=[];cf.push(escape(dm),escape(al));TVAGoogle.common.services.DocumentLoader.RegisterExportReport(dc,cf,dc,ExportReport_Success,ExportReport_Failure);};setTimeout(fp,10);};function SetupExportForm(d){$(".exportButton").each(function(){GISPlanning_SetImageInactive($(this).find("img:first")[0])});GISPlanning_SetImageActive($(d).find("img:first")[0]);var m=d.getAttribute("exportType");var cu=$get("ifrmExport");var bq=$get("hfldExport").value;var bY=escape($get("ctl00_cphModal_tboxReportHeader").value);cu.setAttribute("src","/main/exporter.aspx?type="+m+"&ID="+bq+"&title="+bY+"&callBack=CloseExportForm");cu.style.display="inline";};function ExportReport_Success(result){_ExportContentLoadedInSession=true;$get("tblExport").style.display="block";$get("tblExportLoading").style.display="none";};function ExportReport_Failure(error){alert('exporting failed. '+error._message);};function CloseExportForm(){$find("mpeExport").hide();$get("tblExport").style.display="block";$get("tblExportLoading").style.display="none";return false;};function ResetExportForm(){_ExportContentLoadedInSession=false;$(".exportButton").each(function(){GISPlanning_SetImageInactive($(this).find("img:first")[0])});$get("hfldExport").value="";$get("hfldExportType").value="";$get("ifrmExport").style.display="none";$get("ctl00_cphModal_tboxReportHeader").value="";return false;};function ShowExportLoading(){$get("tblExport").style.display="none";$get("tblExportLoading").style.display="block";};function ShowReportExporter(){$get("tblExportParams").style.display="none";$get("tblReportExporter").style.display="none";$get("tblReportExporterLoading").style.display="block";$("#ctl00_cphModal_pnlReportExporter").css({height:"310px",width:"500px"});$find("mpeReportExporter").show();if(typeof(ReportExporter)=="undefined"){var ah=new GISPlanning_MapUtilities_ScriptLoader("/common/scripts/ReportExporter.js","ReportExporter",ShowReportExporter);ah.Load();}else{DestroyREExistingDragDrop();DisplayInlineTable("tblExportParams");$get("tblReportExporter").style.display="none";$get("tblReportExporterLoading").style.display="none";ResetExportForm();var bO=$get("hfldReportExport");var bq=GISPlanning_MapUtilities_GUID();bO.value=bq;var cW=$get("ifrmReportExport");cW.style.display="none";};};function SetupReportExportForm(d){var m=d.getAttribute("exportType");var bq=$get("hfldReportExport").value;var bY=escape($get("ctl00_cphModal_tboxReportExportHeader").value);var bO=$get("hfldReportExport");bO.value="/main/exporter.aspx?type="+m+"&ID="+bq+"&title="+bY+"&callBack=CloseReportExportForm";$get("tblExportParams").style.display="none";$get("tblReportExporter").style.display="block";CreateReportExorterSelectionList();};function CloseReportExportForm(){$find("mpeReportExporter").hide();$get("tblExportParams").style.display="none";$get("tblReportExporter").style.display="none";$get("tblReportExporterLoading").style.display="block";return false;};function GISP_Report(r){var me=this;this._UniqueID=GISPlanning_MapUtilities_GUID();this._Type='';this._ID='';this._SubReports={};this._Content=document.createElement("div");this._Overlays={};this._Bounds=null;this._ZoomModifier=0;this._Parameters={};this._Properties={};this._ZoomBounds=function(dC,gz){if(dC!=null){me._Bounds=dC;};if(gz!=null){me._ZoomModifier=gz;};if(me._Bounds!=null){_mapBar.map.setZoom(_mapBar.map.getBoundsZoomLevel(me._Bounds)+(me._ZoomModifier));_mapBar.map.setCenter(me._Bounds.getCenter());};};this._SetBounds=function(dC){me._Bounds=dC;};this._GetBounds=function(){return me._Bounds;};var J={Name:"",Icon:null,Parameters:null,Description:"",DisplayImageURL:""};for(var o in J){if(typeof(r[o])!="undefined"){me['_'+o]=r[o];};};this._Dispose=function(){me._Bounds=null;me._Content=null;for(var o in me._Overlays){if(me._Overlays[o].ClickEventHandler!=undefined){GEvent.removeListener(me._Overlays[o].ClickEventHandler);}me._Overlays[o]=null;};me._Overlays=0;for(var o in me._Properties){me._Properties[o]=null;};me._Properties=null;for(var o in me._Parameters){me._Parameters[o]=null;};me._Parameters=null;if(me.TabCollection!=undefined){me.TabCollection.Dispose();}me.TabCollection=null;me.ModifyFunction=null;me.SaveFunction=null;me.ResetFunction=null;me.ShowParametersFunction=null;me=null;};return new function(){this.UniqueID=me._UniqueID;this.ID=me._ID;this.Type=me._Type;this.Content=me._Content;this.Name=me._Name;this.Icon=me._Icon;this.Description=me._Description;this.DisplayImageURL=me._DisplayImageURL;this.Parameters=me._Parameters;this.Properties=me._Properties;this.Overlays=me._Overlays;this.SubReports=me._SubReports;this.SetBounds=me._SetBounds;this.GetBounds=me._GetBounds;this.ZoomBounds=me._ZoomBounds;this.Dispose=me._Dispose;};};function FindAllReportInCollectionByTypeAndID(d,g,cl){var bt=[];for(var i=0;i<cl.length;i++){if(cl[i].Type==d&&cl[i].ID==g){bt.push(cl[i]);break;};};return bt;};function FindFirstReportInCollectionByTypeAndID(d,g,cl){var bt=FindAllReportInCollectionByTypeAndID(d,g,cl);return bt.length>0?bt[0]:null;};function ShowReportParameterInput(I){var c=_SSR.GetReportByUniqueID(I);$get('ctl00_cphSubreportContent_pnlParameters').style.display='block';$get('ctl00_cphSubreportContent_pnlReport').style.display='none';if(c.ShowParametersFunction!=null){c.ShowParametersFunction();};};function CancelModifyReport(){$get('ctl00_cphSubreportContent_pnlParameters').style.display='none';$get('ctl00_cphSubreportContent_pnlReport').style.display='block';};function ModifyReport(I){var c=_SSR.GetReportByUniqueID(I);if(c.ModifyFunction!=null){c.ModifyFunction();};_SSR.DeleteReportIfNotSaved(I);};function ResetReport(I){var c=_SSR.GetReportByUniqueID(I);if(c.ResetFunction!=null){c.ResetFunction();};};function VerifySaveBeforeModify(){var ij=$find('mpeSaveModify');ij.show();};function LoadSubPropertyReport(g,d,I){var c=_SSR.GetReportByUniqueID(I);var l='';switch(d){case "FULL":l="~/main/reports/FullProperty.aspx?";break;case "COMMUNITY":l="~/main/reports/FullCommunity.aspx?";break;case "BUSINESS":l="~/main/reports/Business.aspx?";break;case "CONSUMERSPENDING":l="~/main/reports/ConsumerSpending.aspx?";break;case "DEMOGRAPHICS":l="~/main/reports/DEMOGRAPHICS.aspx?";break;case "LABORFORCE":l="~/main/reports/LABORFORCE.aspx?";break;case "COMMUNITY":l="~/main/reports/community.aspx?";break;case "DRIVETIME":l="~/main/reports/drivetime.aspx?";break;};l+="ID="+g+"&lat="+c.Parameters["Lat"]+"&lng="+c.Parameters["Lng"]+"&RIDA="+c.Parameters["RIDA"];if(c.Parameters["Radius"]!=null){l+="&Radius="+c.Parameters["Radius"]}if(c.Type=="COMMUNITY"){l+="&Placecode="+c.Parameters["Placecode"];};CreateLoadingScreen("SUBREPORT");_SSR.ClearCurrentReportOverlays();var v=_SSR.GetReportByUniqueID(c.SubReports[d]);if(v!=null){ReplaceView("SUBREPORT",v.Content);v.ZoomBounds();var cY=function(){_SSR.LoadReportOverlays(v.UniqueID);};setTimeout(cY,1);}else{v=new GISP_Report({Parameters:{Lat:c.Parameters["Lat"],Lng:c.Parameters["Lng"],ID:g,RIDA:c.Parameters["RIDA"],Radius:c.Parameters["Radius"]}});if(c.Type=="COMMUNITY"){v.Parameters["Placecode"]=c.Parameters["Placecode"];};v.Properties["ParentReportID"]=c.UniqueID;v.Type=d;_SSR._Reports.push(v);c.SubReports[d]=v.UniqueID;l+="&UniqueID="+v.UniqueID;TVAGoogle.common.services.DocumentLoader.GetReportAsHTML(l,v.UniqueID,LoadSubReportResult);}};function LoadComparisonSubReport(I){var c=_SSR.GetReportByUniqueID(I);var m=c.Parameters["Type"];var l="~/main/reports/";switch(m){case "SITES":l+="SiteComparison.aspx";break;case "COMMUNITY":l+="CommunityComparison.aspx";break;};l+="?IDs="+c.Parameters["IDs"];CreateLoadingScreen("SUBREPORT");_SSR.ClearCurrentReportOverlays();var v=_SSR.GetReportByUniqueID(c.SubReports[m]);if(v!=null){ReplaceView("SUBREPORT",v.Content);v.ZoomBounds();var cY=function(){_SSR.LoadReportOverlays(v.UniqueID);};setTimeout(cY,1);}else{v=new GISP_Report({Parameters:{IDs:c.Parameters["IDs"]}});v.Properties["ParentReportID"]=c.UniqueID;v.Type=m;_SSR._Reports.push(v);c.SubReports[m]=v.UniqueID;l+="&UniqueID="+v.UniqueID;TVAGoogle.common.services.DocumentLoader.GetReportAsHTML(l,v.UniqueID,LoadSubReportResult);}};function LoadGenericSubReport(I){var c=_SSR.GetReportByUniqueID(I);var l="~/main/reports/Generic.aspx";l+="?Title="+c.Parameters["Title"];l+="?Icon="+c.Parameters["RESULTS"];CreateLoadingScreen("SUBREPORT");_SSR.ClearCurrentReportOverlays();var v=_SSR.GetReportByUniqueID(c.SubReports[m]);if(v!=null){ReplaceView("SUBREPORT",v.Content);v.ZoomBounds();var cY=function(){_SSR.LoadReportOverlays(v.UniqueID);};setTimeout(cY,1);}else{v=new GISP_Report({Parameters:{IDs:c.Parameters["IDs"]}});v.Properties["ParentReportID"]=c.UniqueID;v.Type=m;_SSR._Reports.push(v);c.SubReports[m]=v.UniqueID;l+="&UniqueID="+v.UniqueID;TVAGoogle.common.services.DocumentLoader.GetReportAsHTML(l,v.UniqueID,LoadSubReportResult);}};function LoadSubReportResult(cK){var aF=document.createElement("div");aF.innerHTML=cK.Value;var cb=aF.getElementsByTagName("form")[0];var df=document.createElement("div");df.innerHTML=cb.innerHTML;var c=_SSR.GetReportByUniqueID(cK.Key);c.Content=df;ReplaceView("SUBREPORT",c.Content);var cQ=aF.getElementsByTagName("script");if(cQ.length>0){_ReportScriptToEvalAfterLoadingReport=cQ[0].innerHTML;setTimeout(ExecuteReportScriptToEvalAfterLoadingReport,1);};c.ZoomBounds();};function ReportSubTabSelected(hd,I){var c=_SSR.GetReportByUniqueID(I);c.TabCollection.SetTab(hd);};var _SiteIDForDocumentRequest;function ViewSiteDocuments(g){_SiteIDForDocumentRequest=g.replace("SITES_","");DisplayDocumentViewerWhenLoaded(g);};function DisplayDocumentViewerWhenLoaded(){if(typeof(DocumentViewer)!="undefined"){DisplayDocumentViewer();}else{var ah=new GISPlanning_MapUtilities_ScriptLoader("/common/scripts/Documents.js","DocumentViewer",DisplayDocumentViewerWhenLoaded);ah.Load();}}
