//=== Voor browsers die getElementById niet snappen:
if(document.all && !document.getElementById) {
    document.getElementById = function(id) {
         return document.all[id];
}}

var Popup_Window_Defined = false;

function GlowLeft   (p_this){  p_this.className="GlowLeft"       }
function UnGlowLeft (p_this){  p_this.className="VerkLeft"       }
function GlowRight  (p_this){  p_this.className="GlowRight"      }
function UnGlowRight(p_this){  p_this.className="VerkRight"      }
function FakeLink   (p_this){  p_this.className="FakeLink_sel"   }
function UnFakeLink (p_this){  p_this.className="FakeLink_unsel" }
function Highlight  (p_this){  p_this.className="Highlight"      }
function Lowlight   (p_this){  p_this.className="Blokje"         }

function Write_Item( p_Title
                   , p_Picture_Left
                   , p_Youtube_ID
                   , p_Text
                   , p_Start        // Starttijd (in seconden)
                   )
{
  var x;
  p_Text  = typeof(p_Text )=="undefined"?"":p_Text;
  p_Start = typeof(p_Start)=="undefined"?"":"&start=" + p_Start;

  if ( p_Youtube_ID.match(/\.flv/i) ) {
    document.write('<a href="'
                    + p_Youtube_ID
                    + '" rel="vidbox" class="Blokje" title="'
                    + p_Title + ' ">'
                    + '<img class=VerkLeft  title="Klik voor de film" src="Thumbs/' + p_Picture_Left + '">'
                    + p_Title
                    );
  } else {
    x = '"http://www.youtube.com/v/'
      +  p_Youtube_ID
      + '&rel=0&color1=0xffff80&color2=0xffff80&hl=en&loop=0&showinfo=0' + p_Start + '&end=250"' ;
    l_Title = '"' + p_Title + '"';
    document.write('<a href=\'javascript:Pop_Up(' + x
                                           + ', ' + escape(l_Title)
                                           + ');\' '
                  + 'class="Blokje" title="' +  p_Title + '">'
                  + '<img class=VerkLeft  title="Klik voor de film" src="Thumbs/' + p_Picture_Left + '">'
                  + p_Title
                  );
  }
  document.write( "<br><br><span class=Tekst>" + p_Text + "</span>" )
  document.write('</a>')
}

function Pop_Up(p_URL, p_Title){
//alert(navigator.appName);
//alert(navigator.appVersion);
//alert(parseFloat(navigator.appVersion));

  document.getElementById("floatLayer").style.display="block";
  document.getElementById("floatTekst").textContent=p_Title;


  if(!FlashDetect.versionAtLeast(9)){
    document.getElementById("floatLayer").innerHTML = "<br>&nbsp;Please install the latest <a  target='_blank' href='http://www.adobe.com/go/getflashplayer/'>Flash player</a>"
                                                    + "<br><br><small>&nbsp;Flash Player installed:" + FlashDetect.major + "." + FlashDetect.minor
                                                    ;
//  document.getElementById("floatTekst").textContent="   Please install the latest Flash player";
  } else {
    Flesh = new SWFObject( p_URL + "&autoplay=1"
                         , "flvvideo", 460, 310, "0"
                         );
    Flesh.write("floatFilm");
  }
}

function Pop_Down(){
  document.getElementById("floatLayer").style.display="none";
}


