
WordProb.showNumbers = function (element) {
	WordProb.directAnsFlag = true;
	$(".blink_me").removeClass("blink_me");
	$("#" + WordProb.id).css("background-color", "white");
	WordProb.id = element;
	$("#" + WordProb.id).addClass("blink_me");
	// $(".editField").css("pointer-events", "none");
	// //WordProb.contet = document.getElementById(WordProb.id).innerHTML;
	// //	document.getElementById(WordProb.id).innerHTML = "";
	// //$("#numberSystemDiv").empty();

	// //WordProb.createNumberDivs(numberSystemDiv);
	// $("#numberSystemDiv").addClass("animated zoomIn");
	// $("#numberSystemDiv").show();
	// WordProb.color = $("#" + WordProb.id).css("background-color");
	// $("#" + WordProb.id).css("background-color", "#b9b8b8");

	// setTimeout(function () {
	// 	$("#numberSystemDiv").removeClass("animated zoomIn");
	// }, 700);
}
WordProb.createNumberDivs = function (parentDiv) {
	var numberDiv; WordProb.buttonCount = 1;
	if (WordProb.id != "subDiv1" && WordProb.value != 4) {
		var i = 0, j = 0, row, span, newbutton, textNode;
		for (i = 1; i <= 5; i++) {
			row = document.createElement('div');
			row.setAttribute("id", "row" + i);
			row.setAttribute("class", "rowClass col-xs-11 col-sm-11 col-md-11 col-lg-11 nopadding");
			if (i == 1) {
				span = document.createElement('span');
				span.setAttribute("id", "closeNumberSystem");
				span.setAttribute("class", "closed close");
				span.setAttribute("onclick", "WordProb.checkAnswer();");
				span.innerHTML = "&times;";
				row.appendChild(span);
				numberSystemDiv.appendChild(row);
			}
			else {
				for (j = 1; j <= 3; j++) {
					if (WordProb.buttonCount <= 10) {
						newbutton = document.createElement('BUTTON');
						newbutton.setAttribute("id", "buttonValue" + WordProb.buttonCount);
						newbutton.setAttribute("class", "calValuesClass noPadding col-sm-offset-1 col-xs-offset-1 col-lg-offset-1 col-md-offset-1 col-xs-3 col-sm-3 col-md-3 col-lg-3 nopadding");
						if (WordProb.buttonCount == 10) {
							newbutton.setAttribute("valueCount", 0);
							textNode = document.createTextNode(0);
						}
						else {
							newbutton.setAttribute("valueCount", WordProb.buttonCount);
							textNode = document.createTextNode(WordProb.buttonCount);
						}
						newbutton.appendChild(textNode);
						newbutton.setAttribute("onclick", "WordProb.displayInTextBox(this)");
					}
					else {
						if (WordProb.buttonCount == 11) {
							newbutton = document.createElement('BUTTON');
							newbutton.setAttribute("id", "buttonValue" + WordProb.buttonCount);
							newbutton.setAttribute("onclick", "WordProb.clearText();");
							newbutton.setAttribute("class", "noPadding glyphicon glyphicon-erase glyphiColor calButtonClass col-sm-offset-1 col-xs-offset-1 col-lg-offset-1 col-md-offset-1 col-xs-3 col-sm-3 col-md-3 col-lg-3 nopadding");
						}
						else {
							newbutton = document.createElement('BUTTON');
							newbutton.setAttribute("id", "buttonValue" + WordProb.buttonCount);
							newbutton.setAttribute("onclick", "WordProb.checkAnswer()");
							newbutton.setAttribute("class", "noPadding glyphicon glyphicon-ok glyphiColor calButtonClass col-sm-offset-1 col-xs-offset-1 col-lg-offset-1 col-md-offset-1 col-xs-3 col-sm-3 col-md-3 col-lg-3 nopadding");
						}
					}
					row.appendChild(newbutton);
					numberSystemDiv.appendChild(row);
					WordProb.buttonCount++;
				}
			}
		}
	}
	else {
		for (var i = 0; i < 2; i++) {
			var oprDiv, row;
			row = document.createElement('div');
			row.setAttribute("id", "level" + i);
			row.setAttribute("class", "rowClass col-xs-11 col-sm-11 col-md-11 col-lg-11 nopadding");
			if (i == 0) {
				span = document.createElement('span');
				span.setAttribute("id", "closeOperators");
				span.setAttribute("class", "closed close");
				span.setAttribute("onclick", "WordProb.closeNumberSystem();");
				span.innerHTML = "&times;";
				row.appendChild(span);
				parentDiv.append(row);
			}
			else {
				for (var j = 0; j < 4; j++) {
					oprDiv = document.createElement('BUTTON');
					oprDiv.setAttribute("id", "oprDiv" + j);
					if (j == 0)
						oprDiv.setAttribute("class", "calValuesClass oprClass col-sm-offset-1 col-xs-offset-1 col-lg-offset-1 col-md-offset-1 col-xs-2 col-sm-2 col-md-2 col-lg-2 noPadding");
					else if (j == 1)
						oprDiv.setAttribute("class", "calValuesClass oprClass col-sm-offset-1 col-xs-offset-1 col-lg-offset-1 col-md-offset-1 col-xs-2 col-sm-2 col-md-2 col-lg-2 noPadding");
					else if (j == 2)
						oprDiv.setAttribute("class", "calValuesClass oprClass col-sm-offset-1 col-xs-offset-1 col-lg-offset-1 col-md-offset-1 col-xs-2 col-sm-2 col-md-2 col-lg-2 noPadding");
					else
						oprDiv.setAttribute("class", "calValuesClass oprClass col-sm-offset-1 col-xs-offset-1 col-lg-offset-1 col-md-offset-1 col-xs-2 col-sm-2 col-md-2 col-lg-2 noPadding");
					oprDiv.setAttribute("onclick", "WordProb.displayInTextBox(this)");
					$(oprDiv).data("oprData", WordProb.operator[j]);
					$(oprDiv).text(WordProb.operator[j]);
					row.appendChild(oprDiv);
					parentDiv.append(row);
				}
			}
		}
	}
}
WordProb.closeNumberSystem = function () {
	$("#numberSystemDiv").hide();
}
WordProb.clearText = function () {
	clearTimeout(WordProb.checkFieldTimer);
	($("#" + WordProb.id)).text("");
}