﻿// JScript File
function writemail(a,b,c,d){
	if (d){
		the_string = "<a href='mailto:"+a+"@"+b+"."+c+"'>"+d+"</a>";
	} else {
		the_string = "<a href='mailto:"+a+"@"+b+"."+c+"'>"+a+"@"+b+"."+c+"</a>";
	}
	return (the_string);
};

function writemail2(a,b,c,d){
	the_string = "<a href='mailto:"+a+"@"+b+"."+c+"'>"+d+"</a>";
	return (the_string);
};

function BASAlarmsGrid() {
var temp = window.prompt("Enter the number of days of Alarms?","1");
window.open("http://utilities.fm.virginia.edu/Applications/FMGeneral/BISAuditMessageViewer.aspx?view=1&Days=" + temp );
}

function  CabinetShopDustCollectorData() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + today.getYear();
var ReportStart = window.prompt("Enter the desired start date",today);
var ReportStop = window.prompt("Enter the desired stop date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPDF.aspx?WhichReport=Title V Cabinet Shop Dust Collector Data (0245-BH1)&Start=" + ReportStart + "&Stop=" + ReportStop);
}

function  SCCWOInformationReportByDate() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired date",today);
window.open("http://utilities.fm.virginia.edu/Applications/FMGeneral/CustomExportPDF.aspx?WhichReport=SCCWOInformationByDate&TheDate=" + ReportStart );
}
function SCCWOInformationReport() {
var temp = window.prompt("Enter the number of days of work orders to view?","1");
window.open("http://utilities.fm.virginia.edu/Applications/FMGeneral/CustomExportPDF.aspx?WhichReport=SCCWOInformation&Days=" + temp );
}
function SCCCallbacksGrid() {
var temp = window.prompt("Enter the number of previous days back to display Callbacks","1");
window.open("http://utilities.fm.virginia.edu/Applications/FMGeneral/Grid.aspx?Grid=SCCCallbacksGrid&DaysBack=" + temp );
}
function SCCVendorWOInformationGrid() {
var temp = window.prompt("Include Completed Work Orders?","No");
window.open("http://utilities.fm.virginia.edu/Applications/FMGeneral/Grid.aspx?Grid=SCCVendorWOInformation&CWO=" + temp);
}
function SCCWOInformationByBuildingGrid() {
window.open("http://utilities.fm.virginia.edu/Applications/FMGeneral/Grid.aspx?Grid=SCCWOInformationByBuilding");
}
function SCCWOInformationGrid() {
var temp = window.prompt("Enter the number of days of work orders to view?","1");
window.open("http://utilities.fm.virginia.edu/Applications/FMGeneral/Grid.aspx?Grid=SCCWOInformation&Days=" + temp );
}
function OutageNotificationReport() {
window.open("CustomExportPdf.aspx?WhichReport=OutageNotification");
}
function SubmitForm() {
window.document.Form1.submit();
}
function MapGroundsArea() {
	window.open("http://utilities.fm.virginia.edu/Applications/GIS/Public/UVAGrounds.mwf?LAT=38.0396&LON=-78.5066" );
}
function MapStormWaterArea() {
	window.open("http://utilities.fm.virginia.edu/Applications/GIS/Secure/UVaStormWaterMgmt.mwf?LAT=38.0396&LON=-78.5066" );
}
function MapEmergencyResponseArea() {
	window.open("http://utilities.fm.virginia.edu/Applications/GIS/Secure/Emergency_Response.mwf?LAT=38.0396&LON=-78.5066" );
}
function SetBillingDates() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=SetBillingDates",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=SetBillingDates&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
}}

function SetOracleFileDates() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=OracleFileCreation",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=OracleFileCreation&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
}}

function DailyTransactions() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=DailyTransactions",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=DailyTransactions&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
//var temp = window.open("QuickGrid.aspx?Grid=DailyTransactions");
window.open("GridInfo.aspx");
return 1;
}}

function DatePeriodPATEOReconciliation() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=DatePeriodPATEOReconciliation",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=DatePeriodPATEOReconciliation&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
window.open("CustomExportPdf.aspx?WhichReport=DatePeriodPATEOReconciliation");
}}

