// Begin -->
// Vita.js Basis javascriptbibliotheek.
// Daarom verplicht bij elke pagina en als eerste aangeroepen.
// Alle scripts eigendom van Faase.
// Gebruik zonder schriftelijke toestemming is niet toegestaan.

// -------------------------------------------------------
// Algemene variabelen:
// Je kunt deze in de pagina een andere waarde geven.

var apo = '"';				 // Apostrophe.
var linknum = 1;             // Voor unieke namen bij folder plaatjes.
                             // Zie function PrintTekst.
var stijl = 0;               // Verschillende stijlen album enzo.
                             // 0 = standaard,
                             // 1 = ouderwets.
var Simgs = new Array();     // Array met plaatjes voor slideshows.
var d = "duim/_";	         // Voor thumbnails in apart mapje.

var klas = "";				 // Standaard of 'oude' stijl.
var datklas = "d";
var gebdiv = 0;              // Is dit 1 dan divs gebruiken.
                             // Werkt niet in ie.

// ---------------------------- Waar is de root?

var basis = "http://faase.nl/";
 drv = "d:";
 docpl = document.location+" ";
 docpl = docpl.toLowerCase();
 
 if (docpl.indexOf("172.16") > 0) basis = "http://172.16.19.254/";  // Portia intern bij ip-nummer.
 if (docpl.indexOf("rocmn.nl") > 0) basis = "http://bisschop.rocmn.nl/";
 if (docpl.indexOf("paal43") > 0) basis = "http://opaal43.mooo.com/";

 if (docpl.indexOf("ile:///") > 0) drv = docpl.substring(8,9);
         // Op de 8e plaats staat de drive letter.
         // Let op: substring(vanaf plaatsnr, tot plaatsnr)

 if (docpl.indexOf("webroot") > 0) basis = "file:///"+drv+":/WebRoot/";

// -----------------------------------------------
var plsub = basis+"plaat/";  // Plaatjes directory.

// ----------------------------------------------- Stijlen.
var arachter = [
  "BACKGROUND="+plsub+"bladkaalgeel.jpg",        // Standaard.
  "BACKGROUND="+plsub+"bladblack.jpg"];          // Ouderwets.
var arblad = [
  plsub+"bladgeel.jpg",                          // Standaard.
  plsub+"bbladblack.jpg"];                       // Ouderwets.
var arletter = ["", " class=oud"];
var ardatum = ["d", "doud"];

var achtergrond = arachter[0]
                             // Achtergrond pop-up foto-window.

// -----------------------------------------------
var jssub = basis+"java/";   // Javascripts directory.
var csstijl = basis+"java/vita.css";
                             // Style sheet voor nieuw te openen vensters.
var sPopupWin = null;        // Reusable popup window.

var bpl = [
   basis+"plaat/bopen.gif",
   basis+"plaat/bterug.gif",
   basis+"plaat/bverder.gif",
   basis+"plaat/bclsd.gif",
   basis+"plaat/bopen1.gif",
   basis+"plaat/bopenr.gif",
   basis+"plaat/bopenl.gif"];  // Plaatjes voor blader-boekje.


// -----------------------------------------------------------------
// Algemene funkties.
// -----------------------------------------------------------------

function empty(param)        // "" geven als parameter niet ingevuld is.
{if (typeof param == 'undefined')  return ""
 else return param;};

// -----------------------------------------------------------------
function KnopIn(img_name,img_src)  {document[img_name].src=img_src;}
function KnopLos(img_name,img_src) {document[img_name].src=img_src;}

// -----------------------------------------------------------------
function display(str)
 {window.status = str;       // Tekst op de onderbalk.
  return true;}


// -----------------------------------------------------------------
function pagnum()
{
 var nummer = parseInt(location.search.substring(1,100));
                                       // Nummer uit pagina aanroep halen
                                       // (b.v. 2 uit 77wat.htm?2)
 if (isNaN(nummer)) nummer = 1;        // Niets mee, dan nummer 1
 return nummer;                        // nummer teruggeven.
}


// ==============================================================
// Plaatje, dat er niet is, vervangen.
// ==============================================================
function ImgOnb(imageObj)
{imageObj.src = basis+"plaat/ontbreekt.jpg";}


// -----------------------------------------------------------------
function Streep(procent)               // Streep, default volle breedte.
{if (typeof procent == 'undefined') var procent = "100";
 document.write("<HR WIDTH=", procent, "%>");};


// ==============================================================
// Hoofdletter van eerste letter maken.
// ==============================================================
function Capital(tekst)
{
 while(''+tekst.charAt(0)==' ') tekst=tekst.substring(1,tekst.length);
                     ;                    // Spaties voorop weghalen.
 return tekst.substring(0,1).toUpperCase()+tekst.substring(1, tekst.length);
}	  

// ==============================================================
// Twee kolommen tekst over de volle breedte.
// ==============================================================
function Kolom2(a,b, nostreep)
{
 // Twee gelijke kolommen met tekst.
 nostreep = empty(nostreep);
 // Geef je iets als derde mee, dan komt er geen streep onder.

 document.write("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4 WIDTH=100%>");
 document.write("<TR><TD WIDTH=49% VALIGN=top><SPAN>"+a+"</TD>");
 document.write("    <TD>&nbsp;</TD>");
 document.write("    <TD WIDTH=49% VALIGN=top><SPAN>"+b+"</TD></TR>");
 document.write("</TABLE>");

 if (nostreep == "") Streep("50");
};


