var GENdivs = new Array(); 
function spiegelbeeld(){

if (document.body.clientWidth < 1003){ document.body.style.overflowX = "scroll" }

PLAATSspiegelbeeldIn = document.body
DIV_HOLDING_CONTENT  = document.body


count = 0;
for(i=0;i<document.images.length;i++){
SpiegelbeeldHoogte = 50; 

if (document.images[i].className == "reflect"){ 
document.images[i].style.border = "0px"
if (parseInt(document.images[i].height) < SpiegelbeeldHoogte) { SpiegelbeeldHoogte = parseInt(document.images[i].height) }

document.images[i].style.position = "relative"

			newDIV = document.createElement("DIV")
			newDIV.style.width = document.images[i].width
			newDIV.style.height = SpiegelbeeldHoogte+"px"
			newDIV.style.position = "absolute"
			newDIV.style.zIndex = "1"
			newDIV.style.top = (parseInt(document.images[i].offsetTop)+parseInt(document.images[i].height))+"px"
		    newDIV.style.left = parseInt(document.images[i].offsetLeft)+"px"
			newDIV.id = "GENdiv"+i

			flashWIDTH = document.images[i].width
			flashHEIGHT = SpiegelbeeldHoogte+"px"
			flashSRC = "images/spiegelbeeld.swf"
			newDIV.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="'+flashWIDTH+'" height="'+flashHEIGHT+'"><param name="FlashVars" value="source='+document.images[i].src+'&W='+flashWIDTH+'&H='+parseInt(document.images[i].height)+'"><param name="movie" value="'+flashSRC+'"><param name="salign" value="lt"><param name="quality" value="best"><param name="scale" value="noscale"><param name="wmode" value="transparent"><param name="bgcolor" value="#FFFFFF"><param name="allowScriptAccess" value="sameDomain"><embed src="'+flashSRC+'" wmode="transparent" quality="best" FlashVars="source='+document.images[i].src+'&W='+flashWIDTH+'&H='+parseInt(document.images[i].height)+'" scale="noscale" salign="lt" bgcolor="#FFFFFF" allowScriptAccess="sameDomain" width="'+flashWIDTH+'" height="'+flashHEIGHT+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></object>'

			count += 1; GENdivs[count] = i
			PLAATSspiegelbeeldIn.appendChild(newDIV)

			
}




}




//createBORDERS()
}


function set_CONTENT_div_ABSOLUTE(){
	DIV_HOLDING_CONTENT.style.position = "absolute"
	DIV_HOLDING_CONTENT.style.zIndex = 2
}

	
	
function relocate_GENdivs(){
DIV_HOLDING_CONTENT.style.position = "static"

if (count > 0) { for(i=1;i<count+1;i++){ 
document.getElementById("GENdiv"+GENdivs[i]).style.top = (parseInt(document.images[GENdivs[i]].offsetTop)+parseInt(document.images[GENdivs[i]].height))+"px"
document.getElementById("GENdiv"+GENdivs[i]).style.left = parseInt(document.images[GENdivs[i]].offsetLeft)+"px"

if (document.getElementById("GENborder"+GENdivs[i])){
document.getElementById("GENborder"+GENdivs[i]).style.top = (parseInt(document.images[GENdivs[i]].offsetTop)-1)+"px"
document.getElementById("GENborder"+GENdivs[i]).style.left = (parseInt(document.images[GENdivs[i]].offsetLeft)-1)+"px"
}

}
setTimeout("set_CONTENT_div_ABSOLUTE()",10)
}}



function createBORDERS(){
if (count > 0) { for(i=1;i<count+1;i++){ 

newDIV = document.createElement("DIV")
newDIV.id ="GENborder"+GENdivs[i]; 
newDIV.style.position = "absolute"
newDIV.style.left = (parseInt(document.images[GENdivs[i]].offsetLeft)-1)+"px"
newDIV.style.top  = (parseInt(document.images[GENdivs[i]].offsetTop)-1)+"px"
newDIV.style.zIndex = 3
newDIV.innerHTML  = "<div style='border: 1px solid #777777; margin: 0px'><div style='width: "+document.images[GENdivs[i]].width+"; height: "+document.images[GENdivs[i]].height+"; margin: 0px'></div></div>"
PLAATSspiegelbeeldIn.appendChild(newDIV)
}}

set_CONTENT_div_ABSOLUTE()

}





function BIG(FILE,TEKST){
FILE = FILE.replace("`","'"); 
if (document.getElementById("PIC").children) {
document.getElementById("PIC").children[0].src = FILE
} else {
document.getElementById("PIC").childNodes[0].src = FILE
}
document.getElementById("fototekst").innerHTML = TEKST
}

function SETPOS(){
if (document.getElementById("PIC").children) {
W = parseInt(document.getElementById("PIC").children[0].width)
H = parseInt(document.getElementById("PIC").children[0].height)
} else {
W = parseInt(document.getElementById("PIC").childNodes[0].width)
H = parseInt(document.getElementById("PIC").childNodes[0].height)
}
dW = parseInt(document.body.clientWidth)
dH = parseInt(document.body.clientHeight)
ST = document.body.scrollTop

if (!muisX) { muisX = 10 }
if (!muisY) { muisY = 10 }

document.getElementById("PIC").style.left = muisX-(W/2)
document.getElementById("PIC").style.top = (muisY+ST)-(H/2)

if ((parseInt(document.getElementById("PIC").style.left) + W) > (dW-10)) { document.getElementById("PIC").style.left = (dW-W)-10 }
if (parseInt(document.getElementById("PIC").style.left) < 2) { document.getElementById("PIC").style.left = "2px" }
if ((parseInt(document.getElementById("PIC").style.top)+H-ST) > (dH-5)) { document.getElementById("PIC").style.top = ST+((dH-H)-5)+"px" }
if (parseInt(document.getElementById("PIC").style.top) < 2) { document.getElementById("PIC").style.top = 2+"px" }

document.getElementById("fotoW").style.width = W-6
document.getElementById("fotoW").style.top = parseInt(document.getElementById("PIC").style.top)+4
document.getElementById("fotoW").style.left = parseInt(document.getElementById("PIC").style.left)+4

document.getElementById("PIC").style.zIndex = "500"
document.getElementById("fotoW").style.zIndex = "501"

document.getElementById("fototekst").innerHTML = "<p style='font-family: Verdana; font-weight: bold; font-size: 6pt; color: #000000; margin: 2px'>"+document.getElementById("fototekst").innerHTML+"</p>"
document.getElementById("fotoW").style.visibility = "visible"
document.getElementById("PIC").style.visibility = "visible"
}

function DISABLE(){
document.getElementById("PIC").style.zIndex = "-5"
document.getElementById("fotoW").style.zIndex = "-5"
document.getElementById("PIC").style.top = "0px"
document.getElementById("PIC").style.left = "0px"
if (document.getElementById("PIC").children) {
document.getElementById("PIC").children[0].src = ""
} else {
document.getElementById("PIC").childNodes[0].src = ""
}
document.getElementById("PIC").style.visibility = "hidden"
document.getElementById("fotoW").style.visibility = "hidden"
}

