var noOfDecimals = 2;

function highlight(obj)
{
	obj.style.color="#000000";
	obj.style.fontWeight="bold";
}
function resetStyle(obj)
{
	obj.style.color="#666666";
	obj.style.fontWeight="normal";	
}

function getFloat(x) {
    x = x.replace(",", ".");
    return parseFloat(x).toFixed(noOfDecimals);
}

function setFloat(x) {
    return x.toFixed(noOfDecimals).toString().replace(".", ",");
}

function $() {
	if (arguments.length>1) {
		return false;
	}
	if (arguments.length<1) {
		return false;
	}

	var element = arguments[0];

    if (typeof element == 'string') {
        if (document.getElementById) {
            element = document.getElementById(element);
        } else if (document.all) {
            element = document.all[element];
        }
    }
	
	return element;
}

//<![CDATA[
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
       anchor.target = "_blank";
 }
}
window.onload = externalLinks;
//]]>
