

Addition.makeNumberPad = function()
{
    var i, button, buttonbutton, buttonCnt=1;
	//var buttonArray = ['1','2','3','4','5','6','7','8','9','0'];

    for(i=0; i<4; i++)
    {
		button = document.createElement('div');
        document.getElementById('numberPad').appendChild(button);
        button.setAttribute('id','row'+(i+1));   
        button.setAttribute('class','nopadding col-xs-11 col-sm-11 col-md-11 col-lg-11'); 
        
        if(i==3)
        {
            for(p=0; p<1; p++)
            {
                zerobutton = document.createElement('button');
                document.getElementById('row'+(i+1)).appendChild(zerobutton);
                zerobutton.setAttribute('id','button'+(i+1)+(p+1));   
                zerobutton.setAttribute('onclick','Addition.clickedButton(this.id)');
                zerobutton.setAttribute('class','nopadding buttonCss zeroBtn col-xs-3 col-sm-3 col-md-3 col-lg-3 col-xs-offset-3 col-sm-offset-3 col-md-offset-3 col-lg-offset-3'); 
                document.getElementById('button'+(i+1)+(p+1)).innerHTML = buttonCnt;
				document.getElementById('button'+(i+1)+(p+1)).style.backgroundImage = "url('images/skin/Number-button.png')";
                //buttonCnt++;

                clearbutton = document.createElement('button');
                document.getElementById('row'+(i+1)).appendChild(clearbutton);
                clearbutton.setAttribute('id','button'+(i+1)+(p+2));   
                clearbutton.setAttribute('onclick','Addition.clickedButton(this.id)');
                clearbutton.setAttribute('class','nopadding buttonCss clearBtn glyphicon glyphiColor glyphicon-erase col-xs-3 col-sm-3 col-md-3 col-lg-3 col-xs-offset-2 col-sm-offset-2 col-md-offset-2 col-lg-offset-2'); 
                document.getElementById('button'+(i+1)+(p+2)).style.backgroundImage = "url('images/skin/Number-button.png')";
				//buttonCnt++;    
            }    
        }
        else
        {
            for(k=0; k<3; k++)
            {		 
                buttonbutton = document.createElement('button');
                document.getElementById('row'+(i+1)).appendChild(buttonbutton);
                buttonbutton.setAttribute('id','button'+(i+1)+(k+1));   
                buttonbutton.setAttribute('onclick','Addition.clickedButton(this.id)');
                buttonbutton.setAttribute('class','nopadding buttonCss col-xs-3 col-sm-3 col-md-3 col-lg-3 col-xs-offset-1 col-sm-offset-1 col-md-offset-1 col-lg-offset-1'); 
                document.getElementById('button'+(i+1)+(k+1)).innerHTML = buttonCnt;
				document.getElementById('button'+(i+1)+(k+1)).style.backgroundImage = "url('images/skin/Number-button.png')";
                buttonCnt++;	
                if(buttonCnt == 10)
                    buttonCnt=0;		
            } 
        }    
    }    
}