/* 
   Function written by Rekha Kumari to create Dynamic Text and Select Option Filds
   selectFieldId -- Id of the Select Field
   divId -- Id of Div Field that will include the Dynamic Text and Select Fields
   
   OutPut:
   className_i - This is the Class Name in the Form 'i' being variable
   selectNumberOfGirls_i - This is the Select Field Name in the Form 'i' being variable
*/

function displayTextFields( selectFieldId , divId)
{
	var str="";
	
	var x = document.getElementById(selectFieldId).value;
	//If x == 1, this indicates that There would be just one Class
	
	if(x==1)
	{
		str=str+"<img src='/images/uniquelygirl_teachers_line.gif' width='492' height='8' /><br /><br />";
		str=str+"Provide a name for your class. Your students will use this class name when they sign in to start the program.<br /> ";
		str=str+"This name will also be used to group your students into the appropriate class list on the Student Progress page.";
		str=str+"<img src='/images/spacer.gif' width='5' height='10' /><br />";
	}
	else if(x>1){
	   		
	   str=str+"<img src='/images/uniquelygirl_teachers_line.gif' width='492' height='8' /><br /><br />";
	   str=str+"If you plan on using the program in multiple classes (like first-, fifth- &amp; sixth-hour Health Ed.), <br />";
	   str=str+"provide a name for each class. Your students will use this class name when they sign in to <br />";
	   str=str+"start the program. This name will also be used to group your students into the appropriate <br />";
	   str=str+"class list on the Student Progress page.<br /><img src='/images/spacer.gif' width='5' height='10' /><br />";
	}
	for (i = 1; i <= x; i++)
	{
		str=str+"*Class "+i+" Name: <img src='/images/spacer.gif' width='3' height='10' />";
		str=str+"<input name='className' type='text' class='teachers_registration_input' id='className' size='25' />";
		str=str+"<img src='/images/spacer.gif' width='31' height='10' />";
		str=str+"<img src='/images/spacer.gif' width='10' height='10' />";
		str=str+"*Number of Girls: <img src='/images/spacer.gif' width='5' height='10' />";
		str=str+"<select name='NumberOfGirls' class='teachers_registration_input'>";  
		str=str+"<option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option>";
		str=str+"<option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option>";
		str=str+"<option>21</option><option>22</option><option>23</option><option>24</option><option>25</option><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option>";
		str=str+"<option>31</option><option>32</option><option>33</option><option>34</option><option>35</option><option>36</option><option>37</option><option>38</option><option>39</option><option>40</option>";
		str=str+"<option>41</option><option>42</option><option>43</option><option>44</option><option>45</option>";
		str=str+"</select>";
		str=str+"<img src='/images/spacer.gif' width='5' height='10' />";
		str=str+"<a href='#'><img src='/images/uniquelygirl_teachers_question.gif' width='25' height='21' border='0' align='middle' />";
		str=str+"</a></br>";
	}
	document.getElementById(divId).innerHTML=str;
	
}


