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

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 Pop_Up(p_ImgFile, p_Tekst){
//---------------
  var PopWindow

    if( PopWindow != null ){
        try { PopWindow.close() }
        catch(e){}
    }
    var Links =(window.screen.width /2)-(document.body.clientWidth /2)
    var Rechts=(window.screen.height/2)-(document.body.clientHeight/2)

    PopWindow = open( ""
                    , "test"
                    , "toolbar=no"
                    + ",menubar=no"
                    + ",width=580"
                    + ",height=580"
                    + ",resizable=yes"
                    + ",scrollbars=no"
                    + ",status=no"
                    + ",location=no"
                    + ",left = " + Links
                    + ",top = "  + Rechts
                    )
    PopWindow.document.write( '<HTML><head>');
    PopWindow.document.write( '<title>.:. Pyrofoor de Amsterdam .:. Verhuur / Verkoop</title>');
    PopWindow.document.write( '<link rel="stylesheet" type="text/css" href="Pyro4.css">'   );
    PopWindow.document.write( '<link rel="stylesheet" type="text/css" href="Verhuur.css">' );
//  PopWindow.document.write( '<script language=JavaScript src=Verhuur.js><\/script>');
//  PopWindow.document.write( '</head><body class=Pop onload="SizeImg()" onblur=close()>');
    PopWindow.document.write( '</head><body class=Pop onblur="close()">');
//  PopWindow.document.write( '<span class=pyro4_kop>Pyrofoor de Amsterdam</span>');
    PopWindow.document.write( '<center><img class=Slide src="Plaatjes/Ver/' + p_ImgFile +  '" title="Click to close" onClick="javascript:window.close();"'
                            + ' width=550 height=450>');
    if(p_Tekst!='undefined'){ PopWindow.document.write('<div id=tekst><br>' + p_Tekst + '</div>') }
    PopWindow.document.write( '<a href=#close class=close onclick="window.close()">close</a>')
    PopWindow.document.close()
}

function Write_Item( p_Title
                   , p_Picture_Left
                   , p_Picture_Right
                   , p_Text
                   , p_SlideText_Left
                   , p_SlideText_Right
                   )
{
  g_Egg  = ""
  g_temp = p_Title.split(";")
  if(g_temp.length>1){
    p_Title = g_temp[0]
    g_Egg   = g_temp[1]
  }

//document.write( "Computer Technology Documentation Project".link( "http://ctdp.tripod.com/" ))
  p_SlideText_Left = typeof p_SlideText_Left =="undefined"?"<b><center>"+p_Title+"</b></center>":p_SlideText_Left
  p_SlideText_Right= typeof p_SlideText_Right=="undefined"?"<b><center>"+p_Title+"</b></center>":p_SlideText_Right
  document.write('<div class="Blokje">')
  if(g_Egg==""){
    document.write('<div class="Head1">'+p_Title+'</div>' )
  }else{
    document.write( "<div class=FakeLink_unsel"
                  + " onclick=\"Pop_Up( \'" + g_Egg + "\', \'<b><center>"+p_Title+"</b></center>\')\";"
                  + " onmouseover='FakeLink(this);'"
                  + " onmouseout ='UnFakeLink(this);'"
                  + ">" + p_Title + "</div>" )
  }
  if(p_Picture_Left!=""){
    document.write('<img class=VerkLeft  title="Klik voor een vergroting" src="Plaatjes/Ver/Thumbs/'+p_Picture_Left+'"'
                  +' onmouseover="GlowLeft(this);"'
                  +' onmouseout ="UnGlowLeft(this);"'
                  +' onclick=\'Pop_Up("'+p_Picture_Left +'", "'+p_SlideText_Left+'");\' >' )
  }
  if(p_Picture_Right!=""){
    document.write('<img class=VerkRight title="Klik voor een vergroting" src="Plaatjes/Ver/Thumbs/'+p_Picture_Right+'"'
                  +' onmouseover="GlowRight(this);"'
                  +' onmouseout ="UnGlowRight(this);"'
                  +' onclick=\'Pop_Up("'+p_Picture_Right+'", "'+p_SlideText_Right+'");\' >' )
  }
  document.write( "<br>"+p_Text )
  document.write('</div>')
}

function SizeImg(){
  window.resizeBy(0,document.body.scrollHeight - document.body.clientHeight)
}
