function delquote(str){
str=str.replace(/["']{1}/gi,"");
return (str);
} 

var displaySetProperly = 0;

function toggleDIV(ID)
// ID must include single quotes.
// This function requires the delquote() function.
{
//alert('running before delete: ');
receiveIDNoQuotes = delquote(ID);
receiveIDQuotes = document.getElementById(ID);
//alert("Quotes:"+ receiveIDQuotes+"\nNo Quotes:"+receiveIDNoQuotes);
//alert('running after delete: ');

// ensure all styles set display to "none"
if (displaySetProperly == 0)
{

// Must include <div id="" style="display=none;"></div> directly inline 
// OR
// use this code here to target divisions that need to be forceably set to none, this code below should only run ONCE.
// NOTE: if either of these items are not done the button will need to be clicked twice.

/*
document.getElementById('black').style.display = "none";
document.getElementById('colour').style.display = "none";
document.getElementById('digital').style.display = "none";
document.getElementById('pabx').style.display = "none";
*/
displaySetProperly = 1;
}



//With Netscape 4.x, the code should look familiar: 
if (document.layers)
{

if (document.receiveIDNoQuotes.document.style.display == "none")
{
while (document.receiveIDNoQuotes.document.style.display == "none")
{
//alert('1: '+document.receiveIDNoQuotes.document.style.display);
document.receiveIDNoQuotes.document.style.display = "block";
}
}
else
{document.receiveIDNoQuotes.document.style.display = "none";}

}

//Internet Explorer 5+, Netscape 6+ and all standards compliant browsers write to layers using the innerHTML property:
else if (document.getElementById)
{
if (receiveIDQuotes.style.display == "none")
{
while (receiveIDQuotes.style.display == "none")
{
//alert('2: '+receiveIDQuotes.style.display);
receiveIDQuotes.style.display = "block";
}
}
else
{receiveIDQuotes.style.display = "none";}
}

//Internet Explorer 4 and 4.5 varying slightly with its document.all syntax: 
else if (document.all)
{

if (document.all[receiveIDQuotes].style.display == "none")
{
while (document.all[receiveIDQuotes].style.display == "none")
{
//alert('3: '+document.all[receiveIDQuotes].style.display);
document.all[receiveIDQuotes].style.display = "block";
}
}
else
{document.all[receiveIDQuotes].style.display = "none";}
}

else
{//alert("last else");
}
}

				     
     
