
    var stitchArray;
    var clearSynchedAd = false;

    function fspContainer_DoFSCommand( command )
    {
      eval( command );
    }

    function synchIFDisplay( isVis, sifUrl, iWidth, iHeight )
    {
      debug.innerHTML += "<br>synch if: " + isVis + ":" + sifUrl;
      var sifn = frames[ "synch" ];
      var sifid = document.getElementById( "synchIF" );
      if( sifn)
      {
        if( isVis )
        {
          if( !iWidth ) { iWidth=0 }
          if( !iHeight ) { iHeight=0 }
          sifid.style.width = iWidth + "px";
          sifid.style.height = iHeight + "px";
          sifn.location.replace( sifUrl );
        }
        else if( clearSynchedAd )
        {
          sifid.style.width = "0px";
          sifid.style.height = "0px";
        }
      }
    }
    function sendLogIF( logUrl )
    {
      if( frames[ 'ads' ] )
      {
        frames[ 'ads' ].location.replace( logUrl );
      }
    }
    function sendHitIF( hitUrl )
    {
      if( frames[ 'hit' ] )
      {
        hitUrl = hitUrl.replace( /liiiid/, "lid" );
        frames[ 'hit' ].location.replace( hitUrl );
      }
    }
    function stitch(index, frag)
    {
      if( stitchArray == undefined ) stitchArray = new Array();
      if( stitchArray[ index ] == undefined )
      {
        stitchArray[ index ] = frag;
      }
      else
      {
        stitchArray[ index ] += frag;
      }
      if( stitchArray[ index ].lastIndexOf( ")" ) == stitchArray[ index ].length - 1 )
      {
        stitchArray[ index ] = stitchArray[ index ].replace( /~/gi, "\'" );
        eval(stitchArray[ index ] );
        delete stitchArray[ index ];
      }
    }
