function ChangeTopics( translator, topic, index){

   var translatorId, TotOptions, myList, i, List, TempIndex;

      translatorId   = translator.options[translator.selectedIndex].value;
      TotOptions  = topic.length 
      TempIndex   = index
   

 
    if (index==0) {  
	   for (i = TotOptions; i >= 0; i--) 
             { topic.options[i] = null; }
    } else {  
           for (i = TotOptions; i >= 1; i--) 
             { topic.options[i] = null; }    
    }

     if (translatorId == 'SB') {
 	
    List = new Array()
List[index++] = new Option ("Revelation", value= "1")  
List[index++] = new Option ("Belief", value= "2")  
List[index++] = new Option ("Knowledge", value= "3")  
List[index++] = new Option ("Ablutions (Wudu')", value= "4")  
List[index++] = new Option ("Bathing (Ghusl)", value= "5")  
List[index++] = new Option ("Menstrual Periods", value= "6")  
List[index++] = new Option ("Rubbing hands and feet with dust (Tayammum)", value= "7")  
List[index++] = new Option ("Prayers (Salat)", value= "8")  
List[index++] = new Option ("Virtues of the Prayer Hall (Sutra of the Musalla)", value= "9")  
List[index++] = new Option ("Times of the Prayers", value= "10")  
List[index++] = new Option ("Call to Prayers (Adhaan)", value= "11")  
List[index++] = new Option ("Characteristics of Prayer", value= "12")
List[index++] = new Option ("Friday Prayer", value= "13")
List[index++] = new Option ("Fear Prayer", value= "14")
List[index++] = new Option ("The Two Festivals (Eids)", value= "15")
List[index++] = new Option ("Witr Prayer", value= "16")
List[index++] = new Option ("Invoking Allah for Rain (Istisqaa)", value= "17")
List[index++] = new Option ("Eclipses", value= "18")
List[index++] = new Option ("Prostration During Recital of Qur'an", value= "19")
List[index++] = new Option ("Characteristics of Prayer", value= "20")
List[index++] = new Option ("Shortening the Prayers (At-Taqseer)", value= "21")
List[index++] = new Option ("Prayer at Night (Tahajjud)", value= "22")
List[index++] = new Option ("Actions while Praying", value= "23")
List[index++] = new Option ("Funerals (Al-Janaa'iz)", value= "24")
List[index++] = new Option ("Obligatory Charity Tax (Zakat)", value= "25")
List[index++] = new Option ("Obligatory Charity Tax After Ramadaan (Zakat ul Fitr)", value= "26")
List[index++] = new Option ("Pilgrimmage (Hajj)", value= "27")
List[index++] = new Option ("Minor Pilgrammage (Umra)", value= "28")
List[index++] = new Option ("Pilgrims Prevented from Completing the Pilgrimmage", value= "29")
List[index++] = new Option ("Penalty of Hunting while on Pilgrimmage", value= "30")
List[index++] = new Option ("Virtues of Madinah", value= "31")
List[index++] = new Option ("Fasting", value= "32")
List[index++] = new Option ("Praying at Night in Ramadaan (Taraweeh)", value= "33")
List[index++] = new Option ("Retiring to a Mosque for Remembrance of Allah (I'tikaf)", value= "34")
List[index++] = new Option ("Sales and Trade", value= "35")
List[index++] = new Option ("Sales in which a Price is paid for Goods to be Delivered Later (As-Salam)", value= "36")
List[index++] = new Option ("Hiring", value= "37")
List[index++] = new Option ("Transferance of a Debt from One Person to Another (Al-Hawaala)", value= "38")
List[index++] = new Option ("Representation, Authorization, Business by Proxy", value= "39")
List[index++] = new Option ("Agriculture", value= "40")
List[index++] = new Option ("Distribution of Water", value= "41")
List[index++] = new Option ("Loans, Payment of Loans, Freezing of Property, Bankruptcy", value= "42")
List[index++] = new Option ("Lost Things Picked up by Someone (Luqaata)", value= "43")
List[index++] = new Option ("Oppressions", value= "44")
List[index++] = new Option ("Partnership", value= "45")
List[index++] = new Option ("Mortgaging", value= "46")

  	myList = List;
 	}
 	else
 	{
 	  if(translatorId == 'SM'){
 	    List    = new Array()

List[index++] = new Option ("Null", value= "0")  
List[index++] = new Option ("Null", value= "0")
 
 	    myList = List;
 	  }
	}
 	 
 	 for (i = TempIndex; i <myList.length; i++) {
 		topic.options[i] = myList[i]
 	  }
}

function DoAssign(frm){
frm.topicName.value=frm.topic[frm.topic.selectedIndex].text
frm.TopicIndex.value =frm.topic.selectedIndex 
frm.HadithTranslatorIndex.value=frm.translator.selectedIndex


}
