/**
 * iP Internet © Copyright 2008
 * 
 * Video Player Interface for Flash
 * @version 1.0
 */
//alert("loading player lib");
var vid;
if (typeof htv == "undefined") {
  //alert("creating vid player object");
  var htv = new Object();
}

htv.VideoPlayer = function() {
  var o = this;
  var flashObj;
  var videoFile;
  var imageFile;

  this.setObject = function(obj, video, image) {
    //alert("initialising the obj");
    o.flashObj = obj;
    o.videoFile = video;
    o.imageFile = image;
    o.sendState();
  }

  this.playVideo = function(video) {
    if (video != videoFile) {
      o.videoFile = video;
      o.imageFile = "";
      o.sendState();
    }
  }

  o.sendState = function() {
    var qs = "/?video=" + o.videoFile + "&image=" + o.imageFile;
    var tmpObj = document.getElementById(o.flashObj)
    if (tmpObj) {
      if (tmpObj.sendToFlash) {
        tmpObj.sendToFlash(qs);
      }
    }
  }

  o.flashLoaded = function() {
    o.sendState();
  }

  o.changeState = function() {
  }
}





