  function browserData() {
    var browser = Voy.Env.Browser.browserName() + " " + Voy.Env.Browser.version().asString();
    var os = Voy.Env.OS.version();
    var screen = Voy.Env.Resolution.asString();
    var pdf = Voy.Env.Acrobat.version().asString();
    var cookie = Voy.Env.Browser.cookiesEnabled();
    var flash = Voy.Env.Browser.flashVersion().asString();
    var javascript = Voy.Env.Browser.javaScriptEnabled();
  
    var browserIdValue = document.getElementById( "userBrowserId" );
    if ( browserIdValue != null ) { browserIdValue.setAttribute( "value", browser ); }
  	var osIdValue = document.getElementById( "userOSId" );
    if ( osIdValue != null ) { osIdValue.setAttribute( "value", os ); }
  	var screenIdValue = document.getElementById( "userResolutionId" );
    if ( screenIdValue != null ) { screenIdValue.setAttribute( "value", screen ); }
  	var pdfIdValue = document.getElementById( "userAcrobatId" );
    if ( pdfIdValue != null ) { pdfIdValue.setAttribute( "value", pdf ); }
  	var cookiesIdValue = document.getElementById( "userCookiesId" );
    if ( cookiesIdValue != null ) { cookiesIdValue.setAttribute( "value", cookie ); }
  	var falshIdValue = document.getElementById( "userFlashId" );
    if ( falshIdValue != null ) { falshIdValue.setAttribute( "value", flash ); }
  	var javascriptIdValue = document.getElementById( "userJavaScriptId" );
    if ( javascriptIdValue != null ) { javascriptIdValue.setAttribute( "value", javascript ); }
  }

  function stateChange() {
    var selectedStateOption = document.getElementById("selectState").options[document.getElementById("selectState").selectedIndex].value;
    var districtList = document.getElementById("districtSelectId");
    var url = '/contact/save_contact_user.do';
    var self = this;
    var params = 'method=setupDistrictList&state='+ selectedStateOption
    
      var myAjax = new Ajax.Request(
      url, 
      {
        method: 'post', 
        parameters: params,
        onComplete: function( request ) {
          for( var p = districtList.options.length; p >= 0 ; p-- ) { 
            districtList.options[p] = null; 
          }  
          districtList.options.length = 0;
          var result = eval( '(' + request.responseText + ')' );
          var newFirstOption = document.createElement("option");
          newFirstOption.innerHTML = "";
          newFirstOption.value = "";
          newFirstOption.text = "Select...";
          newFirstOption.name = "Select...";
          districtList.appendChild(newFirstOption);
          var newOtherOption = document.createElement("option");
          newOtherOption.innerHTML = "";
          newOtherOption.value = "99999999";
          newOtherOption.text = "OTHER";
          newOtherOption.name = "OTHER";
          districtList.appendChild(newOtherOption);
          if ( result.districtNamesList != null && result.districtNamesList.length > 0 ) {
            for ( var i = 0; i < result.districtNamesList.length; i++ ) {
              var newOption = document.createElement("option");
              newOption.innerHTML = "";
              newOption.value = result.districtPIDsList[ i ];
              newOption.text = result.districtNamesList[ i ];
              newOption.name = result.districtNamesList[ i ];
              districtList.appendChild(newOption);
            }
          }
        }     
      });
  }
