
// Function for colapsing Section
//------------------------------------------------------------

function Alteration(Control) {
   
      var id_table = document.getElementById(Control).style;
      
      
       if(navigator.userAgent.indexOf("Firefox") != -1){
      id_table.display = "table-cell";
      }
      else{
      id_table.display = "block";
      }
         
}

function Alteration1(Control) {
   
      var id_table = document.getElementById(Control).style;
      id_table.display = "none";
      
         
}





// ----------------------------------------------------------------
//End Of Function for colapsing  Section




// Function for counting characters in Other Information Section
//------------------------------------------------------------------

var maxCount = 500;            
function countItOther(texter) {
 words = document.appoint.OtherDebtAssetInfo_appl1;
 if (words.value.length > maxCount) { words.value = words.value.substring(0,maxCount); 
 alert('You have reached the maximum \n' + maxCount + ' characters allowed!') 
 }
 else texter.value = words.value.length;
 if ((navigator.appName.indexOf("Netscape")!= -1) && (texter.value == maxCount)) { alert('You have reached the maximum \n' + maxCount + ' characters allowed!'); 
 return; 
 } 
 }
 
 // ----------------------------------------------------------------
//End Of Function for counting characters in Other Information Section



// Function for formating Currency Input
//------------------------------------------------------------------


 function formatCurrency(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 (((sign)?'':'-') + num + '.' + cents);
}

//---------------------------------------------------------------------
// End Of Function for formating Currency Input


