function getStyle(elementId,styleProp)
{
	var x = document.getElementById(elementId);
	if (x.currentStyle)
		var y = x.currentStyle[styleProp];
	else if (window.getComputedStyle){
			if(styleProp == "marginLeft")styleProp="margin-left";
			if(styleProp == "marginRight")styleProp="margin-right";
			if(styleProp == "marginTop")styleProp="margin-top";
			if(styleProp == "marginBottom")styleProp="margin-bottom";
			if(styleProp == "paddingLeft")styleProp="padding-left";
			if(styleProp == "paddingRight")styleProp="padding-right";
			if(styleProp == "paddingTop")styleProp="padding-top";
			if(styleProp == "paddingBottom")styleProp="padding-bottom";
			var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
		}
	return y;
}

function getColor(element)
{
	if (element.currentStyle)
		var y = element.currentStyle["color"];
	else if (window.getComputedStyle){
			var y = document.defaultView.getComputedStyle(element,null).getPropertyValue("color");
		}
	return y;
}

function changeColor(element,colorValue){
	
	element.savedColor = getColor(element)
	element.style.color = colorValue;
	
	element.onmouseout = function(){
		element.style.color = element.savedColor;
	};
}

function underlineLink(element,colorValue){
	
	//element.savedColor = getColor(element)
	element.style.borderBottom = "solid 2px #" + colorValue;
	//element.style.color = "#" + colorValue;
	
	element.onmouseout = function(){
		//element.style.color = element.savedColor;
		element.style.borderBottom = "solid 0px #" + colorValue;
	};
}

/*
function changeColor(element,color){

	var linkHover = document.createElement("a");	
	linkHover.originalLinkDump = element;	
	linkHover.style.color = "#"+color;
	linkHover.href = element.href;
	linkHover.innerHTML = element.innerHTML;
	linkHover.onmouseout = function(){
		savedElement = linkHover.originalLinkDump;
		this.parentNode.replaceChild(savedElement,linkHover);
	};
	element.parentNode.replaceChild(linkHover,element);
}
*/
