// Get all objects from the page as an array
var aTechsourceObjects = document.getElementsByTagName('object');
var iObjectsCounter;

// This function waits until the document is ready and then activates the objects
function TechsourceWaitReadyStateIsComplete() {
  // Is the document loaded, parsed and ready?
  if( document.readyState != 'complete' ) { 
    // No, wait a bit more
    self.setTimeout( "TechsourceWaitReadyStateIsComplete()", 100 );
  } else if( iTechsource != 1 ) {
    iTechsource = 1;
    // Loop on objects
    for( iObjectsCounter = 0; iObjectsCounter < aTechsourceObjects.length; iObjectsCounter++ ) {
      // Check if it's a techsource generated object
      if( aTechsourceObjects[iObjectsCounter].id.substring(0,11) == 'techsource_' ) { 
        // Reassign the outerHTML code to itself
        aTechsourceObjects[iObjectsCounter].outerHTML=aTechsourceObjects[iObjectsCounter].outerHTML;
	aTechsourceObjects[iObjectsCounter].Play();
      }
    }
  }
}
if( navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 ) {
  TechsourceWaitReadyStateIsComplete();
}

var iTechsource = 0;

