// JavaScript Document
// fie schrijf kleurvlak
function schrijfkleurvlak (vlakunique,vlakkop,vlaktekst) {
document.writeln(" <div id=\""+vlakunique+"\" class=\"cirkel\" onmouseover=\"MM_changeProp('"+vlakunique+"','','style.backgroundColor','#FFE9CD','DIV')\" onmouseout=\"MM_changeProp('"+vlakunique+"','','style.backgroundColor','#EBFAFF','DIV')\">  "); 
document.writeln(" <div class=\"cirkeltekst\">  "); 
document.writeln(" <div class=\"kop\">"+vlakkop+"</div>  "); 
document.writeln(" <p>"+vlaktekst+"</p>"); 
document.writeln(" </div> "); 
document.writeln(" </div> ");
}
// fie schrijf 1 uit 4 kleurvlakken plus cameraatje
function schrijf1uit4 (unique,kop,tekst,foto,nr) {
document.writeln(" <div id=\""+unique+"\" class=\"cirkel\" onMouseOver=\"MM_changeProp('"+unique+"','','style.backgroundColor','#FFE9CD','DIV')\" onmouseout=\"MM_changeProp('"+unique+"','','style.backgroundColor','#EBFAFF','DIV')\"> ");
document.writeln(" <div class=\"cirkeltekst\"> "); 
document.writeln(" <div class=\"camera_icon\"><img src=\"wordpress/wp-content/themes/stitched2009-10/img/camera-icoon.gif\" width=\"31\" height=\"31\" onMouseOver=\"changeSrc('"+foto+"')\"/></div> "); 
document.writeln(" <div class=\"kop\">"+kop+"</div> "); 
document.writeln(" <p>"+tekst+"</p> "); 
document.writeln(" </div> "); 
document.writeln(" </div> ");
}
function schrijffotovlak () {
document.writeln(" <div class=\"cirkelfoto\"><p> "); 
document.writeln(" <img id=\"foto10\" src=\"wordpress/wp-content/themes/stitched2009-10/img/testfoto04.png\" name=\"foto10\" width=\"229\" height=\"143\"/></p></div> ");	
}
function changeSrc(foto){   
if (document.getElementById("foto10").src) {
	 	 } else { 
	alert ("src fout") }
	
	document.getElementById("foto10").src=foto;
	}

// fie schrijf 4 kleurvlakken plus cameraatje
function schrijf4kleurvlak () {
// eerste	twee

schrijf1uit4 (vlakunique1,vlakkop1,vlaktekst1,foto1,1);
schrijf1uit4 (vlakunique2,vlakkop2,vlaktekst2,foto2,2);
// fotovlak
schrijffotovlak ();
//laatste 2
schrijf1uit4 (vlakunique3,vlakkop3,vlaktekst3,foto3,3);
schrijf1uit4 (vlakunique4,vlakkop4,vlaktekst4,foto4,4);
}


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
