function init() {
    
    initJQueryUI ();
    
    prepareDownloadify();
    
    //Start by hiding everything
    $("#tabMain").hide();
    $("#fileInputDiv").hide();
    $("#resDiv").hide();
    $("#saveN").hide();
    $("#saveP").hide();
    $("#provStats").hide();
    $("#confirm_swap").hide();
    
    //See if we have a new enough browser to use file uploading
    if (window.File && window.FileReader && window.FileList && window.Blob) {
        $("#willWork").html("Querying.. You have a newer browser that supports file reading so everything should work. Huzzah!");
        $("#fileInputDiv").show();
    } else {
        $("#willWork").html("Sorry! Your browser doesn't support file reading. It's either an old version of chrome, firefox, or IE, or it's something horrible like Safari.");
        return;
    }
    
    //Set up some event handlers
    $("#fileElem").on('change', function(e) {
        
        $("#statusBar").progressbar("value", 0);
        
        var reader = new FileReader();
        
        //Done, put into a string
        reader.onload = fileRead;
        
        //Something went horribly wrong
        reader.onerror = readerr;
        
        //Call periodically during
        reader.onprogress = updateLoadProgress;
        reader.readAsText(this.files[0], "windows-1252");
        
    
    
    
    });
    
    
}
//Call on body load. Check compatibility and hide/unhide various elements
Call on body load. Check compatibility and hide/unhide various elements
Call on body load . Check compatibility and hide / unhide various elements
function init() {
    initJQueryUI ();
    prepareDownloadify();
    $("#tabMain").hide();
    $("#fileInputDiv").hide();
    $("#resDiv").hide();
    $("#saveN").hide();
    $("#saveP").hide();
    $("#provStats").hide();
    $("#confirm_swap").hide();
    if (window.File && window.FileReader && window.FileList && window.Blob) {
        $("#willWork").html("Querying.. You have a newer browser that supports file reading so everything should work. Huzzah!");
        $("#fileInputDiv").show();
    } else {
        $("#willWork").html("Sorry! Your browser doesn't support file reading. It's either an old version of chrome, firefox, or IE, or it's something horrible like Safari.");
        return;
    }
    $("#fileElem").on('change', function(e) {
        $("#statusBar").progressbar("value", 0);
        var reader = new FileReader();
        reader.onload = fileRead;
        reader.onerror = readerr;
        reader.onprogress = updateLoadProgress;
        reader.readAsText(this.files[0], "windows-1252");
    });
}
function init ( ) { initJQueryUI ( ) ; prepareDownloadify ( ) ; $ ( "#tabMain" ) . hide ( ) ; $ ( "#fileInputDiv" ) . hide ( ) ; $ ( "#resDiv" ) . hide ( ) ; $ ( "#saveN" ) . hide ( ) ; $ ( "#saveP" ) . hide ( ) ; $ ( "#provStats" ) . hide ( ) ; $ ( "#confirm_swap" ) . hide ( ) ; if ( window . File && window . FileReader && window . FileList && window . Blob ) { $ ( "#willWork" ) . html ( "Querying.. You have a newer browser that supports file reading so everything should work. Huzzah!" ) ; $ ( "#fileInputDiv" ) . show ( ) ; } else { $ ( "#willWork" ) . html ( "Sorry! Your browser doesn't support file reading. It's either an old version of chrome, firefox, or IE, or it's something horrible like Safari." ) ; return ; } $ ( "#fileElem" ) . on ( 'change' , function ( e ) { $ ( "#statusBar" ) . progressbar ( "value" , 0 ) ; var reader = new FileReader ( ) ; reader . onload = fileRead ; reader . onerror = readerr ; reader . onprogress = updateLoadProgress ; reader . readAsText ( this . files [ 0 ] , "windows-1252" ) ; } ) ; }
Call on body load.
Call on body load .
//Start by hiding everything //See if we have a new enough browser to use file uploading //Set up some event handlers //Done, put into a string //Something went horribly wrong //Call periodically during