rem: status = req.responseXML.documentElement; document.getElementById( 'time' ).textContent = format_time( status.getElementsByTagName( 'time' )[0].firstChild.data ); document.getElementById( 'length' ).textContent = format_time( status.getElementsByTagName( 'length' )[0].firstChild.data ); if( status.getElementsByTagName( 'volume' ).length != 0 ) document.getElementById( 'volume' ).textContent = Math.floor(status.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+"%"; document.getElementById( 'state' ).textContent = status.getElementsByTagName( 'state' )[0].firstChild.data; if( status.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) 
add: status_iesuxx = req.responseXML.documentElement; set_text( 'time', format_time( status_iesuxx.getElementsByTagName( 'time' )[0].firstChild.data ) ); set_text( 'length', format_time( status_iesuxx.getElementsByTagName( 'length' )[0].firstChild.data ) ); if( status_iesuxx.getElementsByTagName( 'volume' ).length != 0 ) set_text( 'volume', Math.floor(status_iesuxx.getElementsByTagName( 'volume' )[0].firstChild.data/512)+'%' ); set_text( 'state', status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data ); if( status_iesuxx.getElementsByTagName( 'state' )[0].firstChild.data == "playing" ) 
context: function parse_status(){    if( req.readyState == 4 )    {        if( req.status == 200 )        {            status = req.responseXML.documentElement;            document.getElementById( 'time' ).textContent = format_time( status.getElementsByTagName( 'time' )[0].firstChild.data );            document.getElementById( 'length' ).textContent = format_time( status.getElementsByTagName( 'length' )[0].firstChild.data );            if( status.getElementsByTagName( 'volume' ).length != 0 )            document.getElementById( 'volume' ).textContent = Math.floor(status.getElementsByTagName( 'volume' )[0].firstChild.data/5.12)+"%";            document.getElementById( 'state' ).textContent = status.getElementsByTagName( 'state' )[0].firstChild.data;            if( status.getElementsByTagName( 'state' )[0].firstChild.data == "playing" )            {                document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/pause.png' );            }            else            {                document.getElementById( 'btn_pause_img' ).setAttribute( 'src', 'images/play.png' );            }        }        else        {            /*alert( 'Error! HTTP server replied: ' + req.status );*/        }    }}
meta: 2294	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2294/c3537d9355bf307bfd63b4c1d319a0777cf80679/functions.js/clean/share/http/functions.js