/*

javascript functions for New Approach Marketing 
Created 08 Sep 2009 by Jez D


*/





//////////////////////////////////////////////////////////////////////
//This function is used for showing dynamic toggling of show & hide //
function showElement(divID){
	var divIDs = [ 'invoices', 'kpamend', 'stats', 'kpq', 'ops', 'refer' ];//Array of divsIDs in the group
	for(var i=0; i<divIDs.length; i++){//loop through the array
		document.getElementById(divIDs[i]).style.display = (divIDs[i] == divID) ? 'block' : 'none'; //show the required div and hide all the others
	}
}
    
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////







//////////////////////////////////////////////////////////////////////
//This function is used for showing dynamic toggling of show & hide //
    function ShowHideA(elementId) {
        var element = document.getElementById(elementId);
        if (element.style.display != "block") {
            element.style.display = "block";
        }
        else {
            element.style.display = "none";
        }
    }
    function UpdateText(element) {
        if (element.innerHTML.indexOf("Show") != -1) {
            element.innerHTML = "Hide Details";
        }
        else {
            element.innerHTML = "Show Details";
        }
    }
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////


