﻿//function hashCheck()
//{
//    var hashVal = window.location.hash;
//    if(hashVal.length > 1){
//        validate(hashVal.substring(1));
//    }
//}

function initialiseStateFromURL() {
        var hashVal = window.location.hash;
        if(hashVal.length > 1){
            validate(hashVal.substring(1));
        }
   }

 var recentHash = "";
   function pollHash() {
        if (sessvars.is_chrome == true)
        {
            if (sessvars.checkLoading == true)
            {
                setTimeout("hide('myLoading')", 4000);
                setTimeout("hide('jsDisabled2')", 4000);
                setTimeout("sessvars.checkLoading = true;", 4000);
                    
               if (document.getElementById( "myLoading" + "3") != null)
               {
                    setTimeout("hide('" + "myLoading" + "3')", 4000);
               } 
            }
        }
  
     if (window.location.hash==recentHash) {
       return; // Nothing's changed since last polled.
     }
     recentHash = window.location.hash;
  
     // URL has changed, update the UI accordingly.
     validate(recentHash.substring(1));
  
   }

