﻿// JScript File

// flash stuff:
    function flashFunc(func, args)
    {        
        try
        {
            flashID = element("flashID");
            flashID.SetVariable('myFunction',func);
            flashID.SetVariable('args',args);  
        }
        catch(err)
        {
        alert("err: " + err);
        }
    }
    
    function test()
    {
    alert('alert test');
    }
    
    function flashLabel(lbl)
    { 
        // alert('lbl: ' + lbl);    
        flashFunc('setHighlight', lbl );
    }
    
    function flashID_DoFSCommand(command, args) 
    {
        // alert("command: " + command +  ", args: " + args);
	    if (command == "set_focus")
	    {
	        //var name = "txt" + args;
	        // this is static for now... doesn't even pass in the right element name... and there is only one so we just set it
	        var name = "txtDistance";
	        var focusOn =  element(name);
	        focusOn.focus();     
	        var t=setTimeout('document.getElementById("' + name + '").select()',0);       
	    }
	}		
	
	
	