function Topic(){
  window.location.href='Topic.php?topic=' + document.form1.subtopic.value;
}
function SubTopic(SentForm){
  var topic = SentForm.topic.options[SentForm.topic.selectedIndex].value;
  var count = document.data.TotalCount.value;
  var j = 0;
  var topicindex = 0;
  SentForm.subtopic.options.length = 0;
  for(i = 0 ; i < count ; i++){
	if(topic == document.data.topics[i].value){
	  if(defaultsubtopic ==  document.data.topics[i].className) {topicindex = j;}
	  SentForm.subtopic.options[j] = new Option(document.data.topics[i].title,document.data.topics[i].className);
	  j = j + 1;
	}		
  }
  SentForm.subtopic.selectedIndex = topicindex;
} 
