var inData;
function windowInit(args)
{
    inData = args[0];
}

function OnGoNext()
{
   var index = parseInt($e("wind_deck").selectedIndex);
   index = index < 2 ? index : 1;
   $e("wind_deck").selectedIndex = index+1;
   if(index == 0)
   {
        ParseFile();
   }
}

function OnCancel()
{
    window.close();
}

//browse part
function OnBrowserOpen()
{
    var file = Io.loadFile("choose File",['*.*|*.*'],false);
    //alert(file[0].path);
    $e("wind_text").value = file[0].path;
}


//function Parsing part
function GenerateFileInfo(path)
{
    var res = inData.plugin.getFileMediaInfoXml(path);
    //alert(res);
}

function ParseFile()
{
   if($e("wind_text").value == "")
   {
        alert("Please select a file.");
        $e("wind_deck").selectedIndex=0;
        return;
   }
   setTimeout(GenerateFileInfo, 100,  $e("wind_text").value);
}