// JavaScript Document

var MSIE = document.all ? true : false;
var NSC6 = (document.getElementById && !MSIE) ? true : false;
var NSC4 = (navigator.appName == 'Netscape' && !(MSIE || NSC6)) ? true : false;


function reloadPage() {
	location.reload();
}

function getBrowserWidth() {
	if (document.all) return document.all.thisdoc.offsetWidth;
	else return self.innerWidth;
}

function getBrowserHeight() {
//	if (document.all) return document.getElementById('thisdoc').offsetHeight;
	if (document.all) return document.all.thisdoc.offsetHeight;
	else return self.innerHeight;
}

function Popup(theURL,winName,features) { 
	window.open(theURL,winName,features);
}

function returnMoney(number) {
	var nStr = '' + Math.round(parseFloat(number) * 100) / 100;
	var x = nStr.split('.');
	var x1 = x[0];
	var x2 = x.length > 1 ? ',' + x[1] : ',00';
	if(x2.length < 3) x2 = x2 + '0';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + '.' + '$2');
	}
	return x1 + x2;
};
