/*

	All divs which will be hidden/shown on click need to have an unique ID
	in a seperate css file (ex. hideshowss.css)

	Tag format looks something like:
	<a href="#" onclick="hideshow('uniqueID_1');">Click to Hide/Show below div</a>
	<div id="uniqueID_1">
		Text which will be hidden/shown on link click.
	</div>

*/
function hideshow(id)
{
	var cssRules;
	if (document.all) {
		cssRules = 'rules';
	}
	else if (document.getElementById) {
		cssRules = 'cssRules';
	}

	var element = "display";
	var hide = "none";
	var show = "block";
	var divID = "#" + id;

	for(var S = 0; S < document.styleSheets.length; S++)
	{
		//stylesheet with all unique div IDs
		if((document.styleSheets[S].href).indexOf('hideshowss.css') >= 0)
		{
			for(var R = 0; R < document.styleSheets[S][cssRules].length; R++)
			{
				if(document.styleSheets[S][cssRules][R].selectorText == divID) {
					document.styleSheets[S][cssRules][R].style[element] = show;
				}
				else {
					document.styleSheets[S][cssRules][R].style[element] = hide;
				}
			}
		}
	}
}