    function ShowDiv(Id)
    {
        document.getElementById(Id).style.display='';
    }
    
     function ConfirmAction(Message)
    {
        if (confirm(Message))
        {
		return true;
		}
		else
		{
		return false;
		}		
	}
	
	function ConfirmCurrencyChange(Id,Message)
	{
	    if (confirm(Message))
        {
		__doPostBack(Id,'');
		}
		else
		{
		var DDL_Currency=document.getElementById(Id);
		var Array = Id.split('DDL_Currency');    
	    var HF_Currency = document.getElementById(Array[0]+'HF_Currency');
	    
	    setTimeout(function () { DDL_Currency.selectedIndex = HF_Currency.value; $(DDL_Currency).trigger('change'); }, 500);

		}		
	}

	function AddAddOn(Id)
	{
	    var Div_AddOn = document.getElementById(Id);
	    if (Div_AddOn.style.display=='')
	    {
	        Div_AddOn.style.display='none';
	    }
	    else
	    {
	        Div_AddOn.style.display='';
		}

	    var Array = Id.split('Div_AddOn');    
	    var Btn_AddAddon = document.getElementById(Array[0]+'Btn_AddAddon');
	    Btn_AddAddon.style.display='none';
		var Btn_Remove = document.getElementById(Array[0] + 'Btn_Remove');

		if (Btn_Remove != null)
			Btn_Remove.style.display = 'none';

	    return false;
	}		
	function ShowUpdater(n)
	{	  	    
	    var Div_Updater=document.getElementById('Div_Updater'+n);
	    var i=0;	    
	    while(Div_Updater!=null)
	    {	
	        Div_Updater=document.getElementById('Div_Updater'+i);		           
	        i+=1;
	        if (Div_Updater!=null)
	        {  
	          Div_Updater.style.display='none'; 	         	          
	        }
		}
		
		if (Div_Updater != null) {
			Div_Updater = document.getElementById('Div_Updater' + n);
			Div_Updater.style.display = '';
		}
	}
	
	function round(number,decimals) {
        var i,d;

        // set default values
        if(number=="") number=parseInt("0");
        if(decimals=="") decimals=parseInt("2");

        // round number to specified number of decimals
        number=""+Math.round(number*Math.pow(10,decimals))*Math.pow(10,-decimals);

        // find index of decimal point
        d=number.indexOf(".");

        // if no decimal point, number is an integer
        // pad number with trailing zeros
        if(d==-1) {
            number=number;//+".";
//            for(i=0;i<decimals;i++)
//                number=number+"0";
                return number;
        }

        // if decimal point is first index
        // pad number with leading zero
        if(d==0) {
            number="0"+number;
            d++;
        }

        // if first index is negative sign
        // pad number with leading zero
        if(d==1 && number.substring(0,1)=="-") {
            number="-0" + number.substring(1,number.length);
            d++;
        }

        // truncate number to desired length
        number=number.substring(0,d+decimals+1);

        // if number is shorter than desired length
        // pad number with trailing zeros
        while(number.length<=d+decimals)
            number=number+"0";
        return number;
    }


