// Stand: 13. Oktober 2006
// Autor: Robin Kump
// ----------------------------------------------------------------------


// Image PopUp (Begin)
// ----------------------------------------------------------------------


function openImageWindow(URL,Language) {

  var IMAGE_ID = URL.replace(/^http:\/\/.+\/(1\d\d\d\d\d\d)\/.+/,"$1");

  var Properties = "width=250,height=100,left="+((screen.availWidth-(250+10))/2)+",top="+((screen.availHeight-(100+36))/2)+",scrollbars=yes,menubar=no,toolbar=no,location=no,status=no,resizable=no";

  if (Language.search(/\bl1\b|\bl2\b|\bl7\b|\bl8\b|\bl10\b/) != -1) {
    window.open("/multimedia/WindowTools/html/Image/" + Language + ".html?"+encodeURIComponent(URL),IMAGE_ID,Properties).focus();
  }
  else {
    window.open("/multimedia/WindowTools/html/Image/l2.html?"+URL,IMAGE_ID,Properties).focus();
  }
}
// ----------------------------------------------------------------------
// Image PopUp (End)



// Stream PopUp (Begin)
// ----------------------------------------------------------------------

  function openStreamWindow(Player,URL,VideoWidth,VideoHeight,Language) {

    switch(Player) {
      case "MP":
        var StreamWidth = VideoWidth;
        var StreamHeight = VideoHeight + 47;

        var WindowWidth = StreamWidth + 30;
        var WindowHeight = StreamHeight + 60;

        var xpos = Math.max(0,(screen.availWidth-(WindowWidth+10))/2);
        var ypos = Math.max(0,(screen.availHeight-(WindowHeight+36))/2);

        var Parameters = 'StreamURL=' + encodeURIComponent(URL) + '&StreamWidth=' + StreamWidth + '&StreamHeight=' + StreamHeight;

        var Properties = "width="+WindowWidth+",height="+WindowHeight+",left="+xpos+",top="+ypos+",scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,status=no,copyhistory=no";
 
        if (Language.search(/\bl1\b|\bl2\b|\bl7\b|\bl8\b|\bl10\b/) != -1) {
          window.open("/multimedia/WindowTools/html/Video-MP/" + Language + ".html?"+Parameters,"_blank",Properties).focus();
        }
        else {
          window.open("/multimedia/WindowTools/html/Video-MP/l2.html?"+Parameters,"_blank",Properties).focus();
        }
      break;
      case "RP":
        var StreamWidth = VideoWidth;
        var StreamHeight = VideoHeight;

        var WindowWidth = StreamWidth + 30;
        var WindowHeight = StreamHeight + 90;

        var xpos = Math.max(0,(screen.availWidth-(WindowWidth+10))/2);
        var ypos = Math.max(0,(screen.availHeight-(WindowHeight+36))/2);

        var Parameters = 'StreamURL=' + encodeURIComponent(URL) + '&StreamWidth=' + StreamWidth + '&StreamHeight=' + StreamHeight;

        var Properties = "width="+WindowWidth+",height="+WindowHeight+",left="+xpos+",top="+ypos+",scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,status=no,copyhistory=no";
 
        if (Language.search(/\bl1\b|\bl2\b|\bl7\b|\bl8\b|\bl10\b/) != -1) {
          window.open("/multimedia/WindowTools/html/Video-RP/" + Language + ".html?"+Parameters,"_blank",Properties).focus();
        }
        else {
          window.open("/multimedia/WindowTools/html/Video-RP/l2.html?"+Parameters,"_blank",Properties).focus();
        }
      break;
    }
  }  

// ----------------------------------------------------------------------
// Stream PopUp (End)