function CheckBatchDetail() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=CheckBatchDetail",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=CheckBatchDetail&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
//var temp = window.open("QuickGrid.aspx?Grid=CheckBatchDetail");
var temp = window.open("GridInfo.aspx");
return 1;
}}

function OracleFileAccountSummary() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=OracleFileAccountSummary",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=OracleFileAccountSummary&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
}}

function SetTrashBillingDate() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=AddMonthlyTrashReadings",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=AddMonthlyTrashReadings&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
return 1;
}}
function SetFYRange() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=SetFYRange",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=SetFYRange&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
}}

function CreateMonthlyReadings() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=CreateMonthlyReadings",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var temp = window.open("Process.aspx?DefaultDates=CreateMonthlyReadings&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
}}

function ProcessReport(mn, id) {
    var item = igmenu_getItemById(id);
    var ItemTag = item.getTag();
    if (ItemTag == "Report" ) {
    var ItemText = item.getText();
	window.open("CustomExportPdf.aspx?WhichReport=" + ItemText,null,"height=480,width=640,status=no,titlebar=yes,scrollbars=yes,resizable=yes,toolbar=no,menubar=yes,location=no,left=100,top=100");return 1;}
	
	if (ItemTag == "Graph" ) {
    var ItemText = item.getText();
	window.open("Graph.aspx?WhichGraph=" + ItemText,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );return 1;}
}
function MHPSummaryDetail() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=MHPSummaryDetail",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
temp = window.open("Process.aspx?DefaultDates=MHPSummaryDetail&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
temp = window.open("CustomExportPdf.aspx?WhichReport=Plant%20Summary%20(Detail)");
}}

function MapHeatPlantArea() {
	window.open("http://utilities.fm.virginia.edu/Applications/GIS/Secure/MainHeatPlantArea.mwf" );
}
function MapHeatCoolLines() {
	window.open("http://utilities.fm.virginia.edu/Applications/GIS/Secure/HeatCoolUtil.mwf" );
}
function MapChilledWaterLoops() {
window.open("http://utilities.fm.virginia.edu/Applications/GIS/Secure/ChilledWater.mwf");
}
function Print() {
window.print();
}
function PlantReconciliationSummary() {
var temp = window.prompt("Calendar or Fiscal Year?","Fiscal");
var temp2 = window.prompt("What year?","Current");
window.open("CustomExportPdf.aspx?WhichReport=Plant%20Reconciliation%20Summary&YearType=" + temp + "&Year=" +temp2);
}

function PlantReconciliation() {
var temp = window.prompt("Current Billing Period? 'No' for Year to Date","Yes");
window.open("CustomExportPdf.aspx?WhichReport=Plant%20Reconciliation&CurrentPeriod=" + temp);
}
function PlantReconciliationDetail() {
var temp = window.prompt("Current Billing Period? 'No' for Year to Date","Yes")
var temp2 = window.prompt("Consumer Data by Meter or Building?","Meter");
var temp3 = window.prompt("Normalize Data with Degree Days?","Yes");
window.open("CustomExportPdf.aspx?WhichReport=Plant%20Reconciliation%20Detail&CurrentPeriod=" + temp + "&ConsumersBy=" + temp2 + "&Normalize=" + temp3);
}

function CostCenterLaborCC() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=CostCenterLabor",null,"dialogheight=300px;dialogWidth=250px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var CC = window.prompt("Enter the Cost Center Number","90");
var Detail = window.prompt("Include Detail data?","No");
temp = window.open("Process.aspx?DefaultDates=CostCenterLabor&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
temp = window.open("CustomExportPdf.aspx?WhichReport=Cost%20Center%20Labor&CC=" + CC + "&Department=All&Detail=" + Detail);
}}
function CostCenterLaborAll() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=CostCenterLabor",null,"dialogheight=300px;dialogWidth=250px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var Detail = window.prompt("Include Detail data (Yes/No)?","No");
temp = window.open("Process.aspx?DefaultDates=CostCenterLabor&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
temp = window.open("CustomExportPdf.aspx?WhichReport=Cost%20Center%20Labor&CC=All&Department=All&Detail=" + Detail );
}}
function CostCenterLaborDepartment(Department) {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=CostCenterLabor",null,"dialogheight=300px;dialogWidth=250px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stop = temp[1];
var Detail = window.prompt("Include Detail data?","No");
temp = window.open("Process.aspx?DefaultDates=CostCenterLabor&StartDate=" + start + "&StopDate=" + stop,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
temp = window.open("CustomExportPdf.aspx?WhichReport=Cost%20Center%20Labor&CC=All&Department=" + Department + "&Detail=" + Detail );
}}

