/*
* SWFObjectSize v1.0.0: Flash Player size
*
* SWFObjectSize is (c) 2006 Tobias Schibler:
* http://www.tujo.net
*
*/
function SWFObjectSize(w,h) {
  if(SWFObjects.id) {
    w = w > 0 ? w : 0;
    h = h > 0 ? h : 0;
    var docWidth,docHeight;
    if (self.innerHeight) {
      docWidth = self.innerWidth;
      docHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
      docWidth = document.documentElement.clientWidth;
      docHeight = document.documentElement.clientHeight;
    } else if (document.body) {
      docWidth = document.body.clientWidth;
      docHeight = document.body.clientHeight;
    }
    docWidth =  docWidth+w;
    docHeight =  docHeight+h;
    document.getElementById(SWFObjects.id).style.width = ((docWidth < SWFObjects.w) ? SWFObjects.w : docWidth)+"px";
    document.getElementById(SWFObjects.id).style.height = ((docHeight < SWFObjects.h) ? SWFObjects.h : docHeight)+"px";
  }
}
function SWFObjectSizeResize() {
  //alert("w: "+SWFObjects.id);
  if(SWFObjects.id) {
    var docWidth;
    if (self.innerWidth) {
      docWidth = self.innerWidth;
    } else if (document.documentElement && document.documentElement.clientWidth) {
      docWidth = document.documentElement.clientWidth;
    } else if (document.body) {
      docWidth = document.body.clientWidth;
    }
    document.getElementById(SWFObjects.id).style.width = (((docWidth < SWFObjects.w) ? SWFObjects.w : docWidth))+"px";
  }
}
function SWFObjectSizeLoad() {
  if(SWFObjects.id) {
    var docWidth,docHeight;
    if (self.innerHeight) {
      docWidth = self.innerWidth;
      docHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
      docWidth = document.documentElement.clientWidth;
      docHeight = document.documentElement.clientHeight;
    } else if (document.body) {
      docWidth = document.body.clientWidth;
      docHeight = document.body.clientHeight;
    }
    document.getElementById(SWFObjects.id).style.width = (((docWidth < SWFObjects.w) ? SWFObjects.w : docWidth))+"px";
    document.getElementById(SWFObjects.id).style.height = (((docHeight < SWFObjects.h) ? SWFObjects.h : docHeight))+"px";
  }
}
window.onresize = SWFObjectSizeResize;
window.onload = SWFObjectSizeLoad;

