var Popup = {
  open: function(options) {
    this.options = {
      url: "#",
      width: 667,
      height: 580,
      name: "_blank",
      location: "no",
      menubar: "no",
      toolbar: "no",
      status: "yes",
      scrollbars: "yes",
      resizable: "yes",
      left: "",
      top: "",
      normal: false
    }
    Object.extend(this.options, options || {});
    if (this.options.normal) {
      this.options.menubar = "yes";
      this.options.status = "yes";
      this.options.toolbar = "yes";
      this.options.location = "yes";
    }
    this.options.width = this.options.width < screen.availWidth ? this.options.width : screen.availWidth;
    this.options.height = this.options.height < screen.availHeight ? this.options.height : screen.availHeight;
    var openoptions = "width=" + this.options.width + ",height=" + this.options.height + ",location=" + this.options.location + ",menubar=" + this.options.menubar + ",toolbar=" + this.options.toolbar + ",scrollbars=" + this.options.scrollbars + ",resizable=" + this.options.resizable + ",status=" + this.options.status;
    if (this.options.top != "") openoptions += ",top=" + this.options.top;
    if (this.options.left != "") openoptions += ",left=" + this.options.left;
    window.open(this.options.url, this.options.name, openoptions);
    return(false);
  }
};

function get_wb_reel_news() {
	/*Popup.open({ url: "http://email-warnerbros.com/registration.jsp?source=musicandlyrics", name: "wb_reel_news" });*/
	Popup.open({ url: "http://email-warnerbros.com/registration.jsp?title=musiclyrics&source=DVDSTE", name: "wb_reel_news" });
}

function get_wallpaper(t,d,id) {
	Popup.open({ url: 'http://php.warnerbros.com/movies/musicandlyrics/wallpaper.php?territory='+t+'&dimensions='+d+'&id='+id, name: 'wallpaper'});
}

function get_icons() {
	Popup.open({ url:'icons.html', name: 'wallpaper', width:875, height:305});
}

function get_partners() {
	Popup.open({ url:'partners.html', name: 'partners', width:728, height:600});
}

function get_promos() {
	Popup.open({ url:'promotions.html', name: 'promos', width:728, height:700});
}

function get_ecard() {
	Popup.open({ url:'http://php.warnerbros.com/movies/musicandlyrics/ecards/index.html', name: 'ecard', width:780, height:475});
}

function get_tickets() {
	Popup.open({ url:'tickets.html', name: 'tickets', width:515, height:215});
}

function viewing_options(){
	Popup.open({ url:'http://musicandlyrics.warnerbros.com/cmp/trailer.html?id=trailer&settings=true', name:'trailer', width:550, height:485 });
}

function setInitialFlashDimensions(e) {
  var so = new SWFObject("shell.swf", "music", "915", "750", "8", "#000000");
  if (so.write("swf")) {
    setFlashDimensions(e, "1");
    window.onresize = setFlashDimensions;
  } else {
    document.getElementById("upgrade").style.display = "block";
  }
}

window.onload = setInitialFlashDimensions;



