//-------------------------------------------------------------
// vanaf hier kunnen waardes ingesteld worden
//------------------------------------------------------------- 

var baseurl = "http://www.kleijnprodukties.nl/"

var imgurl = baseurl+"images/"
var imgurl_actueel = imgurl+"actueel/"
var fullies = new Array(
  imgurl+'bands01_L.jpg',
  imgurl+'bands02_L.jpg',
  imgurl+'bands03_L.jpg',
  imgurl+'bands04_L.jpg',
  imgurl+'bands06_L.jpg',
  imgurl+'bands08_L.jpg')
var thumbs = new Array(
  imgurl+'bands01.jpg',
  imgurl+'bands02.jpg',
  imgurl+'bands03.jpg',
  imgurl+'bands04.jpg',
  imgurl+'bands06.jpg',
  imgurl+'bands08.jpg')

//-------------------------------------------------------------

var old = 0
var current = 0

function init() {
  if (!document.getElementById('thumb')) {
    return
	} else {
  	while (current == old) {
  		current = Math.floor(Math.random()*thumbs.length)
  	}
  	old = current
    document.getElementById('thumb').width = 200
    document.getElementById('thumb').height = 131
  	document.getElementById('thumb').src = thumbs[current]
  	setTimeout('init()',4000)
  }
}

function preview(modus,plek) {
  if (modus=="loop") {
    zoom=window.open ("","zoom1","toolbar=no,menubar=no,location=no,directories=no,status=no,copyhistory=no,scrollbars=no,resizable=no,width=110,height=110,left=40,screenX=40,top=40,screenY=40")
    zoom.document.write ("<html><head>\n<title>Referenties</title>\n</head>\n<body class=\"preview\" style=\"background-color:black; background-image:url("+imgurl+"wait.gif); background-position:center center; background-repeat:no-repeat; overflow:hidden; margin:10px 10px 10px 10px\" onload=\"window.resizeTo((document.getElementById('fully').width + 30),(document.getElementById('fully').height + 70))\">\n")
    zoom.document.write ("<div style=\"background-image:url("+imgurl+"wait.gif); background-position:12px 12px; background-repeat:no-repeat; margin:0px 0px 0px 0px\">\n")
    zoom.document.write ("<img src=\""+fullies[current]+"\" id=\"fully\" style=\"margin:0px 0px 0px 0px\" alt=\"\">\n")
    zoom.document.write ("</div>\n</body>\n</html>\n")
    zoom.document.close ()
    zoom.focus()
  	self.name="main"
  } else {
    if (plek=="content") {
      zoom=window.open ("","zoom1","toolbar=no,menubar=no,location=no,directories=no,status=no,copyhistory=no,scrollbars=no,resizable=no,width=110,height=110,left=40,screenX=40,top=40,screenY=40")
      zoom.document.write ("<html><head>\n<title>Referenties</title>\n</head>\n<body class=\"preview\" style=\"background-color:black; background-image:url("+imgurl+"images/wait.gif); background-position:center center; background-repeat:no-repeat; overflow:hidden; margin:10px 10px 10px 10px\" onload=\"window.resizeTo((document.getElementById('fully').width + 30),(document.getElementById('fully').height + 70))\">\n")
      zoom.document.write ("<div style=\"background-image:url("+imgurl+"wait.gif); background-position:12px 12px; background-repeat:no-repeat; margin:0px 0px 0px 0px\">\n")
      zoom.document.write ("<img src=\""+imgurl+modus+"\" id=\"fully\" style=\"margin:0px 0px 0px 0px\" alt=\"\">\n")
      zoom.document.write ("</div>\n</body>\n</html>\n")
      zoom.document.close ()
      zoom.focus()
    	self.name="main"
    } else {
      zoom=window.open ("","zoom1","toolbar=no,menubar=no,location=no,directories=no,status=no,copyhistory=no,scrollbars=no,resizable=no,width=110,height=110,left=40,screenX=40,top=40,screenY=40")
      zoom.document.write ("<html><head>\n<title>Referenties</title>\n</head>\n<body class=\"preview\" style=\"background-color:black; background-image:url("+imgurl+"wait.gif); background-position:center center; background-repeat:no-repeat; overflow:hidden; margin:10px 10px 10px 10px\" onload=\"window.resizeTo((document.getElementById('fully').width + 30),(document.getElementById('fully').height + 70))\">\n")
      zoom.document.write ("<div style=\"background-image:url("+imgurl+"wait.gif); background-position:12px 12px; background-repeat:no-repeat; margin:0px 0px 0px 0px\">\n")
      zoom.document.write ("<img src=\""+imgurl_actueel+modus+"\" id=\"fully\" style=\"margin:0px 0px 0px 0px\" alt=\"\">\n")
      zoom.document.write ("</div>\n</body>\n</html>\n")
      zoom.document.close ()
      zoom.focus()
    	self.name="main"
    }
  } 
}

function openvenster(imgnaam,imgpad,imgomschr,imggrootte,x,y,posx,posy) {
  zoom=window.open ("","zoom1","toolbar=no,menubar=no,location=no,directories=no,status=no,copyhistory=no,scrollbars=no,resizable=no,width="+x+",height="+y+",left="+posx+",top="+posy+"")
  zoom.document.write ("<html>\n<head>\n<title>"+imgnaam+"</title>\n</head>\n<body class='preview' style='background-color:black'>\n")
  zoom.document.write ("<img src='"+imgpad+"' style='margin:20px 20px 20px 30px' alt=''>\n")
  zoom.document.write ("</body>\n</html>")
  zoom.document.close ()
	self.name="main"
}

function openwin(url) {
    OpenWindow = window.open(""+baseurl+url+"", "newwin", "height=600,width=640,left=200,top=267,toolbar=yes,scrollbars=yes,menubar=yes,resizable=yes")
    self.name = "main"
}

function openpdf(url) {
    OpenWindow = window.open(""+baseurl+"files/"+url+"", "newwin", "height=600,width=600,left=200,top=267,toolbar=no,scrollbars=no,menubar=no,resizable=yes")
    self.name = "main"
}

function gohome() {
    parent.document.location.href=''+baseurl+'index.php';
}

function load_create(subject) {
    if ( subject == 'artikel' ) {
        parent.leftlow.location.href=''+baseurl+'editing/shared/blank.php'
        parent.lefthigh.location.href=''+baseurl+'editing/news/set.php?start=1'
        parent.preview.location.href=''+baseurl+'editing/shared/blank.php'
    } else 
    if ( subject == 'select' ) { 
        parent.leftlow.location.href=''+baseurl+'editing/shared/blank.php'
    } else 
    if ( subject == 'bladeren' ) { 
        parent.lefthigh.location.href=''+baseurl+'editing/news/select.php'
        parent.leftlow.location.href=''+baseurl+'editing/shared/blank.php'
    } else 
    if ( subject == 'end_new' ) { 
        parent.lefthigh.location.href=''+baseurl+'editing/news/select.php'
        parent.lefthigh.location.href=''+baseurl+'editing/news/set.php?start=-1'
        parent.leftlow.location.href=''+baseurl+'editing/shared/blank.php'
    }
}
function andback() {
    parent.leftlow.location.href=''+baseurl+'editing/news/artikel_HOWTO.php'
    parent.preview.location.href=''+baseurl+'editing/shared/blank.php'
    parent.lefthigh.location.href=''+baseurl+'editing/shared/logo.php'
}

function meel(a,b,stijl) {
  var regel = "<a href=\"mailto:"+ a +"@kleijnprodukties.nl\" class=\""+ stijl +"\">"+ b +"</a>";
  return regel;
}

