/* SVN $Id: main.js 96 2009-05-08 14:09:24Z jeroen $ */
/* SVN $URL: file:///T:/SOURCE_SVN/Start_Website/httpdocs/js/main.js $ */

/*############################################################################*/
/*# Initialize */

function Main_Initialize()
{
  // init functions here
}

if ('function' == typeof WHITE_AddBodyLoadFunction)
{
  WHITE_AddBodyLoadFunction(Main_Initialize);
}

/*# /Initialize */
/*############################################################################*/
//function jkpopimage(imgpath, popwidth, popheight, textdescription){
var windowtitle="Puros Indios"  // titel
var popbackground="#000000" // achtergrond kleur
var textcolor = "white";
var textsize = "11px";

function detectexist(obj){
return (typeof obj !="undefined")
}

function mypopup(imgpath, popwidth, popheight, beschrijving){
  popwidth = popwidth + 15; // voor scrollbar
  popheight = popheight + 21; // voor scrollbar

  imgpath = imgpath.replace('/images', '/nl/images/website');
  imgpath = imgpath.replace(' ', '-');
  imgpath = imgpath.toLowerCase();
  
  function getpos(){
    leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
    toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
    if (window.opera){
      leftpos-=screenLeft
      toppos-=screenTop
    }
  }

  getpos()
  var winattributes='width='+popwidth+',height='+popheight+',resizable=yes, scrollbars=yes, left='+leftpos+',top='+toppos
  var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
  if (typeof popupwindow=="undefined" || popupwindow.closed)
    popupwindow=window.open("","",winattributes)
  else{
    popupwindow.resizeTo(popwidth, popheight+30)
  }
  popupwindow.document.open()
  popupwindow.document.write('<html><title>'+windowtitle+'</title>')
  popupwindow.document.write('<body '+bodyattribute+' style="color: '+textcolor+'; font-size:'+textsize+';  font-family: Verdana, Arial, Helvetica;"><img src="'+imgpath+'" style="margin-bottom: 0.5em;"><br>'+beschrijving+'</body>')
  popupwindow.document.write('</html>')
  popupwindow.document.close()
  popupwindow.focus()
}
