function SetCommas(nStr) {
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? ',' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}

function SetPeriods(nStr) {
	nStr += '';
	x = nStr.split(',');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return parseFloat(x1 + x2);
}

function showme(me)
{
	me.style.backgroundColor='#dfdfdf';
}

function hideme(me)
{
	me.style.backgroundColor='';
}

/* POLL Funktioner */

function setPollValue(pv) {
    document.getElementById("POLL_VALUE").value = pv;
}

function submitPoll() {
    var qstr = 'poll_result.aspx?POLL_VALUE=' + document.getElementById("POLL_VALUE").value + '&POLL_ID=' + document.getElementById("POLL_ID").value + '&POLL_QID=' + document.getElementById("POLL_QID").value + '&page=' + document.getElementById("page").value;
    document.location.href = qstr;
}
