function EicCurrentPageLinkCss(EicComponent,EicTagName,EicCssName,EicCssValue) {
/* Copyright Edge Impact Consulting Ltd. www.edgeimpact.co.uk
This function will search for links equal to the current URL page name and change the CSS as specified. This allows you to, for example, change the background color of a button if you are on that page.
Example call where "Left" is a <div id="Left"> for the left side of the page which contains the buttons: 
<script type="text/javascript" language="JavaScript">EicCurrentPageLinkCss('Left','a','background-color','#2b547e');</script>
*/
	if (typeof EicDefaultIndexFile=="undefined"){var EicDefaultIndexFile="index.php";}
	var EicFound = "N";
	switch(EicCssName) {
		case "background-color":
			EicCssName = "backgroundColor";
			EicFound = "Y";
			break;
		case "border-style":
			EicCssName = "borderStyle";
			EicFound = "Y";
			break;
	}
	if (EicFound == "N" && EicCssName.indexOf("-") > 0) {
		var EicCssNameJ;
		EicCssNameSp = EicCssName.split("-");
		for(i = 0; i < EicCssNameSp.length; i++){
			if(i == 0){EicCssName = EicCssNameSp[0].toLowerCase();}
			else{EicCssName = EicCssName+EicCssNameSp[i].substring(0, 1).toUpperCase()+EicCssNameSp[i].substring(1).toLowerCase();}
		}
	}
	var EicTagNames;
	if(EicComponent == "All"){
		EicTagNames = document.getElementsByTagName(EicTagName);
	}else{
		EicComponentItems = document.getElementById(EicComponent);
		EicTagNames = EicComponentItems.getElementsByTagName(EicTagName);
	}
	var EicDomainPage = window.location.href.replace(window.location.search,"");
	EicDomainPage = EicDomainPage.replace("http://www.","");
	EicDomainPage = EicDomainPage.replace("https://www.","");
	if (window.location.pathname=="/"){EicDomainPage = EicDomainPage+EicDefaultIndexFile;}
	var EicLink;
	for (var i=0, len=EicTagNames.length; i < len; i++) {
		EicLink = EicTagNames[i].href.replace(EicTagNames[i].search,"");
		EicLink = EicLink.replace("http://www.","");
		EicLink = EicLink.replace("https://www.","");
		if (EicLink == EicDomainPage){
			EicTagNames[i].style[EicCssName]=EicCssValue;
		}
	}
};
