/** 
           * preSelectRadio  : This function is used to preselect the radio button
           * Parameters      : No parameter
           * 
           * Compatibility:IE 6.0,Mozilla Firefox 1.0.7, Netscape Navigator 7.1
           **/
           function preSelectRadio()
           {   
               var radio_name=document.news_summary.chapter_global;
               if (document.news_summary.chapter_global.length > 0 )
               {
               if(radio_name[0].value == document.news_summary.id_chapter.value) {
                   radio_name[0].checked=true;
               }
               else    {
                   radio_name[1].checked=true;
               }
               }
           }
           
           /** 
           * displayChapterDiv  : This function is used to initialize radio button value  
           *                     and call the function displayStoryTypeList
           * Parameters : chapter_id : pass the chapter id based on selected radio button 
           *              url        : pass the url of listStoryTypePT
           *              url_news   : pass the url of listNewsPT
           * 
           * Compatibility:IE 6.0,Mozilla Firefox 1.0.7, Netscape Navigator 7.1
           **/
           function displayChapterDiv(url,url_news,remove_hilite)
           {   
               var radio_name=document.news_summary.chapter_global;
               if (document.news_summary.chapter_global.length > 0 )
               { 
               for(var i=0;i<radio_name.length;i++)
               {
                  if(radio_name[i].checked == true)
                  {
                     document.news_summary.id_chapter.value = radio_name[i].value;
                     break;
                  }
               }
               }
               else
               {
                 document.news_summary.id_chapter.value = document.news_summary.chapter_global.value;
               }
               var id_chapter=document.news_summary.id_chapter.value;
               var view_story_type=document.news_summary.view_story_type.value;
               var site_map_left=document.news_summary.site_map_left.value;
               var abs_url=document.news_summary.abs_url.value;
               url=url + '?id_chapter=' + id_chapter + '&view_story_type=' +view_story_type + '&site_map_left=' +site_map_left + '&abs_url=' +abs_url;  
               url_news = url_news + '?id_chapter=' + id_chapter + '&id_story_type=' + document.news_summary.id_story_type.value + '&view_story_type=' +view_story_type + '&site_map_left=' +site_map_left + '&abs_url=' +abs_url;    
               displayStoryTypeList(url,url_news,remove_hilite);
           }
           
           /** 
           * displayStoryTypeList  : This function is used to call the ajax method makeGETRequest() 
           *                         to get all the story type list
           * Parameters : url        : pass the url of listStoryTypePT
           *              url_news   : pass the url of listNewsPT
           * 
           * Compatibility:IE 6.0,Mozilla Firefox 1.0.7, Netscape Navigator 7.1
           **/
           function displayStoryTypeList(url,url_news,remove_hilite)
           {  
               var displayNewsFunc = 'displayNewsList(\''+url_news+'\',\'\','+remove_hilite+')';
               makeGETRequest(url,'display_story_type_slot',displayNewsFunc );
           }
           
           /** 
           * displayNewsList  : This function is used to call the ajax method makeGETRequest() 
           *                         to get all the news item list
           * Parameters       : url_news   : pass the url of listNewsPT
           * 
           * Compatibility:IE 6.0,Mozilla Firefox 1.0.7, Netscape Navigator 7.1
           **/
           function displayNewsList(url_news, sponsor_type_link_id,remove_hilite)
           {  
               if (remove_hilite==1)
               {
                  try{
                     removeHilite();
                 }
                 catch(e) {}
               }
               else
               {
                try{
                   changeSponsorTypeStyle(sponsor_type_link_id);
                 }
                 catch(e) {}               
               }  
               makeGETRequest(url_news,'display_slot');
           }
           
           
           /** 
           * changeSponsorTypeStyle : This function is used change the style of the selected sponsor type link
           *                          and to reset style of all the other sponsor types
           * Parameters : 
           * sponsor_type_link_id   : Id of the sponsor type link
           * Return Value: Shall not return any value
           * Compatibility: Internet Explorer v6.0; Mozilla v5.0; Netscape V7.1;
           **/
           function changeSponsorTypeStyle(sponsor_type_link_id)   {
               if(sponsor_type_link_id)    {
                   var all_links = document.getElementsByName('sponsor_type_link');
                   var link_obj='';
                 
                   var link_obj = document.getElementById('sponsor_type_link_' + sponsor_type_link_id);
                  
                   for(i=0;i<all_links.length;i++) {
                       //all_links[i].setAttribute('class','sponsor_name');
                       all_links[i].className= 'hilite';
                   }
                   //link_obj.setAttribute('class','selected_sponsor_name');
                   link_obj.className= 'hilited';
                   var all_slot = document.getElementById('all_rss_slot');
                   if(sponsor_type_link_id == 'all')   {
                       all_slot.style.display = 'block';
                   }
                   else    {
                       all_slot.style.display = 'none';
                   }
               }
           }
           
           function removeHilite()
           {
              var all_links = document.getElementsByName('sponsor_type_link');
              for(i=0;i<all_links.length;i++) {
	        all_links[i].className= 'hilite';
	      }
           }
           
           /** 
           * showProfileURLDiv : This function is used to open the div  and display the url in text box
           * Parameters : url    :   The url to be displayed on the text box
           * Return Value: Shall not return any value
           * Compatibility: Internet Explorer v6.0; Mozilla v5.0; Netscape V7.1;
           **/
           function showRssURLDiv(url,event)
           {
               var result = document.getElementById('rssurl_display');
               result.value=url;
               displayWindow('rssurl','dummy');
           }
           
          