// ==============================================================
// Maken en neerzetten van de standaard paginakop.
// ==============================================================
function Kop(jaar, tekst, knoppen, achter, zoekpag)
{
 achter = empty(achter);          // Niet meegegeven dan "".
 jaar = empty(jaar);
 tekst = empty(tekst);
 zoekpag = empty(zoekpag);

 if (typeof knoppen == 'undefined') knoppen = nav;
                   // nav is standaard array op veel bladzijden.
                   // Met vorige en volgende bladzijde en index.

 wie = "";
 docpl = document.location+" ";
 docpl = docpl.toLowerCase();
 if (docpl.indexOf("album") > 0) zoekpag =  basis+"album/index.htm";
                                  // Zoekpagina. Bij klikken op de
                                  // voorste koptekst (jaar) daarnaar toe.
 if (docpl.indexOf("falco") > 0) wie = "Falco";								  
 if (docpl.indexOf("koray") > 0) wie = "Koray";
 if (docpl.indexOf("anil") > 0)  wie = "Anil";
 if (docpl.indexOf("sevim") > 0) wie = "Sevim";
 if (docpl.indexOf("frans") > 0) wie = "Frans";
								  
 if ((jaar.indexOf("<") == -1) && (jaar.indexOf(">") == -1))
     document.title = wie+" - "+jaar.replace(/#/g," ")+" "+tekst; 
	 // titel aanpassen. Als er geen html in staat.
     // global function om # te vervangen door spaties. (Bij jaar#dag).
 
 document.writeln("</HEAD>\n");

 // --------------------------------- Achtergrond.
 b1 = " BACKGROUND="+arblad[stijl];

 if ((achter != "") && (knoppen == "Sluit")) b1 = " BACKGROUND='"+plsub+"bladkaal.jpg'";
 if (achter != "") b1 = " BACKGROUND='"+achter+"'";
 if (knoppen == "Sluit")  b1 += " OnBlur='window.close();'";
 if (knoppen == "Dicht")  knoppen = "Sluit";
                          // Dicht is hetzelfde als Sluit, alleen bijft het
                          // venster open bij verlies van focus.
                          // Wordt gebruikt bij muziek, waar player open gaat.

 document.write("<BODY"+b1+">");
// -----------------------------------------------

 document.write("<DIV id="+apo+"overDiv"+apo+" STYLE="+apo+"position:absolute; VISIBILITY:hidden;z-index:1000;"+apo+"></DIV>");
// Dit is het deel van Overlib, dat direct na <body> moet komen.

// -----------------------------------------------
 if (gebdiv == 1) 
    {
	 var userAgent = navigator.userAgent.toLowerCase();
     if (userAgent.indexOf("msie") != -1)
		 document.write("Haal een echte browser! Firefox, Opera, Safari, iCab, Konqueror. Alles behalve IE.");
   
     shoogte = window.innerHeight-144;
     document.write("<STYLE>#plaatje img {height: "+shoogte+"px;</STYLE>");
	 // plaatje zit in sysfoto2.css		
	 document.write("<DIV id='pagkop'>");
	};
 document.write('<CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=1 WIDTH=100%><TR>');

 var hek = jaar.indexOf("#");      // In de datum jaar#datum
                                   // Dan wordt het datumdeel kleiner
                                   // (1 stap groter dan default) geschreven.

 lkleur = "class=d";
 if (stijl == 1) lkleur = " class=dred";
 
 rest = "";
 if (hek > 0)
    {
     rest = jaar.substring(hek+1, 100);
     jaar = jaar.substring(0, hek);
	};

if (zoekpag != "")				   // Dit zit bij albumpagina's. Die hebben een zoekpag.
   document.write("<TD><A HREF='"+zoekpag+"?zoekveld="+jaar+"'><SPAN"+lkleur+"><FONT SIZE=+3><B>"+jaar+" </B></FONT><FONT SIZE=+1>"+rest+"</FONT></A></TD>");
	                               // Naar zoekpagina met jaar als zoekveld.
                                   // Dus alles van dat jaar laten zien.
else							   // Pagina's van website hebben geen zoekpag.
   document.write("<TD><FONT SIZE=+3 "+lkleur+"><B>"+jaar+" </B></FONT><FONT SIZE=+1>"+rest+"</TD>");

 lkleur = "";
 if (stijl == 1) lkleur = " class=wit";
 document.write('<TD ALIGN=middle><FONT SIZE=+3 '+lkleur+'><B>'+tekst+'</B></FONT></TD>');

 document.write("<TD ALIGN=right>");

 if ((knoppen == "Terug") || (knoppen == "Sluit"))  blader(knoppen)
                                  // Terug of Sluit.
 else
    {
     r = knoppen.length / 4;
     document.write("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR>");
     for (bk=0;bk<=r-1;bk++)
       {
        document.write('<TD ALIGN=middle>');
        blader(knoppen[0+bk*4], [knoppen[1+bk*4], knoppen[2+bk*4], knoppen[3+bk*4]]);
        document.writeln("</TD>");
       }
     document.writeln("</TR></TABLE>");
    };

 document.writeln("</TD></TR></TABLE><HR>");
 if (gebdiv == 1) document.write("</DIV><DIV id='paginhoud'>");
}


// ==============================================================
// Boekje met voor- en achteruit bladeren en dichtdoen.
// bladz = Array(terug, index, vooruit).
// framenaam om ander frame of _top te geven voor alle opties.
// Of per optie 'bladzijde&framenaam' geven.
// Soms kan je geen history.back geven omdat men naar een andere bladzij
// kan zijn gegaan vanuit de bladzij waar dit op staat. Geef dan drie maal
// hetzelfde op in de array bladz.
// ==============================================================
function blader(naam, bladz, framenaam)
{
 if (typeof framenaam == 'undefined') framenaam = "_self";
	   
 if ((naam == "Terug") || (naam == "T."))
 // De punt wordt door navblader toegevoegd om onderscheid tussen het boekje
 // boven en beneden te kunnen maken. Het splitsen van een array toegepast
 // op een string levert losse letters. Daardoor komt uit navblader T.
 {
  jt = "javascript:window.history.back()";
  document.write  ("<A HREF='"+jt+"' TARGET="+framenaam+" ");
  document.write  ("OnMouseOver="+apo+"KnopIn('"+naam+"', '"+bpl[3]+"'); return display('"+naam+"')"+apo);
  document.writeln("OnMouseOut="+apo+"KnopLos('"+naam+"', '"+bpl[4]+"'); return true"+apo+">");

  document.write  ("<IMG NAME='"+naam+"' SRC='"+bpl[4]+"' ");
  document.writeln("ALT='"+naam+"' BORDER=0></A>");
 }
 else

 if (naam == "Sluit")
 {
  jt = "javascript:window.close()";
  document.write("<A HREF='"+jt+"' TARGET="+framenaam+" ");
  document.write("OnMouseOver="+apo+"KnopIn('"+naam+"', '"+bpl[3]+"'); return display('"+naam+"')"+apo);
  document.write("OnMouseOut="+apo+"KnopLos('"+naam+"', '"+bpl[4]+"'); return true"+apo+">");

  document.write("<IMG NAME='"+naam+"' SRC='"+bpl[4]+"' ");
  document.write("ALT='"+naam+"' BORDER=0></A>");
 }

 else
 { 
  if (typeof bladz == 'undefined') bladz = [nav[1], nav[2], nav[3]];
  if (typeof naam == 'undefined') naam = nav[0]; 
                   // nav is standaard array op veel bladzijden.
                   // Met vorige en volgende bladzijde en index.

  bp = bpl[0];
  aa = bpl[1];

// --------- Kijken of aparte frames meegegeven per optie ---------  
  frblz = [framenaam, framenaam, framenaam];
  fpl = bladz[0].indexOf("$")				  // $ als scheidingsteken tussen 
  if (fpl > -1)       						  // bestand en framenaam.
     {
	  dleen = bladz[0].substring(0,(fpl));
	  frblz[0] = bladz[0].substring((fpl+1), 100);
	  bladz[0] = dleen;
	 };

  fpl = bladz[1].indexOf("$")  
  if (fpl > -1) 
     {
	  dleen = bladz[1].substring(0,(fpl));
	  frblz[1] = bladz[1].substring((fpl+1), 100);
	  bladz[1] = dleen;
	 };
	 
  fpl = bladz[2].indexOf("$")
  if (fpl > -1) 
     {
	  dleen = bladz[2].substring(0,(fpl));
	  frblz[2] = bladz[2].substring((fpl+1), 100);
	  bladz[2] = dleen;
	 };
//-------------------------------------------------------	 
	  
  wn = ((naam == "Index") || (naam == "Index."))?"":naam;

  s1 = "<IMG SRC="+basis+"plaat/pijl_l.gif>"+wn;                // Terug
  s2 = "<CENTER><IMG SRC="+basis+"plaat/pijl_u.gif><BR>"+wn;    // Omhoog
  s3 = "<IMG SRC="+basis+"plaat/pijl_r.gif ALIGN=right>"+wn;    // Vooruit

  if (bladz[0] == bladz[1]) {aa = bpl[3]; bp = bpl[5]; s1 = s2};
                   // Terug en Dicht gelijk dan alletwee boekje dicht.
                   // En alleen pijl rechts bij open boekje.
  ac = bpl[2];
  if (bladz[1] == bladz[2]) {ac = bpl[3]; bp = bpl[6]; s3 = s2};
                   // Dicht en Verder gelijk dan alletwee boekje dicht.
                   // En alleen pijl links bij open boekje.

  bp = ((bladz[0] == bladz[1]) && (bladz[1] == bladz[2]))?bpl[4]:bp;
                   // Alle drie hetzelfde, dan boekje zonder pijlen.

  snterug = "return overlib('"+s1+"', WIDTH, 20, LEFT)";
  snindex = "return overlib('"+s2+"', WIDTH, 20, LEFT)";
  snvooruit = "return overlib('"+s3+"', WIDTH, 20, LEFT)";


  muisweg = "onMouseOut="+apo+"nd(); KnopLos('"+naam+"', '"+bp+"'); return true"+apo+">";

  document.write  ("<IMG NAME='"+naam+"' SRC='"+bp+"' ");
  document.writeln("USEMAP='#"+naam+"map' BORDER=0></A>");

  document.writeln("<MAP NAME='"+naam+"map'>");
  // Terug bladeren.
  document.writeln("<AREA SHAPE='polygon' COORDS='0,20,32,20,32,51,0,51'");
  document.writeln(" HREF='"+bladz[0]+"' TARGET="+frblz[0]+" ");
  document.writeln(" OnMouseOver="+apo+"KnopIn('"+naam+"', '"+aa+"'); "+snterug+apo);
  document.writeln(muisweg);
  // Boek dicht.
  document.writeln("<AREA SHAPE='polygon' COORDS='0,0,64,0,64,19,0,19'");
  document.writeln(" HREF='"+bladz[1]+"' TARGET="+frblz[1]+" ");
  document.writeln(" OnMouseOver="+apo+"KnopIn('"+naam+"', '"+bpl[3]+"'); "+snindex+apo);
  document.writeln(muisweg);
  // Verder bladeren.
  document.writeln("<AREA SHAPE='polygon' COORDS='32,20,64,20,64,51,32,51'");
  document.writeln(" HREF='"+bladz[2]+"' TARGET="+frblz[2]+" ");
  document.writeln(" OnMouseOver="+apo+"KnopIn('"+naam+"', '"+ac+"'); "+snvooruit+apo);
  document.writeln(muisweg);
//  document.writeln("<AREA SHAPE='default' nohref>");
  document.writeln("</MAP>");
 };
};


// ==============================================================
// Boekje onderaan. Om niet naar boven te hoeven gaan op de
// bladzijde. Zie function blader.
// Aanroep: blader(zelfde array als bovenin gebruikt wordt);
// blzs is een array met [naam, terug, index, vooruit];
// otekst is fakultatief. Tekst, die in het midden wordt neergezet.
// ==============================================================
function navblader(blzs, otekst)
{
 if (typeof blzs == 'undefined') blzs = nav;
                   // nav is standaard array op veel bladzijden.
                   // Met vorige en volgende bladzijde en index.
 if (typeof otekst == 'undefined') otekst = "";
 				   
 if (gebdiv == 1) document.write("</DIV><DIV id='onderrand'>");				   
 document.write("<HR><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%>");

 document.write("<TR><TD><SPAN><A HREF='javascript:window.print()'>");
 document.write("<IMG SRC='"+basis+"plaat/print.gif' BORDER=0></A></TD>");
  
 if (otekst.indexOf("mp3") > 0) 
    {
 	 document.write("<TD ALIGN=middle>");
	 Regel(["MP3*"+otekst+"***1*1"]);
	 document.write("</TD>");
	}
 else
	document.write("<TD ALIGN=middle>"+otekst+"</TD>");
 
 document.write("<TD ALIGN=right>");
 blader(blzs[0]+".", blzs.slice(1,4));
                   // De punt, omdat anders boven en onder dezelfde naam in
                   // de image-map gebruikt wordt.
 document.write("</TD></TR></TABLE>");
 if (gebdiv == 1) document.write("</DIV>");
};


// ==============================================================
// Neerzetten en maken van een plaatjes-window
// Dit wordt aangeroepen als er op een foto in het album geklikt wordt.
// Opent een nieuw venster met de foto in het midden.
// Wordt ook door andere funkties gebruikt.
// ==============================================================
function plaat(pic, tekst, datum)
{
 datum = empty(datum);
 tekst = empty(tekst);       // Deze funktie wordt ook rechtstreeks aangeroepen.
                             // Daarom herhaling kontrole op lege parameters.
 tekst = tekst.replace(/_/g," ");
                             // _ vervangen door spaties. Soms nodig ivm 
							 // gegenereerde html-pagina's.
 							 
 sbreedte = screen.width - 10;
 shoogte = screen.height - 50;
 phoogte = shoogte - 100;     // Hoogte plaatje in popup.
 
 sstuur = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=" + sbreedte +",height=" + shoogte  +",top=0,left=0";

 var win = window.open("", "win", sstuur);
      with (win.document) {
    open("text/html", "replace");
    writeln("<HTML><HEAD><TITLE>"+datum+" "+tekst+"</TITLE>");
    writeln("<SCRIPT LANGUAGE=JavaScript SRC='"+basis+"java/vita.js'></SCRIPT>");
    writeln("<LINK REL=stylesheet HREF='"+csstijl+"' TYPE='text/css'>");
	
    pstijl = "<STYLE>BODY {margin-left: 3px; margin-right: 3px; margin-top: 3px;}";	
	
    if ((pic.indexOf("mail.gif") > 0) ||
        (pic.indexOf("dagboek.gif") > 0) ||
        (pic.indexOf("histor.gif") > 0) ||
        (pic.indexOf("fade.gif") > 0))
		{
         pstijl = "<STYLE>BODY {margin-left: 100px; margin-right: 30px; margin-top: 5px;}";
                                  // Geen foto, maar (voornamelijk) tekst, dan
                                  // iets meer kantlijn.
 		 shoogte = 100;
 		};
								  
    pstijl += "#tekstlayer {position: absolute;top: 0px;left: 0px;}";	
	if (stijl == 0) pstijl += "background-color:#ffffff; filter:alpha(opacity=40);-moz-opacity:0.4;opacity: 0.4;";
    pstijl += "</STYLE>";

    writeln(pstijl);
	
    writeln("</HEAD>");

    writeln("<BODY "+arachter[stijl]+" OnBlur='self.close();' OnClick='self.close()'>");
//    writeln("<BODY "+arachter[stijl]+">");
    writeln("<CENTER>");

	// Uitzoeken waar het plaatjes staat. Volledige plaats.
	// Niet doen als het al eens gedaan is.
	vooraf = "";
    if ((pic.indexOf("file:") == -1) && (pic.indexOf("http:") == -1)) vooraf = subdirzoek();
	
    writeln("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 WIDTH=100% HEIGHT=100%>");
    writeln("<TR><TD ALIGN=middle VALIGN=middle>");
    writeln("<IMG SRC="+apo+vooraf+pic+apo+" HEIGHT="+(shoogte-100)+" z-index: 0;>");	
    writeln("</TD></TR>");

    var klas = arletter[stijl];
    var datklas = ardatum[stijl]; // de variabele 'achtergrond' kan op zwart gezet
                                  // zijn (alles met black erin).
                                  // Dan letters wit en datum rood.
    write("</TD></TR>");
    write("</TABLE>");

	ttekst = (datum != "") ?("<FONT SIZE=+1><SPAN class="+datklas+"><I>"+datum+"</I>&nbsp;&nbsp;"):"";
	ttekst += "<SPAN"+klas+">"+tekst;

	write("<div id='tekstlayer'>");
	write("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 WIDTH="+(sbreedte-20)+">");
	write("<TR><TD>"+ttekst+"</TD>");
	
    write("<TD ALIGN=right VALIGN=top><FONT COLOR=gray SIZE=-1>");
	write("<A HREF=#dummy onClick="+apo+"javascript:window.print(); return false;"+apo+">");
                                        // Door return false geen extra server aanroep.
    write(pic+"</a></TD></TR>");
	write("</TABLE></DIV>");
    write("</BODY></HTML>");
    close();}
}


// ======================================================
// Neerzetten van een object Foto.
// ======================================================
function PrintFoto()
{
 var ondertekst = "";        // Tekst op statusbalk onderaan.
 var ftekst = this.tekst;    // Tekst op albumbladzijde.
 var gif = "F";
 var tdone = "F";            // Of de tekst er al staat?

 // ---------------------------------------------------------
 // Is er een aparte thumbnail? this.plaat begint dan met _
 // Daarvoor kan nog de subdir staan, bv: /map/_plaatje.jpg.
 // IndexOf geeft -1 als teken er niet in staat.
 // ---------------------------------------------------------
 isduim = this.plaat.indexOf("_");
 duimpje = this.plaat;
 this.plaat = DuimWerk(this.plaat);	
  
 if (this.tekst2.length > 0) ftekst += " >>";
                                 // Aangeven, dat er meer tekst is.
 if ((this.plaat.indexOf(".gif") > 0) || (this.plaat.indexOf(".png")) > 0) gif = "T";
                                 // Is het een gif- of png plaatje?
								 // Die krijgen geen schaduw ivm transparante ondergrond.

 rij = " "+this.uitlijn;         // VALIGN, ROWSPAN en COLSPAN en zo.

 document.write("<TD"+rij+"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2><TR>");

 // Tekstcel rechts van het plaatje.
 if (this.zijde.substring(0,2) == "re")
    {
     ft = new Tekst(this.datum, ftekst, this.uitlijn, this.zijde, this.link, "", this.pw);
     ft.PrintTekst();
     this.uitlijn = " VALIGN=bottom";  // Plaatje ook naar onderen.
     tdone = "T";
    };

 // Cel met de foto ---------------------------------------
 document.write("<TD", this.uitlijn, " ALIGN=middle>");

 if (this.tekst.length > 0) ondertekst = ftekst;

 document.write("<A HREF=", apo,
    "javascript:plaat('", this.plaat,
    "', '", this.tekst, this.tekst2,
    "', '", this.datum,
    "')", apo,
    "OnMouseOver=", apo, "return display('", ondertekst, "')", apo,
    "OnMouseOut=", apo, "return display('')", apo, ">");

 if (isduim > -1)
    { 
     document.write("<IMG SRC='", duimpje, "' OnError='ImgOnb(this)' ")
	 if (gif == "F") document.write("class='corner ishadow50 iradius5'");
	 // Duimnageltjes gewoon hun eigen grootte laten houden.
	 // Maar geen randjes voor gif of png.
	}
 else
    if (gif == "T")
       document.write("<IMG SRC='", this.plaat, "' HEIGHT=", this.hoogte) 
    else
       document.write("<IMG SRC='", this.plaat, "' HEIGHT=", this.hoogte, " class='corner ishadow50'");

 if (gif == "T") document.write(" BORDER=0 ");
 document.write("></A>");
 document.write("</TD>");

 // --------------------------------------------------------

 // Datum en tekst links of onder de foto.

 if (tdone == "F")
    {
     if (this.zijde == "onder") document.write("</TR><TR>");
     ft = new Tekst(this.datum, ftekst, this.uitlijn, this.zijde, this.link, "", this.pw);
     ft.PrintTekst();
    };

 document.write("</TR></TABLE></TD>");
};


// ==========================================================
// DuimWerk
// ==========================================================

function DuimWerk(dplaat)
{
 isduim = dplaat.indexOf("_");
 if (isduim > -1)
    {
                                  // _ kan ergens in het midden staan.
     plen = dplaat.length;        // Subdir vermeldingen er voor.
     dplaat = dplaat.substring(0, isduim)+dplaat.substring(isduim+1, plen);

     induim = dplaat.indexOf("duim/");
                                 // Naast _ de duimnageltjes ook nog in een apart mapje.
     if (induim > -1)
        {
         plen = dplaat.length;   // Subdir vermeldingen er voor.
         dplaat = dplaat.substring(0, induim)+dplaat.substring(induim+5, plen);
    	};
    };
	
 return dplaat
};


// ==========================================================
// Aanmaken van een instance van het object Foto
// ----------------------------------------------------------
// Mogelijkheden voor Zijde:
//         LINKS tekst rechts (!) van foto.
//         RECHTS tekst links (!) van foto.
//         MIDDEN tekst rechts van foto in het midden uitgelijnd
//         ONDER tekst onder foto. (default)
//         HIDDEN Geen tekst in album, verschijnt wel als onderschrift
//                zowel op statusbalk als op fotoblad.
// Mogelijkheden voor plaat:
//    Gewoon leeg laten. In dat geval alleen tekst en evt. een link.
//    DAGBOEK, HISTOR of EMAIL. Wordt dan dagboek-, boeken- of emailsymbooltje neergezet.
//
// Met && in de tekst kan een korte tekst op de albumpagina gezet worden;
// het deel voor &&. Bij klikken op de foto komt daar dan de hele tekst.
// Dus zowel het stuk voor als achter &&.
// ==========================================================
function Foto(plaat, hoogte, datum, tekst, zijde, link, uitlijn)
// Het maken van het object.
{
 if (typeof hoogte == 'undefined' || hoogte == "") var hoogte = "120";
                             // Default 120 pixels hoge klikplaatjes.

 // --------------------------- Bijzondere gevallen.
 switch(plaat)
      {
       case "DAGBOEK":        // Dagboekplaatje plus tekst.
          plaat = plsub+"dagboek.gif"; hoogte = 37;
		  break;

       case "EMAIL":          // Emailplaatje plus tekst.
	      plaat = plsub+"mail.gif"; hoogte = 37;
		  break;
		  
	   case "HISTOR":         // Historieplaatje plus tekst.
	      plaat = plsub+"histor.gif"; hoogte = 57;
		  break;
		  
	   default:
	    if (typeof plaat == 'undefined' || plaat == "")
          {                   // Geen plaatje. Enkel tekst. Altijd links uitgelijnd.
           plaat = plsub+"fade.gif"; hoogte = 1;

           if (tekst.indexOf("&&") > -1)
             {                // Iets nodig om te klikken als tekst langer is.
              plaat = plsub+"doc.gif";
              hoogte = 22
             };
           zijde = "li";
          };
	  };
	  
 // -------------------------------------------------
 if (typeof uitlijn == 'undefined' || uitlijn == "")
       var uitlijn = " VALIGN=top";  // Default altijd plaatje bovenin cel.
 else uitlijn = " "+uitlijn;         // Anders een spatie ervoor om los van TD te staan.

 if (typeof zijde == 'undefined' || zijde == "") var zijde = "onder";
                             // Waar moet de tekst?

 tekst = empty(tekst);       // Geen tekst wordt lege tekst.
 datum = empty(datum);       // Geen datum wordt lege datum.
 link = empty(link);         // Geen link wordt lege link.

 var tekst2 = "";
 var pt2 = tekst.indexOf("&&");
                             // Staat er && in de tekst?
                             // Zo ja: voorste stuk gewone tekst, achterste alleen
                             // erbij zetten op de 'opengeklapte' foto.
 if (pt2 > 0)
    {t1 = tekst.substring(0, pt2);
     t2 = tekst.substring(pt2+2);
     tekst = t1;             // Gewone tekst.
     tekst2 = t2;            // Aanvullende tekst bij foto.
    }

 if ((plaat.indexOf(".jp") == -1)
    && (plaat.indexOf(".png") == -1)
    && (plaat.indexOf(".gif") == -1)) plaat += ".jpg";
                             // Weggelaten extensie toevoegen.

 this.plaat = plaat;
 this.hoogte = hoogte;
 this.tekst = tekst;
 this.tekst2 = tekst2;
 this.datum = datum;
 this.zijde = zijde;
 this.uitlijn = uitlijn;
 this.link = link;
 this.PrintFoto = PrintFoto;
 return this;
}



// ==============================================================
// Neerzetten en maken van een tekst-cel
// ==============================================================

function PrintTekst()
{
 if (this.pijl.substring(0,2) == "re") this.uitlijn += " ALIGN=right VALIGN=bottom"
 else
    if (this.pijl == "midden") this.uitlijn += " ALIGN=middle"
    else this.uitlijn = " VALIGN=top ALIGN=left";

 //-----------------------------------
 // Om het korter te maken:
 lt1 = " <A HREF='";                   // Voorste stukje tekst bij link.

 plaatnaam = "p"+linknum;
 linknum++;

 lt2 = "' OnMouseOver='KnopIn("+apo+plaatnaam+apo+", "+apo+plsub+"folder2.gif"+apo+")';";
 lt2 += " OnMouseOut='KnopLos("+apo+plaatnaam+apo+", "+apo+plsub+"folder1.gif"+apo+")';>";

 lt3 = "<IMG NAME="+apo+plaatnaam+apo+" SRC='"+plsub+"folder1.gif' BORDER=0></A><BR>";
                                      // Achterste stukje tekst van de link.
 //-----------------------------------

 document.write("<TD ", this.uitlijn, ">");

 // Tekst links ernaast, gecentreerd als er MIDDEN in pijl staat.

 if (this.link.length > 0) document.write(lt1, this.link, lt2, lt3);

 klas = arletter[stijl];
 datklas = ardatum[stijl];

 // Als er een datum is meegegeven, die neerzetten.
 if (this.datum.length > 0)
    document.write("<SPAN class="+datklas+">", this.datum, " </SPAN><BR>");

 document.write("<SPAN"+klas+">", this.verhaal, "</SPAN>");
 document.write("</TD>\n");
}


// -- Aanmaken van een instance van het object Tekst --------------
// datum       Datum.
// verhaal     Tekst in de cel.
// uitlijn     Default VALIGN=top, wordt er iets meegegeven, dan komt
//             dit ipv de default in <TD xxx>.
// pijl        Links, rechts, onder.
// link        Doelpagina als er een link in de tekst moet.
//             Wordt tussen datum en pijl geplaatst.
// ----------------------------------------------------------------
function Tekst(datum, verhaal, uitlijn, pijl, link)
{
 verhaal = empty(verhaal);
 if (typeof uitlijn == 'undefined' || uitlijn == "")
                                    var uitlijn = " VALIGN=top";
                              // Default altijd bovenin cel.
 pijl = empty(pijl);
 link = empty(link);

 this.datum = datum;         // Een datum.
 this.verhaal = verhaal;     // De tekst.
 this.uitlijn = uitlijn;     // Iets wat op de xxx in <TD xxx> kan staan.
 this.pijl = pijl;           // Links, rechts, midden, op of neer.
                             // li, re en mi is genoeg.
 this.link = link;           // File, waarnaar gelinkt wordt.
 this.PrintTekst = PrintTekst;
 return this;
}


// ==============================================================
// Filmpje in Flash-video formaat (*.flv)
// FLVPlayer.swf, skin.swf en de filmpjes moeten in de lokale directory staan.
// Parameter filmpje zonder .flv
// Uitlijn:	Standaard tekst eronder, li voor er naast.
// Beginmeteen: false is standaard, zo niet geef dan true mee.
// ==============================================================
function FVideo(filmpje, vdatum, vtekst, uitlijn, beginmeteen, breed, hoog)
{
 vdatum = empty(vdatum);
 vtekst = empty(vtekst);
 beginmeteen = empty(beginmeteen);
 uitlijn = empty(uitlijn);
 breed = empty(breed);
 hoog = empty(hoog); 
 
 vaklijn = "VALIGN=top";
 if ((uitlijn != "" ) && (uitlijn != "li")) vaklijn += " "+uitlijn;

 if (beginmeteen == "") beginmeteen = "false"; 
 if (breed == "") breed = "320";  
 if (hoog == "") hoog = "210";  

 breed = parseInt(parseInt(breed)*1.01875-14);   // Randjes voor knoppen en zo.
 hoog = parseInt(parseInt(hoog)*1.08958+5);
  
 document.write('<TD '+vaklijn+'>'); 

 document.write('<object type="application/x-shockwave-flash" data="FLVPlayer.swf" width="'+breed+'" height="'+hoog+'" id="FLVPlayer">');
 document.write('  <param name="movie" value="FLVPlayer.swf" />');
 document.write('  <param name="salign" value="lt" />');
 document.write('  <param name="quality" value="high" />');
 document.write('  <param name="scale" value="noscale" />');
 document.write('  <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Skin&streamName='+filmpje+'&autoPlay='+beginmeteen+'&autoRewind=false" />');
 document.write('</object>');
  
 if (uitlijn == "li") document.write('</TD><TD VALIGN=top>')
 else document.write("<br>");
 
 document.write("<SPAN class="+datklas+">"+vdatum+"</SPAN><BR>"); 
 document.write("<SPAN"+klas+">"+vtekst+"</SPAN>");
 document.write('</TD>');
};


// ==============================================================
// Filmpje in ogg theora formaat (*.ogg)
// Uitlijn:	Standaard tekst eronder, li voor er naast.
// Beginmeteen: false is standaard, zo niet geef dan true mee.
// ==============================================================
function Fogg(filmpje, vdatum, vtekst, uitlijn, beginmeteen, breed, hoog)
{
 vdatum = empty(vdatum);
 vtekst = empty(vtekst);
 beginmeteen = empty(beginmeteen);
 uitlijn = empty(uitlijn);
 breed = empty(breed);
 hoog = empty(hoog);
 
 vaklijn = "VALIGN=top";
 if ((uitlijn != "" ) && (uitlijn != "li")) vaklijn += " "+uitlijn;

 beginmeteen = (beginmeteen == "True")?"autoplay":""; 
 if (breed == "") breed = "320";  
 if (hoog == "") hoog = "210";  

 document.write('<TD '+vaklijn+'>'); 
 document.write('<video src="'+filmpje+'.ogg" width="'+breed+'" height="'+hoog+'" '+beginmeteen+' controls>');
 document.write('Sorry, your browser does not support the video tag. Try using Firefox 3.5+</video>');
  
 if (uitlijn == "li") document.write('</TD><TD VALIGN=top>')
 else document.write("<br>");
 
 document.write("<SPAN class="+datklas+">"+vdatum+"</SPAN><BR>"); 
 document.write("<SPAN"+klas+">"+vtekst+"</SPAN>");
 document.write('</TD>');
};

// ==============================================================
// MP3 afspelen in webpagina's met de dewplayer.swf.
// Startzelf = true (1) of false (0) (default).
// nogeenkeer = true (1) of false (0) (default), herhalend.
// MP3 moeten een sample-rate van 44.1 (48) kbps hebben.
// ==============================================================
function MP3(geluidje, gdatum, gtekst, startzelf, nogeenkeer)
{
 gdatum = empty(gdatum);
 gtekst = empty(gtekst);
 startzelf = empty(startzelf);
 nogeenkeer = empty(nogeenkeer);

 idnr = geluidje;
 if (geluidje.indexOf(".mp3") < 0) geluidje += ".mp3";
 
 sz = "0";
 if (startzelf == "1" || startzelf == "true") sz = 1;
 herh = "0";
 if (nogeenkeer == "1" || nogeenkeer == "true") herh = 1;

 // -------------------- oplossing?
 docpl = document.location+" ";
 result = docpl.lastIndexOf("\/");
 rest = docpl.substring(0,result)+"/";
 //------------------------

 document.write('<TD VALIGN=top>');
 document.write('<object id="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" type="application/x-shockwave-flash" data="'+basis+'java/dewplayer.swf?mp3='+geluidje+'&amp;autoreplay='+herh+'&amp;autostart='+sz+'&amp;showtime=1" width="200" height="20">');
 document.write('<param name="wmode" value="transparent">');
 document.write('<param name="movie" value="'+basis+'java/dewplayer.swf?mp3='+geluidje+'&amp;autoreplay='+herh+'&amp;autostart='+sz+'&amp;showtime=1" />');
 document.write('</object>');

 klas = arletter[stijl];
 datklas = ardatum[stijl];

 // Als er een datum is meegegeven, die neerzetten.
 document.write("<br>");
 if (gdatum.length > 0)
    document.write("<SPAN class="+datklas+">", gdatum, "<br>");

 if (gtekst.length > 0)	
    document.write("<SPAN"+klas+">", gtekst, "<br>");
 
 document.write("</TD>");
};


// ==============================================================
// Neerzetten en maken van een dokument-cel
// ==============================================================
function PrintDoc()
{
 done = "F";

 sbreedte = screen.width - 10;
 shoogte = screen.height - 50;
 sstuur = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=" + sbreedte +",height=" + shoogte  +",top=0,left=0";

 document.write("<TD VALIGN=top>");

 if (this.plaat.indexOf(".htm") > 0)
 {                           // Dit is een komplete html-pagina
//  document.write("<A HREF=", apo, "javascript:void(window.open('"+
//    this.plaat+"', 'raam1', '"+sstuur+"'))", apo);
  document.write("<A HREF=", apo, this.plaat, apo);
  done = "T";
 }

 if ((this.plaat.indexOf(".doc") > 0) ||
     (this.plaat.indexOf(".pdf") > 0))
 {                           // Pdf of Worddocument. Alleen een href.
  document.write("<A HREF="+apo+this.plaat+apo+" TARGET=_new");
  done = "T";
 }
 
 if (done == "F")
 {
  document.write("<A HREF=", apo, "javascript:plaat('", this.plaat,
                     "', '", this.verhaal, this.verhaal2,
                     "', '", this.datum, "')", apo, " ");
 };

 document.write("OnMouseOver=", apo, "return display('", this.verhaal, "')", apo,
                 "OnMouseOut=", apo, "return display('')", apo, ">");

 document.write("<IMG NAME='"+this.plaat+"' SRC='", this.docplaat, "' BORDER=0></A>");

 klas = arletter[stijl];
 datklas = ardatum[stijl];

 // Als er een datum is meegegeven, die neerzetten.
 if (this.datum.length > 0)
    document.write("<SPAN class="+datklas+">", this.datum, "</SPAN><BR>")
 else
    document.write("<BR>");

 ftekst = this.verhaal;
 if (this.verhaal2.length > 0) ftekst += "....";
                             // Aangeven, dat er meer tekst is.
 document.write("<SPAN"+klas+">", ftekst, "</SPAN>");
 document.write("</TD>\n");
}


// -- Aanmaken van een instance van het object Doc --------------
// plaat       plaatje, pdf, doc of komplete html-pagina.
// datum       Datum
// verhaal     Tekst in de cel.
// tiepe       Wat voor symbooltje:
// Geluidsfragmenten worden niet meer gebruikt. Daarvoor is MP3.
// ----------------------------------------------------------------
function Doc(plaat, datum, verhaal, tiepe)
{
 var plsub = basis+"plaat/";
 symb = [plsub+"doc.gif", plsub+"loep.gif",
         plsub+"soundbutton.gif", plsub+"fade.gif",
         plsub+"histor.gif", plsub+"docpdf.gif"];

 datum = empty(datum);
 verhaal = empty(verhaal);
                                  // Als er geen plaatje meegegeven is.						  
 if (typeof plaat == 'undefined' || plaat == "")
     plaat = plsub+"fade.gif";

 this.docplaat = symb[0];

 if (tiepe == "loep") this.docplaat = symb[1];
 if (tiepe == "priv")             // Prive stukjes.
    {
     this.docplaat = symb[3];
     if ((plaat == "") || (plaat == 'undefined')) plaat = symb[3];
    };

 if (plaat.indexOf(".pdf") > 0) this.docplaat = symb[5];
 if ((plaat.indexOf(".htm") > 0) && (this.docplaat != symb[3])) this.docplaat = symb[4];
                                  // HTML pagina, boek-icoontje.

 var verhaal2 = "";
 var pt2 = verhaal.indexOf("&&");
                             // Staat er && in de tekst?
                             // Zo ja: voorste stuk gewone tekst, achterste alleen
                             // erbij zetten op de 'opengeklapte' foto.
 if (pt2 > 0)
    {t1 = verhaal.substring(0, pt2);
     t2 = verhaal.substring(pt2+2);
     verhaal = t1;           // Gewone tekst.
     verhaal2 = t2;          // Aanvullende tekst bij foto.
    }

if  ((plaat.indexOf(".htm") == -1) && 
     (plaat.indexOf(".gif") == -1) &&
	 (plaat.indexOf(".pdf") == -1) &&
	 (plaat.indexOf(".doc") == -1) &&
	 (plaat.indexOf(".png") == -1) &&
	 (plaat.indexOf(".jpg") == -1))
     plaat += ".jpg";	
                             // Weggelaten extensie toevoegen.

 this.datum = datum;         // Een datum.
 this.verhaal = verhaal;     // De tekst.
 this.verhaal2 = verhaal2    // Extra tekst, alleen bij openen.
 this.plaat = plaat;         // File, waarin document staat.
 this.PrintDoc = PrintDoc;
 return this;
}



// ==============================================================
// Cel met Flash slideshow schrijven.
// ==============================================================
function Slidef(swefje, breed, hoogte, datum, tekst, uitlijn, link)
{
 if (typeof breed == 'undefined') var breed = "220";
 if (typeof hoogte == 'undefined') var hoogte = "120";
 if (typeof datum == 'undefined') var datum = "";
 if (typeof tekst == 'undefined') var tekst = "";
 if (typeof uitlijn == 'undefined') var uitlijn = "";
 if (typeof link == 'undefined') var link = "";
 
 pro = swefje.indexOf(".xml")                // Kijken of het xml gestuurd is.
 if (pro > -1)                               // dan naam.xml meegegeven.
    {
     snaam = swefje.substring(0,pro);
	 swefje = snaam+".swf?xml_path="+swefje;
    }
 else
    swefje = swefje+".swf";
	 
 document.write('<TD ', uitlijn, '>');
 
 document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="640" height="450" id="tech" align="middle">');
 document.write('	<param name="allowScriptAccess" value="sameDomain" />');
 document.write('	<param name="movie" value="'+swefje+'" />');
 document.write('	<param name="quality" value="high" />');
 document.write('	<embed src="'+swefje+'" quality="high" width="'+breed+'" height="'+hoogte+'" name="tech" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
 document.write('</object>');

 document.write('</TD>');

 lt1 = " <A HREF='";                   // Voorste stukje tekst bij link.

 plaatnaam = "p"+linknum;
 linknum++;

 lt2 = "' OnMouseOver='KnopIn("+apo+plaatnaam+apo+", "+apo+plsub+"folder2.gif"+apo+")';";
 lt2 += " OnMouseOut='KnopLos("+apo+plaatnaam+apo+", "+apo+plsub+"folder1.gif"+apo+")';>";

 lt3 = "<IMG NAME="+apo+plaatnaam+apo+" SRC='"+plsub+"folder1.gif' BORDER=0></A><BR>";
                                      // Achterste stukje tekst van de link.
 //-----------------------------------

 document.write("<TD ", uitlijn, ">")
 if (link.length > 0) document.write(lt1, link, lt2, lt3);

 klas = arletter[stijl];
 datklas = ardatum[stijl];

 // Als er een datum is meegegeven, die neerzetten.
 if (datum.length > 0)
    document.write("<SPAN class="+datklas+">", datum, " </SPAN><BR>");

 document.write("<SPAN"+klas+">", tekst, "</SPAN>");
 document.write("</TD>\n");
}


// ======================================================
// Een komplete rij
// reeks is een array.
// Per element: plaatje, grootte, tekst enz. gescheiden door *
// rijpar is optioneel. weggelaten of leeg = Default komplete tabel,
// Bevat het: 0 = Uitsluitend rij, geen <TABLE> voor of na.
//            1 = Alleen <TABLE>, eerste rij van meerdere.
//            2 = Alleen </TABLE>, laatste rij van meerdere
//            v = Volle breedte.
// ======================================================
function Regel(reeks, rijpar)
{
 rij = "";
 rijpar = empty(rijpar);

 var def_groot = "120";
       // Geen grootte gegeven, dan default grootte.
       // Wel gegeven, dan wordt dat meteen dat de nieuwe default-waarde.

 brtekst = "";
 if (rijpar.indexOf("v") > -1) brtekst = " WIDTH=100%";

 if ((rijpar.indexOf("0") > -1) || (rijpar.indexOf("2") > -1))
    document.write("<TR>")
 else
    document.write("<P ALIGN=center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=6"+brtekst+"><TR>");

 // ----------------------------------------------------- Begin lus.
 for (n = 0; n < reeks.length; n++)
  {
   var done = "F";                // Om te kijken of we het al gedaan hebben.
   deel = reeks[n].split("*");

   switch(deel[0])
      {
       case "PRIV":
	      dc = new Doc(deel[1], deel[2], deel[3], "priv");
          dc.PrintDoc();
		  break;

       case "DOC":               // Documenten, Loep (vergroting).
          dc = new Doc(deel[1], deel[2], deel[3], deel[4]);
          dc.PrintDoc();
          break;

       case "SLIDE":            // Slideshow
          if (typeof deel[1] == 'undefined' || deel[1] == "") deel[1] = def_groot
          else def_groot = deel[1];  // Param: string, hoogte, datum, tekst.
                                     // plaatjes e.d. definieren in kop html-doc.
          Slide(deel[1], deel[2], deel[3], deel[4], deel[5]);
          break;

       case "SLIDEF":           // Slideshow flash.
          if (typeof deel[2] == 'undefined' || deel[2] == "") deel[2] = def_groot
          else def_groot = deel[2];  // Param: swfbestand, breedte, hoogte, 
	                                 // datum, tekst, link
          Slidef(deel[1], deel[2], deel[3], deel[4], deel[5], deel[6], deel[7]);
          break;
	  
       case "LEEG":             // Lege cel voor scheiding. Default 4 spaties.
          if (typeof deel[1] == 'undefined') deel[1] = 4;
          tal = parseInt(deel[1]);   // Integer van string maken.
          document.write("<TD>");
          for (k = 0; k < tal; k++) document.write("&nbsp;");
                                     // Aantal spaties
          document.write("</TD>");
          break;

       case "FOTO":             // Vast plaatje. Ware grootte.
                                // Kan niet opengeklikt worden.
          df = deel[1];         // Extensie toevoegen.
          if ((df.indexOf(".jp") == -1)
             && (df.indexOf(".gif") == -1)) df = df+".jpg";
                                // Weggelaten extensie toevoegen.

          document.write('<TD><IMG SRC="', df, '"></TD>');
          break;

       case "TAAL":             // Taalkeuze.
          document.write('<TD VALIGN=top WIDTH=40>');
          KiesTaal(deel[1], deel[2]);
          document.write('</TD>\n');
          break;

       case "VIDEO":            // Filmpje in flv formaat.
          FVideo(deel[1], deel[2], deel[3], deel[4], deel[5], deel[6], deel[7]);
          break;

       case "VIDOGG":           // Filmpje in ogg formaat.
          Fogg(deel[1], deel[2], deel[3], deel[4], deel[5], deel[6], deel[7]);
          break;
		  
       case "MP3":              // Geluidsfragment.
          MP3(deel[1], deel[2], deel[3], deel[4], deel[5]);
          break;

       default:	                // Wat overblijft: gewone foto.
          if (typeof deel[1] == 'undefined' || deel[1] == "")
             deel[1] = def_groot
          else def_groot = deel[1];

          if (typeof deel[4] == 'undefined' || deel[4] == "")
             deel[4] = "onder";

          p = new Foto(deel[0], deel[1], deel[2], deel[3], deel[4], deel[5], deel[6], deel[7]);
          p.PrintFoto();
       };
  };
// ----------------------------------------------------- Einde lus.
// Bevat het: 0 = Uitsluitend rij, geen <TABLE> voor of na.
//            1 = Alleen <TABLE>, eerste rij van meerdere.
//            2 = Alleen </TABLE>, laatste rij van meerdere
//            v = Volle breedte.

 if ((rijpar.indexOf("0") > -1) || (rijpar.indexOf("1") > -1))
    document.write("</TR>\n\n")
 else
    document.write("</TR></TABLE></P>\n\n");
}


// ======================================================
// Dit stuk zoekt uit waar we nu zitten.
// Dan de alles voor de naam van de html-pagina terug geven.
// Dus http://server/subdir/ of file:///subdir/.
// ======================================================
function subdirzoek()
{
 pagplaats = document.location;
 wp = pagplaats+" ";
	
 vrplek = wp.indexOf("?")                       // Eerste eventuele parameters
 if (vrplek > -1) wp = wp.substring(0,vrplek);  // achteraan weghalen.

 slplek = 0;
 onthoud = -1;
 while (slplek > -1) 
       {
    	onthoud += slplek+1;
        slplek = wp.indexOf("/");
        wp = wp.substring(slplek+1,100);
       };
 wp = pagplaats+" ";
 wp = wp.substring(0,onthoud);   // Dit is de complete subdir van de URL.
 return (wp)	
}

// ======================================================
// Randje met schaduw om foto.
// corner.js 1.9 (21 mar 2009) (c) by Christian Effenberger  All Rights Reserved 
// Source: corner.netzgesta.de  Distributed under Netzgestade Software License Agreement 
// http://www.netzgesta.de/cvi/LICENSE.txt 
// License permits free of charge use on non-commercial and private web sites only 
// ======================================================
var tmp = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0;if(tmp) var isIE = document.namespaces ? 1 : 0;if(isIE) {	if(document.namespaces['v']==null) {		var e=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","roundrect","oval","rect","arc","image"],s=document.createStyleSheet(); 		for(var i=0; i<e.length; i++) {s.addRule("v\\:"+e[i],"behavior: url(#default#VML);");} document.namespaces.add("v","urn:schemas-microsoft-com:vml");	} }function getRadius(radius,width,height){	var part = (Math.min(width,height)/100);	radius = Math.max(Math.min(100,radius/part),0);	return radius + '%';}function getImages(className){	var children = document.getElementsByTagName('img'); 	var elements = new Array(); var i = 0;	var child; var classNames; var j = 0;	for (i=0;i<children.length;i++) {		child = children[i];		classNames = child.className.split(' ');		for (var j = 0; j < classNames.length; j++) {			if (classNames[j] == className) {				elements.push(child);				break;			}		}	}	return elements;}function getClasses(classes,string){	var temp = '';	for (var j=0;j<classes.length;j++) {		if (classes[j] != string) {			if (temp) {				temp += ' '			}			temp += classes[j];		}	}	return temp;}function getClassValue(classes,string){	var temp = 0; var pos = string.length;	for (var j=0;j<classes.length;j++) {		if (classes[j].indexOf(string) == 0) {			temp = Math.min(classes[j].substring(pos),100);			break;		}	}	return Math.max(0,temp);}function getClassAttribute(classes,string){	var temp = 0; var pos = string.length;	for (var j=0;j<classes.length;j++) {		if (classes[j].indexOf(string) == 0) {			temp = 1; break;		}	}	return temp;}function roundedRect(ctx,x,y,width,height,radius,nopath){	if (!nopath) ctx.beginPath();	ctx.moveTo(x,y+radius);	ctx.lineTo(x,y+height-radius);	ctx.quadraticCurveTo(x,y+height,x+radius,y+height);	ctx.lineTo(x+width-radius,y+height);	ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius);	ctx.lineTo(x+width,y+radius);	ctx.quadraticCurveTo(x+width,y,x+width-radius,y);	ctx.lineTo(x+radius,y);	ctx.quadraticCurveTo(x,y,x,y+radius);	if (!nopath) ctx.closePath();}function addGradient(ctx,x,y,w,h,color,opacity) {	var tmp = ctx.createLinearGradient(x,y,w,h);	var val = (color>0?0.25:0.2);	tmp.addColorStop(0,'rgba('+color+','+color+','+color+',0.9)');	tmp.addColorStop(val,'rgba('+color+','+color+','+color+','+opacity+')');	tmp.addColorStop(0.75,'rgba('+color+','+color+','+color+',0)');	tmp.addColorStop(1,'rgba('+color+','+color+','+color+',0)');	return tmp;}function addRadialStyle(ctx,x1,y1,r1,x2,y2,r2,opacity) {	var tmp = ctx.createRadialGradient(x1,y1,r1,x2,y2,r2);	var opt = Math.min(parseFloat(opacity+0.1),1.0);	tmp.addColorStop(0,'rgba(0,0,0,'+opt+')');	tmp.addColorStop(0.25,'rgba(0,0,0,'+opacity+')');	tmp.addColorStop(1,'rgba(0,0,0,0)');	return tmp;}function addLinearStyle(ctx,x,y,w,h,opacity) {	var tmp = ctx.createLinearGradient(x,y,w,h);	var opt = Math.min(parseFloat(opacity+0.1),1.0);	tmp.addColorStop(0,'rgba(0,0,0,'+opt+')');	tmp.addColorStop(0.25,'rgba(0,0,0,'+opacity+')');	tmp.addColorStop(1,'rgba(0,0,0,0)');	return tmp;}function addShine(ctx,width,height,radius,opacity,extra) {	var style; var color = (extra!=1?254:0);	style = addGradient(ctx,0,radius,radius,radius,color,opacity);	ctx.beginPath();	ctx.moveTo(0,0);	ctx.lineTo(0,height);		ctx.lineTo(radius,height);	ctx.lineTo(radius,radius);	ctx.closePath();	ctx.fillStyle = style;	ctx.fill();	style = addGradient(ctx,radius,0,radius,radius,color,opacity);	ctx.beginPath();	ctx.moveTo(0,0);	ctx.lineTo(width,0);	ctx.lineTo(width,radius);	ctx.lineTo(radius,radius);	ctx.closePath();	ctx.fillStyle = style;	ctx.fill();}function addShade(ctx,width,height,radius,opacity) {	var style;	style = addGradient(ctx,width,radius,width-radius,radius,0,opacity);	ctx.beginPath();	ctx.moveTo(width,0);	ctx.lineTo(width,height);	ctx.lineTo(width-radius,height-radius);	ctx.lineTo(width-radius,0);	ctx.closePath();	ctx.fillStyle = style;	ctx.fill(); 	style = addGradient(ctx,radius,height,radius,height-radius,0,opacity);	ctx.beginPath();	ctx.moveTo(width,height);	ctx.lineTo(0,height);	ctx.lineTo(0,height-radius);	ctx.lineTo(width-radius,height-radius);	ctx.closePath();	ctx.fillStyle = style;	ctx.fill();}function roundedShadow(ctx,x,y,width,height,radius,opacity){	var style; 	ctx.beginPath();	ctx.rect(x,y+height-radius,radius,radius);	ctx.closePath();	style = addRadialStyle(ctx,x+radius,y+height-radius,radius-x,x+radius,y+height-radius,radius,opacity);	ctx.fillStyle = style;	ctx.fill();	ctx.beginPath();	ctx.rect(x+radius,y+height-y,width-(radius*2.25),y);	ctx.closePath();	style = addLinearStyle(ctx,x+radius,y+height-y,x+radius,y+height,opacity);	ctx.fillStyle = style;	ctx.fill();	ctx.beginPath(); 	ctx.rect(x+width-(radius*1.25),y+height-(radius*1.25),radius*1.25,radius*1.25);	ctx.closePath();	style = addRadialStyle(ctx,x+width-(radius*1.25),y+height-(radius*1.25),(radius*1.25)-1.5-x,x+width-(radius*1.25),y+height-(radius*1.25),radius*1.25,opacity);	ctx.fillStyle = style;	ctx.fill();	ctx.beginPath();	ctx.rect(x+width-x,y+radius,x,height-(radius*2.25));	ctx.closePath();	style = addLinearStyle(ctx,x+width-x,y+radius,x+width,y+radius,opacity);	ctx.fillStyle = style;	ctx.fill();	ctx.beginPath();	ctx.rect(x+width-radius,y,radius,radius);	ctx.closePath();	style = addRadialStyle(ctx,x+width-radius,y+radius,radius-x,x+width-radius,y+radius,radius,opacity);	ctx.fillStyle = style;	ctx.fill();}function addIECorners() {	var theimages = getImages('corner');	var image; var object; var vml;  var div; var pos; var i; var classes = '';	var iradius = null; var ishadow = null; var ishade = null; var inverse = null; 	var newClasses = ''; var maxdim = null; var offset = null; var radius = null; 	var display = ""; var flt = null; var width = null; var height = null;	var start, head, soft, shadow, fill, foot, end;	var left, top, bottom, right, lt, br, linear, inset;	for (i=0;i<theimages.length;i++) {			image = theimages[i];		object = image.parentNode; 		classes = image.className.split(' ');		iradius = getClassValue(classes,"iradius");		ishadow = getClassValue(classes,"ishadow");		ishade  = getClassValue(classes,"ishade");		inverse = getClassAttribute(classes,"inverse");		newClasses = getClasses(classes,"corner");		width = image.width; height = image.height;		maxdim = Math.min(width,height)/2;		iradius = Math.min(maxdim,iradius); offset = 4;		offset = (ishadow>0?(inverse>0?0:Math.min(Math.max(offset,iradius/2),16)):0);		radius = getRadius(iradius,width,height);		display = (image.currentStyle.display.toLowerCase()=='block')?'block':'inline-block';		vml = document.createElement(['<var style="overflow:hidden;display:' + display + ';width:' + width + 'px;height:' + height + 'px;padding:0;">'].join(''));		flt = image.currentStyle.styleFloat.toLowerCase();		display = (flt=='left'||flt=='right')?'inline':display;		start = '<v:group style="zoom:1; display:' + display + '; margin:-1px 0 0 -1px; padding:0; position:relative; width:' + width + 'px;height:' + height + 'px;" coordsize="' + width + ',' + height + '">';		fill = '<v:fill src="' + image.src + '" type="frame" />';		foot = (iradius>0?'</v:roundrect>':'</v:rect>'); end = '</v:group>';		soft = ''; shadow = ''; lt = ''; left = ''; top = ''; bottom = ''; right = '';		if(iradius<=0) {			if (ishadow>0) {				if(inverse<=0) {					ishadow = ishadow/50; offset = 8; inset = 4;					soft = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:' + width + 'px;height:' + height + 'px;"><v:fill color="#ffffff" opacity="0.0" /></v:rect><v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="filter:Alpha(opacity=' + (ishadow*64) + '), progid:dxImageTransform.Microsoft.Blur(PixelRadius=' + inset + ', MakeShadow=false); zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:' + inset + 'px;left:' + inset + 'px;width:' + (width-(3*inset)) + 'px;height:' + (height-(3*inset)) + 'px;"><v:fill color="#000000" opacity="1" /></v:rect>';					head = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:' + (width-offset) + 'px;height:' + (height-offset) + 'px;">';				}else if(inverse>0) {					ishadow = ishadow/50; iradius = 12; linear = "linear";					head = '<v:rect filled="t" stroked="t" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:' + width + 'px;height:' + height + 'px;">';					shadow = '<v:stroke weight="0.5" opacity="'+(ishadow/2)+'" color="#000000" />';					top = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + width + ',' + iradius + '" path="m 0,0 l '+width+',0,'+width+','+iradius+','+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + width + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" type="gradient" angle="0" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>'; 					left = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + iradius + ',' + height + '" path="m 0,0 l 0,'+height+','+iradius+','+height+','+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + iradius + 'px; height:' + height + 'px;"><v:fill method="' + linear + '" type="gradient" angle="90" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>';				}			}else {				head = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="margin:-1px 0 0 -1px;padding:0;display:' + display + ';width:' + width + 'px;height:' + height + 'px;">';			}			if(ishade>0) {				ishade = ishade/50; iradius = 12;				top = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + (width-offset) + ',' + iradius + '" path="m 0,0 l '+(width-offset)+',0,'+(width-offset)+','+iradius+','+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + (width-offset) + 'px; height:' + iradius + 'px;"><v:fill method="linear" type="gradient" angle="0" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>'; 				left = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + iradius + ',' + (height-offset) + '" path="m 0,0 l 0,'+(height-offset)+','+iradius+','+(height-offset)+','+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + iradius + 'px; height:' + (height-offset) + 'px;"><v:fill method="linear" type="gradient" angle="90" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>';				bottom = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + (width-offset) + ',' + iradius + '" path="m 0,'+iradius+' l '+(width-offset)+','+iradius+','+(width-offset-iradius)+',0,'+iradius+',0 x e" style="position:absolute; margin: 0; top:' + (height-offset-iradius) + 'px; left: 0px; width:' + (width-offset) + 'px; height:' + iradius + 'px;"><v:fill method="linear" type="gradient" angle="180" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishade + '" /></v:shape>';				right = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + iradius + ',' + (height-offset) + '" path="m '+iradius+',0 l '+iradius+','+(height-offset)+',0,'+(height-offset-iradius)+',0,'+iradius+' x e" style="position:absolute; margin: 0; top: 0px; left:' + (width-offset-iradius) + 'px; width:' + iradius + 'px; height:' + (height-offset) + 'px;"><v:fill method="linear" type="gradient" angle="270" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishade + '" /></v:shape>';			}		} else {			if(ishadow>0) {				linear = "linear sigma"; pos = 2;				if(inverse<=0) {					ishadow = ishadow/50; inset = Math.round(offset*0.5);					soft = '<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:' + width + 'px;height:' + height + 'px;"><v:fill color="#ffffff" opacity="0.0" /></v:rect><v:roundrect arcsize="' + (radius+inset) + '" strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="filter:Alpha(opacity=' + (ishadow*64) + '), progid:dxImageTransform.Microsoft.Blur(PixelRadius=' + inset + ', MakeShadow=false); zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:' + inset + 'px;left:' + inset + 'px;width:' + (width-(3*inset)) + 'px;height:' + (height-(3*inset)) + 'px;"><v:fill color="#000000" opacity="1" /></v:roundrect>';					head = '<v:roundrect arcsize="' + radius + '" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:' + (width-offset) + 'px;height:' + (height-offset) + 'px;">';				}else if(inverse>0) {					ishadow = ishadow/50;					head = '<v:roundrect arcsize="' + radius + '" filled="t" stroked="t" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:' + width + 'px;height:' + height + 'px;">';					shadow = '<v:stroke weight="0.5" opacity="'+(ishadow/2)+'" color="#000000" />';					top = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + width + ',' + iradius + '" path="m '+iradius+','+iradius+' l '+width+','+iradius+' qy '+(width-iradius)+',0 l '+iradius+',0 x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: -1px; width:' + (width+1) + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" type="gradient" angle="0" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>'; 					left = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + iradius + ',' + height + '" path="m 0,'+iradius+' l 0,'+(height-iradius)+' qy '+iradius+','+height+' l '+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: -1px; left: 0px; width:' + iradius + 'px; height:' + (height+1) + 'px;"><v:fill method="' + linear + '" type="gradient" angle="90" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>';					lt = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="' + iradius + ',' + iradius + '" path="m '+iradius+','+iradius+' l 0,'+iradius+' qy '+iradius+',0 l '+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + iradius + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" focus="1" focusposition="1,1" focussize="0.5,0.5" type="gradientradial" color="#000000" opacity="0" color2="#000000" o:opacity2="' + ishadow + '" /></v:shape>';				}			}else {				pos = 1; offset = 0;				head = '<v:roundrect arcsize="' + radius + '" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:' + width + 'px;height:' + height + 'px;">';			}			if(ishade>0) {				ishade = ishade/50; linear = "linear";				top = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + (width-offset) + ',' + iradius + '" path="m '+iradius+','+iradius+' l '+(width-offset)+','+iradius+' qy '+(width-offset-iradius)+',0 l '+iradius+',0 x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: -1px; width:' + (width-offset+pos) + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" type="gradient" angle="0" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>'; 				left = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + iradius + ',' + (height-offset) + '" path="m 0,'+iradius+' l 0,'+(height-iradius-offset)+' qy '+iradius+','+(height-offset)+' l '+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: -1px; left: 0px; width:' + iradius + 'px; height:' + (height-offset+pos) + 'px;"><v:fill method="' + linear + '" type="gradient" angle="90" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>';				lt = '<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="' + iradius + ',' + iradius + '" path="m '+iradius+','+iradius+' l 0,'+iradius+' qy '+iradius+',0 l '+iradius+','+iradius+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:' + iradius + 'px; height:' + iradius + 'px;"><v:fill method="' + linear + '" focus="1" focusposition="1,1" focussize="0.5,0.5" type="gradientradial" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="' + ishade + '" /></v:shape>';			}		}		vml.innerHTML = start + soft + head + fill + shadow + foot + right + bottom + top + left + lt + end;		vml.className = newClasses;		vml.style.cssText = image.style.cssText;		vml.style.height = image.height+'px';		vml.style.width = image.width+'px';		vml.height = image.height;		vml.width = image.width;		vml.src = image.src; vml.alt = image.alt;		if(image.id!='') vml.id = image.id; 		if(image.title!='') vml.title = image.title;		if(image.getAttribute('onclick')!='') vml.setAttribute('onclick',image.getAttribute('onclick'));		if(image.getAttribute("usemap")) {			if (iradius>0){pos = offset;}else {pos = 0;}			object.style.position = 'relative';			object.style.height = height+'px';			object.style.width = width+'px';			image.left = 0; image.top = 0;			image.style.position = 'absolute';			image.style.height = height+'px';			image.style.width = width+'px';			image.style.left = 0 + 'px';			image.style.top = 0 + 'px';			image.style.filter = "Alpha(opacity=0)";			object.insertBefore(vml,image);		}else {			object.replaceChild(vml,image);		}	}}function addCorners() {	var theimages = getImages('corner');	var image; var object; var canvas; var context; var i;	var iradius = null; var ishade = null; var ishadow = null;	var inverse = null; var classes = ''; var newClasses = ''; 	var maxdim = null; var style = null; var offset = null;	for (i=0;i<theimages.length;i++) {			image = theimages[i];		object = image.parentNode; 		canvas = document.createElement('canvas');		if (canvas.getContext) {			classes = image.className.split(' ');			iradius = getClassValue(classes,"iradius");			ishadow = getClassValue(classes,"ishadow");			ishade  = getClassValue(classes,"ishade");			inverse = getClassAttribute(classes,"inverse");			newClasses = getClasses(classes,"corner");			canvas.className = newClasses;			canvas.style.cssText = image.style.cssText;			canvas.style.height = image.height+'px';			canvas.style.width = image.width+'px';			canvas.height = image.height;			canvas.width = image.width;			canvas.src = image.src; canvas.alt = image.alt;			if(image.id!='') canvas.id = image.id;			if(image.title!='') canvas.title = image.title;			if(image.getAttribute('onclick')!='') canvas.setAttribute('onclick',image.getAttribute('onclick'));			maxdim = Math.min(canvas.width,canvas.height)/2;			iradius = Math.min(maxdim,iradius); offset = 4;			offset = (ishadow>0?(inverse>0?0:Math.min(Math.max(offset,iradius/2),16)):0);			context = canvas.getContext("2d");			if(image.getAttribute("usemap")) {				object.style.position = 'relative';				object.style.height = image.height+'px';				object.style.width = image.width+'px';				canvas.left = 0; canvas.top = 0;				canvas.style.position = 'absolute';				canvas.style.left = 0 + 'px';				canvas.style.top = 0 + 'px';				image.left = 0; image.top = 0;				image.style.position = 'absolute';				image.style.height = image.height+'px';				image.style.width = image.width+'px';				image.style.left = 0 + 'px';				image.style.top = 0 + 'px';				image.style.opacity = 0;				object.insertBefore(canvas,image);			}else {				object.replaceChild(canvas,image);			}			context.clearRect(0,0,canvas.width,canvas.height);			context.save();			if (ishadow>0 && inverse<=0) {				ishadow = ishadow/100;				if (iradius>0) {					roundedShadow(context,offset,offset,canvas.width-offset,canvas.height-offset,iradius,ishadow);				}else {					offset = 8; 					roundedShadow(context,offset,offset,canvas.width-offset,canvas.height-offset,offset,ishadow);				}			}			if (iradius<=0) {				context.beginPath();				context.rect(0,0,canvas.width-offset,canvas.height-offset);				context.closePath();			}else {				roundedRect(context,0,0,canvas.width-offset,canvas.height-offset,iradius);			}			context.clip();			context.fillStyle = 'rgba(0,0,0,0)';			context.fillRect(0,0,canvas.width,canvas.height);			context.drawImage(image,0,0,canvas.width-offset,canvas.height-offset);			if (ishadow>0 && inverse>0) {				ishadow = ishadow/100;				if (iradius>0) {					addShine(context,canvas.width,canvas.height,iradius,ishadow,1);					roundedRect(context,0,0,canvas.width,canvas.height,iradius);				}else {					iradius = 16; 					addShine(context,canvas.width,canvas.height,iradius,ishadow,1);					context.beginPath();					context.rect(0,0,canvas.width,canvas.height);					context.closePath();				}				context.strokeStyle = 'rgba(0,0,0,'+ishadow+')';				context.lineWidth = 2;				context.stroke();			}			if (ishade>0) {				ishade = ishade/100;				if (iradius<=0) iradius = 16; 				addShade(context,canvas.width-offset,canvas.height-offset,iradius,ishade);				addShine(context,canvas.width-offset,canvas.height-offset,iradius,ishade);			}			canvas.style.visibility = 'visible';		}	}}var cornerOnload = window.onload;window.onload = function () { if(cornerOnload) cornerOnload(); if(isIE){addIECorners(); }else {addCorners();}}
// End -->


