﻿// JScript File

	//precache all off button images
	var offImgArray = new Array()
	offImgArray["Issues"] = new Image
	offImgArray["Issues"].src = "images/BondIssues_BT.gif"
	offImgArray["Estimates"] = new Image
	offImgArray["Estimates"].src = "images/Estimates_BT.gif"
	offImgArray["NewContact"] = new Image
	offImgArray["NewContact"].src = "images/NewContact_BT.gif"
	
	//precache all the on button images
	var onImgArray = new Array()
	onImgArray["Issues"] = new Image
	onImgArray["Issues"].src = "images/BondIssues_SBT.gif"
	onImgArray["Estimates"] = new Image
	onImgArray["Estimates"].src = "images/Estimates_SBT.gif"
	onImgArray["NewContact"] = new Image
	onImgArray["NewContact"].src = "images/NewContact_SBT.gif"
	
	function imageON(imgName) {
		if (document.images) {
			document.images[imgName].src = onImgArray[imgName].src
		}
	}
	
	function imageOFF(imgName) {
		if (document.images) {
			document.images[imgName].src = offImgArray[imgName].src
		}
	}

    function ExpandCollapseItems(imgID, imgName, Detail, rowIndex, tbl) {
        var i = rowIndex + 1
        if (imgID=="Plus") {
            //change the plus/minus image
            document.images[imgName].id = "Minus"
			document.images[imgName].src = 'images/Minus_BT.gif'
			
		    var newRow, newCell, Data , newCell2
		    Data = "<table>"
			    Data = Data + "<tr height='22'>"
				    Data = Data + "<td>&nbsp;</td>"
				    Data = Data + "<td width='5'>&nbsp;</td>"
				    Data = Data + "<td class='supportTableItem'>" + Detail + "</td>"
			    Data = Data + "</tr>"
		    Data = Data + "</table>"	
		    
		    //insert the table row
			newRow = tbl.insertRow(i)
			newCell = newRow.insertCell(0)
			newCell2 = newRow.insertCell(1)
			newCell2.innerHTML = Data
        }
        else {
            //change the plus/minus image
            document.images[imgName].id = "Plus"
			document.images[imgName].src = 'images/Plus_BT.gif'
			
            //delete the table row
			tbl.deleteRow(i)
        }      
	}
	
        function ExpandCollapseBCItems(imgID, imgName, rowIndex, tbl, Address, Attorney) {
            var i = rowIndex + 1
        if (imgID=="Plus") {
            //change the plus/minus image
            document.images[imgName].id = "Minus"
			document.images[imgName].src = 'images/Minus_BT.gif'
			
		    var newRow, newCell, Data , newCell2
		    
		    Data = "<table>"
			    Data = Data + "<tr height='30'>"
		    		Data = Data + "<td width='15'>&nbsp;</td>"
			        Data = Data + "<td width='15'>&nbsp;</td>"
			        Data = Data + "<td width='350' class='tableContentsTitle'>Contact Information</td>"
    		    Data = Data + "</tr>"
   			    Data = Data + "<tr height='30'>"
		    		Data = Data + "<td width='15'>&nbsp;</td>"
			        Data = Data + "<td width='15'>&nbsp;</td>"
			        Data = Data + "<td width='350' class='tableContents'>" + Address + "</td>"
			    Data = Data + "</tr>"
                Data = Data + "<tr height='30'>"
		    		Data = Data + "<td width='15'>&nbsp;</td>"
			        Data = Data + "<td width='15'>&nbsp;</td>"
			        Data = Data + "<td width='350' class='tableContentsTitle'>Attorney Contact Information</td>"
    		    Data = Data + "</tr>"
    		    Data = Data + "<tr>"
		    		Data = Data + "<td width='15'>&nbsp;</td>"
			        Data = Data + "<td width='15'>&nbsp;</td>"
			        Data = Data + "<td width='350' class='tableContents'>" + Attorney + "</td>"
			    Data = Data + "</tr>"
		    Data = Data + "</table>"	
		    
		    //insert the table row
			newRow = tbl.insertRow(i)
			newCell = newRow.insertCell(0)
			newCell2 = newRow.insertCell(1)
			newCell2.innerHTML = Data
			
        }
        else {
            //change the plus/minus image
            document.images[imgName].id = "Plus"
			document.images[imgName].src = 'images/Plus_BT.gif'
			
            //delete the table row
			tbl.deleteRow(i)
        }      
	}