
	var CONTROL =  1;
	var BLANK =" ";
     	var t = 0;
	var DIRECTIONS = "DIRECTIONS: Answer each question.";
     	CORRECT= new Array (9);

	function CreateNumber ()
	{
		t++;
	    	SKILL = Math.random() * 1 + 1;
	    	  SKILL = Math.round (SKILL);
		switch(SKILL)
		{
			case 1:
	     			var RAND = 19;		
     				METRIC1 = new Array (" ","feet","yards","yards","miles","miles","pounds","tons","cups","pints","quarts","quarts","gallons","minutes","hours","days","weeks","years","years","decades","centuries");
     				METRICNUMBER = new Array (" ","12","36","3","5280","1760","16","2000","8","2","2","4","4","60","60","24","7","12","52","10","100");
     				METRICOTHER = new Array (" ","inches","inches","feet","feet","yards","ounces","pounds","ounces","cups","pints","cups","quarts","seconds","minutes","hours","days","months","weeks","years","years");
      	  			NUMBER = Math.random() * RAND + CONTROL;
	  			 NUMBER = Math.round(NUMBER);
	    			NY = Math.random() * 5;
	    			 NY = Math.round (NY) + 2;
				PROBLEM = ( NY + " " + METRIC1[NUMBER] +  " equals ___________ " + METRICOTHER[NUMBER]);
				HOLD1= "" + METRICNUMBER[NUMBER] * NY;
	 			METRIC = HOLD1;
	  			SNUMBER =  METRIC;
	   			INDEX = SNUMBER.length;   
				if (INDEX == 4)
				{
					METRIC = (HOLD1.substring (0,1) + "," + 
             				HOLD1.substring (1,4));
	 			} 
				if (INDEX == 5)
				{ 
					METRIC = (HOLD1.substring (0,2) + "," + 
             				HOLD1.substring (2,5));
				} 
				CORMETRIC = METRIC + " " + METRICOTHER[NUMBER];
			break;
			case 2:
	     			var RAND = 19;		
     				METRIC1 = new Array (" ","feet","yards","yards","miles","miles","pounds","tons","cups","pints","quarts","quarts","gallons","minutes","hours","days","weeks","years","years","decades","centuries");
     				METRICNUMBER = new Array (" ","12","36","3","5280","1760","16","2000","8","2","2","4","4","60","60","24","7","12","52","10","100");
     				METRICOTHER = new Array (" ","inches","inches","feet","feet","yards","ounces","pounds","ounces","cups","pints","cups","quarts","seconds","minutes","hours","days","months","weeks","years","years");
      	  			NUMBER = Math.random() * RAND + CONTROL;
	  			 NUMBER = Math.round(NUMBER);
	    			NY = Math.random() * 5;
	    			 NY = Math.round (NY)+ 2;
				HOLD1= "" + METRICNUMBER[NUMBER] * NY;
	 			METRIC = HOLD1;
	  			SNUMBER =  METRIC;
	   			INDEX = SNUMBER.length;   
				if (INDEX == 4)
				{
					METRIC = (HOLD1.substring (0,1) + "," + 
             				HOLD1.substring (1,4));
	 			} 
				if (INDEX == 5)
				{ 
					METRIC = (HOLD1.substring (0,2) + "," + 
             				HOLD1.substring (2,5));
				}
				PROBLEM= METRIC + " " + METRICOTHER[NUMBER] +  " equals ___________ " + METRIC1[NUMBER];
				METRIC = NY;
				CORMETRIC = METRIC + " " + METRIC1[NUMBER]; 
			break;
		}
		CORRECT[t] = CORMETRIC;
	}
     