// JavaScript Document
var xmlHttp
function GetXmlHttp() {
	var xmlhttp = false;
	if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest()
	else if (window.ActiveXObject) {
		// code for IE
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP")
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
			} catch (E) {
				xmlhttp=false
			}
		}
	}
	return xmlhttp;
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
					//findPos(this);
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
Event.observe(window,'load',startList)

Number.prototype.moneyFormat = function() {
	n = this
	s = ''
	toFixedFix = function (n, prec) {
		var k = Math.pow(10, prec);
		return '' + Math.round(n * k) / k;
	}
    // Fix for IE parseFloat(0.55).toFixed(0) = 0;
    s = (2 ? toFixedFix(n, 2) : '' + Math.round(n)).split('.');
    if (s[0].length > 3) {
        s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, ',');
    }
    if ((s[1] || '').length < 2) {
        s[1] = s[1] || '';
        s[1] += new Array(2 - s[1].length + 1).join('0');
    }
    return s.join('.');
}

function rewrite(id) {
	$(id).innerHTML = $(id).innerHTML
}