
 //if( Drupal.jsEnabled){
	$(document).ready(function(){

			$("#info").click(function(){
				//document.write(complete2());

				document.write("checkCompleteWOther = " + checkCompleteWOther() + "<br />");
				//document.write("firstEmpty = " + firstEmpty + "<br />");
				for(i=0;i<squares.length;i++){
					document.write("squares " + i + " group = " + squares[i].group + "<br />");
					document.write("squares " + i + " sub = " + squares[i].sub + "<br />");
					document.write("squares " + i + " branched = " + squares[i].branched + "<br />");
					document.write("<br />");
				}
				/*
				if(checkForBranch() == -1){ // first in case it is unbranched sugar
					document.write( 1 + "<br />");
					document.write( checkTableMiddleIsComplete());
				}else{ // sugar is branched
					var branchedArr = new Array();
					branchedArr = checkAllForBranch();
					var terminalTopArr = new Array();
					terminalTopArr = getTerminalTopArr();

					for(i=0; i <branchedArr.length;i++){
						document.write("branchedArr at " + i + " = " + branchedArr[i] + "<br />");
					}
					for(i=0; i <terminalTopArr.length;i++){
						document.write("terminalTopArr at " + i + " = " + terminalTopArr[i] + "<br />");
					}
					if( branchedArr.length != terminalTopArr.length){
						document.write("FALSE");
					}

					var i;
					for(i = 0; i < branchedArr.length; i++){

						//document.write( branchedArr[i] + "<br />");
						var sq;
						for( sq = branchedArr[i]; sq < terminalTopArr[i]; sq++ ){
							if( squares[sq].group == -1){
								document.write( "false"+ "<br />");
							}
						}
					}
					document.write( " top table is right <br />");
					return document.write(checkTableMiddleIsComplete());
				}*/
			});

	});
 //}