function BuildingCostSummary() {
var Year = window.prompt("Enter the desired Fiscal Year","2004");
window.open("CustomExportPdf.aspx?WhichReport=Building%20Cost%20Summary&Year=" + Year );
}
function BuildingCostDetails() {
var Year = window.prompt("Enter the desired Fiscal Year","2004");
window.open("CustomExportPdf.aspx?WhichReport=Building%20Cost%20Details&Year=" + Year );
}

function BuildingCostHistory() {
var Year = window.prompt("Enter the desired Fiscal Year. For all years, enter 0","2004");
var Building = window.prompt("Enter the desired Building Number. For all buildings, enter All.","0001");
window.open("CustomExportPdf.aspx?WhichReport=Building%20Cost%20History&Year=" + Year + "&Building=" + Building);
}
function BuildingEnergyHistory() {
var Year = window.prompt("Enter the desired Fiscal Year. For all years, enter 0","2004");
var Building = window.prompt("Enter the desired Building Number. For all buildings, enter All.","0001");
window.open("CustomExportPdf.aspx?WhichReport=Building%20Energy%20History&Year=" + Year + "&Building=" + Building );
}

function GraphBuildingCostsbyFacilityTypeandProduct() {
var Year = window.prompt("Enter the starting Fiscal Year","2001");
window.open("Graph.aspx?WhichGraph=Building Costs by Facility Type and Product&FY=" + Year,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
}
function GraphBuildingEnergybyFacilityTypeandProduct() {
var Year = window.prompt("Enter the starting Fiscal Year","2001");
window.open("Graph.aspx?WhichGraph=Building Energy by Facility Type and Product&FY=" + Year,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
}

function GraphFYBuildingCostsbyFacilityTypeandProduct() {
var Year = window.prompt("Enter the desired Fiscal Year","2004");
window.open("Graph.aspx?WhichGraph=FY Building Costs by Facility Type and Product&FY=" + Year,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
}
function GraphFYBuildingEnergybyFacilityTypeandProduct() {
var Year = window.prompt("Enter the desired Fiscal Year","2004");
window.open("Graph.aspx?WhichGraph=FY Building Energy by Facility Type and Product&FY=" + Year,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
}

function GraphFYBuildingCostSummary() {
var Year = window.prompt("Enter the desired Fiscal Year","2004");
window.open("Graph.aspx?WhichGraph=FY Building Cost Summary&FY=" + Year,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
}
function GraphFYBuildingEnergySummary() {
var Year = window.prompt("Enter the desired Fiscal Year","2004");
window.open("Graph.aspx?WhichGraph=FY Building Energy Summary&FY=" + Year,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
}
function ChangeMeterID() {
var OldMeterID = window.prompt("Enter the Current Meter ID.","Old Meter ID");
var NewMeterID = window.prompt("Enter the New Meter ID.","New Meter ID");
var temp = window.confirm("Really change " + OldMeterID + " to " + NewMeterID + "?");
if (temp == true) 
{ 
var Note = window.prompt("Please enter a note for the change.","Because I can!");
temp = window.open("Process.aspx?Action=ChangeMeterID&OldMeterID=" + OldMeterID + "&NewMeterID=" + NewMeterID + "&Note=" + Note,null,"height=300,width=250,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 125) + ",top=" + (screen.availHeight/2 - 150) + "");
}
}
function AboutUtilityPro() {
//var temp = window.showModalDialog("AboutUtilityPro.aspx",null,"dialogheight=200px;dialogWidth=750px;centered:yes;status:no;resizeable:no");
var temp = window.open("AboutUtilityPro.aspx",null,"height=150,width=400,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 200) + ",top=" + (screen.availHeight/2 - 125) );
return 1;
}

function GraphCoalAnalysis() {
var temp = window.showModalDialog("Dates.aspx?DefaultDates=GraphCoalAnalysis",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stopdate = temp[1];
var temp1 = window.showModalDialog("Process.aspx?DefaultDates=GraphCoalAnalysis&StartDate=" + start + "&StopDate=" + stopdate,null,"dialogheight=300px;dialogWidth=250px;centered:yes;status:no;resizeable:no");
var temp2 = window.open("Graph.aspx?WhichGraph=Coal%20Analysis",null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
return 1;
}}

function GraphSubstations() {
//var temp = window.showModalDialog("http://utilities.fm.virginia.edu/Applications/UtilityPro/Dates.aspx?DefaultDates=GraphSubstations",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
//if (temp == "Cancel")  {}
//else {
//temp = temp.split(";");
//var start = temp[0];
//var stop = temp[1];
//var startsplit = start.split("/");
//var stopsplit = stop.split("/");
//var newstart = startsplit[0] + "-" + startsplit[1] + "-" + startsplit[2];
//var newstop = stopsplit[0] + "-" + stopsplit[1] + "-" + stopsplit[2];
//var temp2 = window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/Graph.aspx?WhichGraph=Substations&StartDate=" + newstart + "&StopDate=" + newstop ,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
var temp2 = window.open("http://utilities.fm.virginia.edu/Applications/General/Graph.aspx?WhichGraph=Substations",null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
//var temp2 = window.open("http://sccdev.fm.virginia.edu/Applications/Nolog/Graph.aspx?WhichGraph=Substations",null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
//var temp2 = window.open("http://sccdev.fm.virginia.edu/Applications/Nolog/Graph.aspx?WhichGraph=Substations&StartDate=" + newstart + "&StopDate=" + newstop ,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
return 1;
}//}
function GraphWaterPumpingStations() {
//var temp = window.showModalDialog("http://utilities.fm.virginia.edu/Applications/UtilityPro/Dates.aspx?DefaultDates=GraphSubstations",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:no");
//if (temp == "Cancel")  {}
//else {
//temp = temp.split(";");
//var start = temp[0];
//var stop = temp[1];
//var startsplit = start.split("/");
//var stopsplit = stop.split("/");
//var newstart = startsplit[0] + "-" + startsplit[1] + "-" + startsplit[2];
//var newstop = stopsplit[0] + "-" + stopsplit[1] + "-" + stopsplit[2];
//var temp2 = window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/Graph.aspx?WhichGraph=Substations&StartDate=" + newstart + "&StopDate=" + newstop ,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
var temp2 = window.open("http://utilities.fm.virginia.edu/Applications/General/Graph.aspx?WhichGraph=WaterPumpingStations",null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
//var temp2 = window.open("http://sccdev.fm.virginia.edu/Applications/Nolog/Graph.aspx?WhichGraph=Substations&StartDate=" + newstart + "&StopDate=" + newstop ,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
return 1;
}

function BuildingFuelCosts() {
var temp = window.showModalDialog("http://utilities.fm.virginia.edu/Applications/UtilityPro/Dates.aspx?DefaultDates=BuildingFuelCosts",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:yes");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stopdate = temp[1];
var Normalize = window.prompt("Show Cost by Unit or MMBTU?","Unit");
temp = window.showModalDialog("http://utilities.fm.virginia.edu/Applications/UtilityPro/Process.aspx?DefaultDates=BuildingFuelCosts&StartDate=" + start + "&StopDate=" + stopdate,null,"dialogheight=300px;dialogWidth=250px;centered:yes;status:no;resizeable:no");
temp = window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/Grid.aspx?Grid=BuildingFuelCosts&ByWhat=" + Normalize ,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
return 1;
}}

function PlantFuelCosts() {
var temp = window.showModalDialog("http://utilities.fm.virginia.edu/Applications/UtilityPro/Dates.aspx?DefaultDates=PlantFuelCosts",null,"dialogheight=300px;dialogWidth=220px;centered:yes;status:no;resizeable:yes");
if (temp == "Cancel")  {}
else {
temp = temp.split(";");
var start = temp[0];
var stopdate = temp[1];
var Normalize = window.prompt("Show Cost by Unit or MMBTU?","Unit");
temp = window.showModalDialog("http://utilities.fm.virginia.edu/Applications/UtilityPro/Process.aspx?DefaultDates=PlantFuelCosts&StartDate=" + start + "&StopDate=" + stopdate,null,"dialogheight=300px;dialogWidth=250px;centered:yes;status:no;resizeable:no");
temp = window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/Grid.aspx?Grid=PlantFuelCosts&ByWhat=" + Normalize,null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
return 1;
}}
function  DEQRollingMonthlyCapacityFactors() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=DEQ%20Rolling%20Monthly%20Capacity%20Factors&ReportStart=" + ReportStart );
return 1;
}

function  RollingMonthlyCoalThroughputReport() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Rolling%20Monthly%20Coal%20Throughput%20Summary&ReportStart=" + ReportStart );
return 1;
}
function ECARollingMonthlySummaryReport() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=ECA%20Rolling%20Monthly%20Summary%20Report&ReportStart=" + ReportStart );
return 1;
}

function  HeatingPlantsWorkReport() {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Heating%20Plants%20Service%20and%20PM%20Work" );
}
function  ServicePMWorkReport() {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Title%20V%20Service%20and%20PM%20Work" );
}
function MapTitleVArea() {
	window.open("http://utilities.fm.virginia.edu/Applications/GIS/Secure/Title_V.mwf" );
}

function RollingMonthlyGeneratorSummary() {
var temp = window.prompt("Enter the start date","11/13/2004");
if (temp == null)  {
}
else {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Rolling%20Monthly%20Generator%20Summary&ReportStart=" + temp);
}
return 1;
}

function RollingMonthlyGeneratorSummaryMHP1250() {
var temp = window.prompt("Enter the start date","11/13/2004");
if (temp == null)  {
}
else {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Rolling%20Monthly%20Generator%20Summary%20-%20MHP%20(7103-2-01)&ReportStart=" + temp);
}
return 1;
}

function RollingMonthlyGeneratorSummaryMHP2000() {
var temp = window.prompt("Enter the start date","11/13/2004");
if (temp == null)  {
}
else {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Rolling%20Monthly%20Generator%20Summary%20-%20MHP%20(7103-3-01)&ReportStart=" + temp);
}
return 1;
}

function RollingMonthlyGeneratorSummaryMRHP() {
var temp = window.prompt("Enter the start date","9/1/2005");
if (temp == null)  {
}
else {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Rolling%20Monthly%20Generator%20Summary%20-%20MRHP%20(5575-2-01)&ReportStart=" + temp);
}
return 1;
}
function TitleVMonthlyGeneratorSummary() {
var temp = window.prompt("Enter the year desired","2005");
if (temp == null)  {
}
else {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Title%20V%20Monthly%20Generator%20Summary&Year=" + temp);
}
return 1;
}
// This next function is for the McCue Center Boiler
function  RollingMonthlyMcCueBoilerReport() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Title V Rolling Monthly Boiler Summary - (5577-1-01)&ReportStart=" + ReportStart );
return 1;
}
// This next function is for the Other Significan Boilers
function  RollingMonthlyBoilerReport() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Title V Rolling Monthly Boiler Summary - (0000-0-00)&ReportStart=" + ReportStart );
return 1;
}
// This next function is for the Massie Rd Boilers
function  RollingMonthlyMRHPBoilerReport() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Title V Rolling Monthly Boiler Summary - (5575-1-01 thru -04)&ReportStart=" + ReportStart );
return 1;
}
// This next function is for the modified ECA
function  RollingMonthlyMHPBoilerReport() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Title V Rolling Monthly Boiler Summary - (7103-1-01 thru -05)&ReportStart=" + ReportStart );
return 1;
}
// This next function is for the old ECA, not the modified ECA
function  ECARollingMonthlyDetailReport() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=ECA%20Rolling%20Monthly%20Detail%20Report&ReportStart=" + ReportStart );
return 1;
} 
function  TitleVHourlyBoilerData() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + today.getYear();
var ReportStart = window.prompt("Enter the desired Report Period start date (1 month's data will be displayed)",today);
if (ReportStart == null)  {
}
else {
window.open('http://utilities.fm.virginia.edu/Applications/UtilityPro/Grid.aspx?Grid=TitleVHourlyBoilerData&ReportStart=' + ReportStart,'_blank','height=500,width=740,status=no,titlebar=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=yes,location=no,left=100,top=100');
} 
return 1;
}
function CabinetShopChemicals() {
var temp = window.prompt("What year?","2005");
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Title%20V%20Monthly%20Woodworking%20Summary&Year=" +temp);
}
// This next function is for the old ECA, not the modified ECA
function TitleVMonthlyGeneratorSummary() {
var temp = window.prompt("Enter the year desired","2005");
if (temp == null)  {
}
else {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/CustomExportPdf.aspx?WhichReport=Title%20V%20Monthly%20Generator%20Summary&Year=" + temp);
}
return 1;
}

function TitleVOtherSignificantEmissionsUnits() {
var temp = window.prompt("Enter the year desired","2005");
if (temp == null)  {
}
else {
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/Grid.aspx?Grid=TitleVOtherSignificantEmissionsUnits&Year=" + temp);
}
return 1;
}
function  MHPMonthlyBoilerLoadProfile() {
var theday = new Date();
theday = theday.getMonth() + "/1/" + theday.getYear();
var ReportMonth = window.prompt("Enter the desired Month start date (use 1st day of month desired)",theday);
if (ReportMonth == null)  {
}
else {
window.open('http://utilities.fm.virginia.edu/Applications/UtilityPro/Grid.aspx?Grid=ECAMonthlyBoilerLoadProfile&ReportMonth=' + ReportMonth,'_blank','height=500,width=740,status=no,titlebar=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=yes,location=no,left=100,top=100');
} 
return 1;
}

function  MHPHourlyEmissions() {
window.open('http://utilities.fm.virginia.edu/Applications/UtilityPro/Grid.aspx?Grid=MHPHourlyEmissions','_blank','height=500,width=900,status=no,titlebar=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=yes,location=no,left=100,top=100');
}
function  MHPHourlyEmissions2() {
var today = new Date();
today = today.getMonth() + "/" + today.getDay() + "/" + (today.getYear() - 1);
var ReportStart = window.prompt("Enter the desired Report Period start date",today);
var ReportStop = window.prompt("Enter the desired Report Period stop date",today);
window.open("http://utilities.fm.virginia.edu/Applications/UtilityPro/Grid.aspx?Grid=MHPHourlyEmissions2&ReportStart=" + ReportStart + "&ReportStop=" + ReportStop);
return 1;
}
function  MHPMonthlyFuelInput() {
var theday = new Date();
theday = theday.getMonth() + "/1/" + theday.getYear();
var ReportMonth = window.prompt("Enter the desired Month start date (use 1st day of month desired)",theday);
if (ReportMonth == null)  {
}
else {
window.open('http://utilities.fm.virginia.edu/Applications/UtilityPro/Grid.aspx?Grid=ECAMonthlyFuelInput&ReportMonth=' + ReportMonth,'_blank','height=500,width=740,status=no,titlebar=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=yes,location=no,left=100,top=100');
} 
return 1;
}
function InfoPermitEmissionsFactors() {
alert("Some text here");
}
function GraphOhill() {
var temp2 = window.open("http://utilities.fm.virginia.edu/Applications/General/Graph.aspx?WhichGraph=Ohill",null,"height=490,width=650,status=no,titlebar=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,left=" + (screen.availWidth/2 - 325) + ",top=" + (screen.availHeight/2 - 245) );
return 1;
}

function btnHover_Over(btn) {
    for(var j = 0; j < 5; j++) {
        if (btn.attributes.item(j).nodeName == 'class') {
            btn.attributes.item(j).nodeValue = 'ButtonHover';    
            break;
        }
    }
}

function btnHover_Out(btn) {
    for(var j = 0; j < 5; j++) {
        if (btn.attributes.item(j).nodeName == 'class') {
            btn.attributes.item(j).nodeValue = 'ButtonNormal';    
            break;
        }
    }
}