
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Toggle2(node){
	// Unfold the branch if it isn't visible

	// Collapse the branch if it IS visible

		// Change the image (if there is an image)
		if (node.length > 0){
		MM_swapImgRestore();
			if (node.item(0).nodeName == "img"){
				
			}
		}
		node.style.display = 'none';
}

function Toggle(node){
	// Unfold the branch if it isn't visible
	if (node.nextSibling.style.display == 'none'){
		// Change the image (if there is an image)
		if (node.childNodes.length > 0){
			if (node.childNodes.item(0).nodeName == "img"){
				
			}
		}
		node.nextSibling.style.display = 'block';
	}
	// Collapse the branch if it IS visible
	else{
		// Change the image (if there is an image)
		if (node.childNodes.length > 0){
		MM_swapImgRestore();
			if (node.childNodes.item(0).nodeName == "img"){
				
			}
		}
		node.nextSibling.style.display = 'none';
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function number_format (number, decimals, dec_point, thousands_sep) {
	var exponent = "";
	var numberstr = number.toString ();
	var eindex = numberstr.indexOf ("e");
	if (eindex > -1) {
		exponent = numberstr.substring (eindex);
		number = parseFloat (numberstr.substring (0, eindex));
	}
	
	if (decimals != null) {
		var temp = Math.pow (10, decimals);
		number = Math.round (number * temp) / temp;
	}
	var sign = number < 0 ? "-" : "";
	var integer = (number > 0 ?	Math.floor(number) : Math.abs(Math.ceil(number))).toString();
	var fractional = number.toString().substring(integer.length + sign.length);
	dec_point = dec_point != null ? dec_point : ".";
	fractional = decimals != null && decimals > 0 || fractional.length > 1 ? (dec_point + fractional.substring (1)) : "";
	if (decimals != null && decimals > 0) {
		for (i = fractional.length - 1, z = decimals; i < z; ++i)
			fractional += "0";
	}
	thousands_sep = (thousands_sep != dec_point || fractional.length == 0) ? thousands_sep : null;
	if (thousands_sep != null && thousands_sep != "") {
		for (i = integer.length - 3; i > 0; i -= 3)
			integer = integer.substring (0 , i) + thousands_sep + integer.substring (i);
	}
	return sign + integer + fractional + exponent;
}
/*
number_format (1, 2, ",") = "1,00"
number_format (1.2, null, ",") = "1,2"
number_format (1234, 0, null, ".") = "1.234"
number_format (1.23456e50, 4, ",") = "1,2346e+50"
number_format (-950.5, 2, ",", ".") = "-950,50"
number_format (-0.5, 2, ",") = "-0,50"
number_format (-0.001, 2, ",") = "0,00"
*/

function popUp(strURL, name, strType, strTop, strLeft, strWidth, strHeight) {
	var strOptions = "";
	if (strType == "console") strOptions = "resizable, top="+strTop+", left="+strLeft+", width="+strWidth+", height="+strHeight;
	if (strType == "fixed") strOptions = "status,top="+strTop+", left="+strLeft+", height="+strHeight+", width="+strWidth;
	if (strType == "elastic") strOptions = "toolbar, menubar, scrollbars, resizable, location, top="+strTop+", left="+strLeft+", height="+strHeight+", width="+strWidth;
	var newWin = window.open(strURL, name, strOptions);
	newWin.focus();
}
