function Go(link) {
    document.location=link;
	return true;
}

function CGo(link, mesg) {
    if (confirm(mesg)) {
		document.location=link;
		return true;
	}
}

function _v(id) {
    return document.getElementById(id);
}

function _h(id) {
    _v(id).style.display='none';
}

function _s(id) {
    _v(id).style.display='block';
}

function cSubm(id, fm) {
    //if ('add_idea_link' == _v(id).className)
	    _v(fm).submit();
}

function Show(link, w, h) {
    if (!w) {
	    w = 100;	
	}
	if (!h) {
	    h = 100;	
	}
	window.open(link,'popup','resizable=1,left=150,top=150, width='+w+', height='+h+', scrollbars=yes'); 	
}

function number_format(number, decimals, dec_point, thousands_sep) {
	var n = number, prec = decimals;
	n = !isFinite(+n) ? 0 : +n;
	prec = !isFinite(+prec) ? 0 : Math.abs(prec);
	var sep = (typeof thousands_sep == "undefined") ? ',' : thousands_sep;
	var dec = (typeof dec_point == "undefined") ? '.' : dec_point;

	var s = (prec > 0) ? n.toFixed(prec) : Math.round(n).toFixed(prec); // fix
																		// for
																		// IE
																		// parseFloat(0.55).toFixed(0)
																		// = 0;

	var abs = Math.abs(n).toFixed(prec);
	var _, i;

	if (abs >= 1000) {
		_ = abs.split(/\D/);
		i = _[0].length % 3 || 3;

		_[0] = s.slice(0, i + (n < 0))
				+ _[0].slice(i).replace(/(\d{3})/g, sep + '$1');

		s = _.join(dec);
	} else {
		s = s.replace('.', dec);
	}
	return s;
}

// check for valid numeric strings
function IsNumeric(strString) {
	var strValidChars = "0123456789.-";
	var strChar;
	var blnResult = true;

	if (strString.length == 0)
		return false;

	// test strString consists of valid characters listed above
	for (i = 0; i < strString.length && blnResult == true; i++) {
		strChar = strString.charAt(i);
		if (strValidChars.indexOf(strChar) == -1) {
			blnResult = false;
		}
	}
	return blnResult;
}
