
     function FormatNumber(num) {
          num = num.toString().replace(/\$|\,/g,'');
          if(isNaN(num))
          num = "0";
          sign = (num == (num = Math.abs(num)));
          num = Math.floor(num*100+0.50000000001);
          cents = num%100;
          num = Math.floor(num/100).toString();
          if(cents<10)
          cents = "0" + cents;
          for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
          num = num.substring(0,num.length-(4*i+3))+','+
          num.substring(num.length-(4*i+3));
          
          return (num + '.' + cents);
     }
              

	function setCheckedValue(radioObj, newValue) {
		if(!radioObj)
			return;
		var radioLength = radioObj.length;
		if(radioLength == undefined) {
			radioObj.checked = (radioObj.value == newValue.toString());
			return;
		}
		for(var i = 0; i < radioLength; i++) {
			radioObj[i].checked = false;
			if(radioObj[i].value == newValue.toString()) {
				radioObj[i].checked = true;
			}
		}
	}
     
     function showSub(id){
            document.getElementById(id).style.display = 'inline';
     }
     function showSubBlock(id){
     	
     	if (navigator.appName.indexOf("Internet Explorer") != -1) 
     	{
            document.getElementById(id).style.display = 'block';
     	}
     	else
     	{
            document.getElementById(id).style.display = 'table-row';
         }
     }
     function hideSub(id){
            document.getElementById(id).style.display = 'none';
     }
     function getCheckedValue(radioObj) {
     	if(!radioObj)
     		return "";
     	var radioLength = radioObj.length;
     	if(radioLength == undefined)
     		if(radioObj.checked)
     			return radioObj.value;
     		else
     			return "";
     	for(var i = 0; i < radioLength; i++) {
     		if(radioObj[i].checked) {
     			return radioObj[i].value;
     		}
     	}
     	return "";
     }
