var ChartServerURL="/ChartServer/default.aspx",currheight,ChartType,Chartdataurl;window.onresize=ResizeBuild;function ResizeBuild(){try{if(currheight!=document.documentElement.clientHeight){BuildChart()}currheight=document.documentElement.clientHeight}catch(A){}}function BuildChart(){if(ChartType!=null){var A=new FusionCharts("/js/FusionCharts/"+ChartType+".swf","ChartId",ChartWidth,ChartHeight,"0","0"),C=escape(ChartServerURL+"?c="+ChartName+"&ty="+ChartType+"&id="+ItemID+"&s="+ChartToShortDate(ChartStartDate)+"&e="+ChartToShortDate(ChartEndDate)+"&"+Ticks());Chartdataurl=(unescape(C));A.setDataURL(C);try{document.getElementById("ChartStart").value=ChartToShortDate(ChartStartDate)=="1/1/1900"?"*":ChartToShortDate(ChartStartDate);document.getElementById("ChartEnd").value=ChartToShortDate(ChartEndDate)}catch(B){}A.addParam("wmode","transparent");A.render("GraphContent")}}function Charty2k(A){return(A<1000)?A+1900:A}function ChartToShortDate(A){return A.getMonth()+1+"/"+A.getDate()+"/"+Charty2k(A.getYear())}function ChartSubtractDays(B,A){return new Date(Date.UTC(Charty2k(B.getYear()),B.getMonth(),B.getDate(),B.getHours(),B.getMinutes(),B.getSeconds())-A*24*60*60*1000)}function SetTimeFrame(A){ChartEndDate=new Date();if(A==9999){ChartStartDate=new Date(1900,0,1)}else{ChartStartDate=ChartSubtractDays(new Date(),A)}BuildChart();return false}function SetDateRange(B,A){ChartStartDate=B;ChartEndDate=A;BuildChart();return false}function SetView(A){ChartType=A;BuildChart();return false}function SetChart(A){ChartName=A;BuildChart();return false}function Ticks(){var A=new Date;return A.valueOf()}function FC_Rendered(A){if(A=="ChartId"){return }}function DoCustomRange(){if(document.getElementById("ChartStart").value=="*"){ChartStartDate=new Date(1900,0,1)}else{ChartStartDate=new Date(document.getElementById("ChartStart").value)}ChartEndDate=new Date(document.getElementById("ChartEnd").value);BuildChart()};