﻿// JScript File

function ShowLocality(ddl)
{
    var argList = getIndex(ddl);
    CallServer(argList,"");
}
 function ReceiveServerData(rValue)
     {
     alert(rValue);
     }
     

 // As firefox has issues with .innerText these two routines cater for get and setting the  values in the Label
   function getIndex(control)
   {
//         var myspan = document.getElementById(control);
//         var span_textnode = myspan.firstChild;
//         i =  span_textnode.data;
         var e = document.getElementById(control); // select element
         var strValue = e.options[e.selectedIndex].value;
//         if ((navigator.userAgent).indexOf("Firefox")!=-1) 
//         {
//            
//         }
//         else
//         {
//            i = document.getElementById(control).innerText;
//          }
            
        return strValue;
     }
   function setIndex(control,value)
   {
         if ((navigator.userAgent).indexOf("Firefox")!=-1) 
         {
             var myspan = document.getElementById(control);
             var span_textnode = myspan.firstChild;
             span_textnode.data = value;
         }
         else
         {
           document.getElementById(control).innerText = value;
         }
            
        return i;
        
   }
  //   End get set



