// ************************************************************************
// VARIABELEN
// ************************************************************************

// ------------------------------------------------------------------------
// AFBEELDINGEN: array, afbeeldingen
// ------------------------------------------------------------------------
var afbeeldingen= new Array(

// Koert's afbeeldingen:

new Array('KS_ST_01',' ',1,'800','303',''),
new Array('KS_ST_02',' ',1,'600','400',''),

// STRIP, Mo en Maatje

new Array('MM_ST_01',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_02',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_03',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_04',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_05',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_06',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_07',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_08',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_09',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_10',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_11',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),
new Array('MM_ST_12',' ',1,'800','1081','xxxxx<br>In opdracht van Onwijs, voor het project schatverhalen.nl'),


// STRIP, Zap&Ko:

new Array('ZK_ST_01',' ',1,'800','1050','Strip: "Zap en Ko" nr.01 "File"<br>In opdracht van VeertienElf Media voor SAP Nederland'),
new Array('ZK_ST_02',' ',1,'800','1050','Strip: "Zap en Ko" nr.02 "Luchtballon"<br>In opdracht van VeertienElf Media voor SAP Nederland'),
new Array('ZK_ST_03',' ',1,'800','1050','Strip: "Zap en Ko" nr.03 "Klantenparkeerplaats"<br>In opdracht van VeertienElf Media voor SAP Nederland'),
new Array('ZK_ST_04',' ',1,'800','1050','Strip: "Zap en Ko" nr.04 "Safari"<br>In opdracht van VeertienElf Media voor SAP Nederland'),
new Array('ZK_ST_05',' ',1,'800','1049','Strip: "Zap en Ko" nr.05 "Verenigingsleven"<br>In opdracht van VeertienElf Media voor SAP Nederland'),


// STRIP, Rex:

new Array('RX_ST_01',' ',1,'800','271','Strip: "Rex" nr.01 "Vlinder"<br>Voor Metro Nieuws'),
new Array('RX_ST_02',' ',1,'800','272','Strip: "Rex" nr.02 "Verkeerd verbonden"<br>Voor Metro Nieuws'),
new Array('RX_ST_03',' ',1,'800','272','Strip: "Rex" nr.03 "Zonvakantie"<br>Voor Metro Nieuws'),
new Array('RX_ST_04',' ',1,'800','276','Strip: "Rex" nr.04 "Allergie"<br>Voor Metro Nieuws'),
new Array('RX_ST_05',' ',1,'800','279','Strip: "Rex" nr.05 "Strijkconcert"<br>Voor Metro Nieuws'),

// STRIP, Alchemie:

// new Array('AL_ST_01',' ',1,'800','1049','Strip: "Alchemie" nr.01 "Goud"<br>Vrij werk. Gepubliceerd in stripblad "Stripnieuws".'),
// new Array('AL_ST_02',' ',1,'800','1049','Strip: "Alchemie" nr.02 "Ketter"<br>Vrij werk. Gepubliceerd in stripblad "Stripnieuws".'),
// new Array('AL_ST_03',' ',1,'800','1051','Strip: "Alchemie" nr.03 "Prullaria"<br>Vrij werk. Gepubliceerd in stripblad "Stripnieuws".'),
// new Array('AL_ST_04',' ',3,'800','1051','Strip: "Alchemie" nr.04 "Lood en Goud" pagina 1 van 3<br>Vrij werk. Gepubliceerd in stripblad "Stripnieuws".'),
// new Array('AL_ST_05',' ',0,'800','1051','Strip: "Alchemie" nr.04 "Lood en Goud" pagina 2 van 3<br>Vrij werk. Gepubliceerd in stripblad "Stripnieuws".'),
// new Array('AL_ST_06',' ',0,'800','1055','Strip: "Alchemie" nr.04 "Lood en Goud" pagina 3 van 3<br>Vrij werk. Gepubliceerd in stripblad "Stripnieuws".'),


// ILLUSTRATIES:

new Array('KS_IL_01',' ',1,'640','400',''),
new Array('KS_IL_02',' ',1,'800','400',''),
new Array('KS_IL_03',' ',1,'550','400',''),
new Array('KS_IL_04',' ',1,'800','400',''),
new Array('KS_IL_05',' ',1,'800','400',''),
new Array('KS_IL_06',' ',1,'800','400',''),
new Array('KS_IL_07',' ',1,'700','400',''),
new Array('KS_IL_08',' ',1,'613','400',''),
new Array('KS_IL_09',' ',1,'556','400',''),
new Array('KS_IL_10',' ',1,'400','400',''),
new Array('KS_IL_11',' ',1,'685','400',''),
new Array('KS_IL_12',' ',1,'800','345',''),
new Array('KS_IL_13',' ',1,'800','400',''),
new Array('KS_IL_14',' ',1,'632','400',''),
new Array('KS_IL_15',' ',1,'700','400',''),
new Array('KS_IL_16',' ',1,'800','400',''),

// CARTOONS, Inside Information:

// new Array('II_CA_01',' ',1,'431','400',''),
new Array('II_CA_02',' ',1,'469','400',''),
new Array('II_CA_03',' ',1,'468','400',''),
new Array('II_CA_04',' ',1,'458','400',''),

// CHARACTERS:

// new Array('KS_CH_01',' ',1,'288','400',''),
new Array('KS_CH_02',' ',1,'421','400',''),
new Array('KS_CH_03',' ',1,'299','400',''),
new Array('KS_CH_04',' ',1,'362','400',''),
new Array('KS_CH_05',' ',1,'692','400',''),

// OVERIG:

// new Array('KS_OW_01',' ',1,'345','400',''),
new Array('KS_OW_02',' ',1,'702','400',''),
new Array('KS_OW_03',' ',1,'392','400',''),
new Array('KS_OW_04',' ',1,'497','400',''),
// new Array('KS_OW_05',' ',1,'712','400',''),
new Array('KS_OW_06',' ',1,'647','400',''),
new Array('KS_OW_07',' ',1,'442','400','Een "PaarseKrokodillesinterklaastaart", in opdracht van Sira Consulting.')
// new Array('KS_OW_08',' ',1,'458','400','')


);


// ------------------------------------------------------------------------
// AS_AFBEELDINGEN: associatief array bij afbeeldingen
// ------------------------------------------------------------------------
var as_afbeeldingen= new Array();


// init as_afbeeldingen
for (t=0;t<afbeeldingen.length;t++)
{ as_afbeeldingen[afbeeldingen[t][0]]=t;
};


// ------------------------------------------------------------------------
// MENU: array, menuitems
// ------------------------------------------------------------------------

var menu= new Array(
// new Array(  'h', 'welkom',        ''),
//  new Array('s', 'praatdoos',  ''),
new Array(  'h', 'werk',         ''),
  new Array('s', 'strips',		'fs_presentatie'),
  new Array('s', 'illustraties',	'fs_presentatie'),
  new Array('s', 'cartoons',		'fs_presentatie'),
  new Array('s', 'characters',		'fs_presentatie'),
  new Array('s', 'overig',		'fs_presentatie'),
//  new Array(  'h', 'nieuws',          ''),
//  new Array('s', 'nieuwsbrief',     ''),
new Array(  'h', 'info',      ''),
//  new Array('s', 'kontaktopnemen',  ''),
//  new Array('s', 'offerte',         ''),
//  new Array('s', 'snelservice',     ''),
//  new Array('s', 'voorwaarden',     ''),
//  new Array('s', 'copyright',       ''),
// new Array(  'h', 'gastenboek',      ''),
new Array(  'h', 'links',           '')
);

// ------------------------------------------------------------------------
// MENUVARIABELEN: globale variabelen bij menu
// ------------------------------------------------------------------------
var menuid='strips';

// ------------------------------------------------------------------------
// AS_MENU: associatief array bij menu
// ------------------------------------------------------------------------

var as_menu= new Array();

// init as_menu
for (t=0;t<menu.length;t++)
{ as_menu[menu[t][1]]=t;
};

// ------------------------------------------------------------------------
// AS_PRESINFO: associatief array, presentatie informatie
// ------------------------------------------------------------------------

var as_presinfo= new Array();
as_presinfo['cartoonarchief']= new Array('AR',1,'Cartoon-archief',       'ca-groep','');
as_presinfo['paardenarchief']= new Array('PA',1,'Paarden-archief',       'pa-groep','');
as_presinfo['strips'        ]= new Array('ST',2,'Strips',                'we-groep','');
as_presinfo['cartoons'      ]= new Array('CA',2,'Cartoons',              'we-groep','');
as_presinfo['illustraties'  ]= new Array('IL',2,'Illustraties',          'we-groep','');
as_presinfo['overig'        ]= new Array('OW',2,'Overig',                'we-groep','');
as_presinfo['characters'    ]= new Array('CH',2,'Characters',            'we-groep','');
as_presinfo['jandirk'       ]= new Array('JB',1,'Jan Dirk barreveld',    'te-groep','I');
as_presinfo['rob'           ]= new Array('RD',1,'Rob Derks',             'te-groep','I');
as_presinfo['rene'          ]= new Array('RL',1,'Leisink',          'te-groep','I');
as_presinfo['koert'         ]= new Array('KS',1,'Koert Stavenuiter',     'te-groep','I');
as_presinfo['michiel'       ]= new Array('MV',1,'Michiel van de Vijver', 'te-groep','I');
as_presinfo['studiowerk'    ]= new Array('SW',1,'Studiowerk',            'sw-groep','');


// ------------------------------------------------------------------------
// AS_GROEP: associatief array, presentatiegroep
// ------------------------------------------------------------------------
var as_groep= new Array();
as_groep['ca-groep']= new Array('LS', 0,'DAT','N','');
as_groep['pa-groep']= new Array('LS', 0,'OMS','N','');
as_groep['we-groep']= new Array('LS',1,'OMS','J','');
as_groep['te-groep']= new Array('CAT',2,'OMS','J','');
as_groep['sw-groep']= new Array('CAT',2,'TKS','J','');
as_groep['mu-groep']= new Array('CAT',2,'OMS','N','');



// ------------------------------------------------------------------------
// AS_STRING: associatief array, strings
// ------------------------------------------------------------------------
var as_string= new Array();
as_string['TKN']= 'Tekenaar';
as_string['TKS']= 'Tekenaars';
as_string['CAT']= 'Categorie';
as_string['OMS']= ' ';
as_string['GTD']= 'Getekend door';
as_string['DAT']= 'Datum';
as_string['LS']= '';


// ------------------------------------------------------------------------
// AS_CODEINFO: associatief array, strings
// ------------------------------------------------------------------------
var as_codeinfo= new Array();
as_codeinfo['AR']= new Array('Cartoon-archief'      ,'L','cartoonarchief');
as_codeinfo['PA']= new Array('Paarden-archief'      ,'L','paardenarchief');
as_codeinfo['ST']= new Array('Strips'               ,'L','strips');
as_codeinfo['CA']= new Array('Cartoons'             ,'L','cartoons');
as_codeinfo['IL']= new Array('Illustraties'         ,'L','illustraties');
as_codeinfo['OW']= new Array('werk'                 ,'L','overig');
as_codeinfo['JB']= new Array('Jan Dirk Barreveld'   ,'L','jandirk');
as_codeinfo['RD']= new Array('Rob Derks'            ,'L','rob');
as_codeinfo['RL']= new Array('Leisink'         ,'L','rene');
as_codeinfo['KS']= new Array('Koert Stavenuiter'    ,'L','koert');
as_codeinfo['MV']= new Array('Michiel van de Vijver','L','michiel');
as_codeinfo['SW']= new Array('Studiowerk'           ,'L','studiowerk');
as_codeinfo['MU']= new Array('Mummies'              ,'L','mummies');
as_codeinfo['CH']= new Array('Characters'           ,'L','characters');


// ------------------------------------------------------------------------
// preload alle afbeeldingen voor menu
// ------------------------------------------------------------------------

 var menuafbeelding= new Array();
 for (a=0; a<menu.length; a++){
  menuafbeelding[a]= new Array(4);
  menuafbeelding[a][0]= 'afb'+a;
  menuafbeelding[a][1]= new Image();
  menuafbeelding[a][1].src= 'sitegfx/'+menu[a][1]+'_1.gif';
  menuafbeelding[a][2]= new Image();
  menuafbeelding[a][2].src= 'sitegfx/'+menu[a][1]+'_2.gif';
  menuafbeelding[a][3]= new Image();
  menuafbeelding[a][3].src= 'sitegfx/'+menu[a][1]+'_3.gif';
  menuafbeelding[a][4]= new Image();
  menuafbeelding[a][4].src= 'sitegfx/'+menu[a][1]+'_titel.gif';
 };

// var blanco= new Image();
// blanco.src='sitegfx/blanco.gif';
// var welkom= new Image();
// welkom.src='sitegfx/welkom_titel.gif';

var randomarray= new Array();
for(t=0;t<100;t++){
  randomarray[t]= Math.random();
};

// ------------------------------------------------------------------------
// presdata
// ------------------------------------------------------------------------
var presdata= new Array();


// ------------------------------------------------------------------------
// biostrings	
// ------------------------------------------------------------------------
var as_biostrings= new Array();

// Koert
as_biostrings['koert']='Koert Stavenuiter (Vlissingen, 1974)<br><br>Toen Koert Stavenuiter een jaar of 10 was, wilde hij niets liever dan striptekenaar worden. Grote inspiraties waren strips als: \'Oktoknopie\', \'Cor Daad\' en \'Gilles de Geus\'. Voor de schoolkrant van de middelburgse basisschool \'de Rosenburch\' tekende hij toen de strip \'Lerk Lummel\'. Enkele strips volgden maar helaas raakte het striptekenen hoe langer hoe meer op de achtergrond.<br>Na de HAVO en militaire dienstplicht ging Koert Hogere Informatica studeren aan de Fontys Hogescholen in Eindhoven. In 2000, tegen het einde van deze studie, pakte Koert het tekenen weer op. Dit resulteerde vrij snel in de wekelijkse strook-strip \'Villa Ranzigt\' voor het universiteitsblad \'de Cursor\' van de Technische Universiteit Eindhoven.<br>Via stripbeurzen ontmoette Koert een aantal redaktieleden en striptekenaars van het blad \'de Stripper\'. Samen met deze tekenaars werd op 10 april 2001 \'Studio Noodweer\' opgericht, waar hij nu nog steeds tekent voor diverse opdrachtgevers.';

// ------------------------------------------------------------------------
// linkregels
// ------------------------------------------------------------------------

var linkregels= new Array(
new Array('http://strip.startkabel.nl','L','strip.startkabel.nl','<b>strip.startkabel.nl</b><br>een hele hoop stripgerelateerde links.'),
new Array('http://strips.2link.be','L','strips.2link.be','<b>strips.2link.be</b><br>Belgische site met vele striplinks.'),
new Array('http://www.stripnieuws.nl/','L','www.stripnieuws.nl','<b>www.stripnieuws.nl</b><br>Het stripinformatieblad waarin de strip alchemie ooit debuteerde.'),
new Array('http://www.devreemdezaak.nl/','L','www.devreemdezaak.nl','<b>www.devreemdezaak.nl</b><br>DE Zutphense stripwinkel. Voor hun site heb ik enkele afbeeldingen mogen verzorgen.'),
new Array('http://strips.startpagina.be','L','strips.startpagina.be','<b>strips.startpagina.be</b><br>Een belgische startpagina voor strips.'),
new Array('http://www.eppo.nl/','L','http://www.eppo.nl','<b>www.eppo.nl</b><br>De site van de stripwinkel uit Eindhoven, Eppo.'),
new Array('http://illustratoren.pagina.nl/','L','http://illustratoren.pagina.nl/','<b>illustratoren.pagina.nl</b><br>Alle illustratie-gerelateerde links bij elkaar.'),
new Array('http://www.linkelink.nl/strips.htm','L','http://www.linkelink.nl','<b>http://www.linkelink.nl</b><br>Startpagina met een grote hoeveelheid links, waaronder ook striplinks.'),
new Array('http://www.strips.be','L','www.strips.be','<b>www.strips.be</b><br>Nieuw verschenen  nederlandstalige strips en een online database van maar liefst  80.000 uitgaven.'),

new Array('http://www.cartoonharry.nl','L','http://www.cartoonharry.nl','<b>www.cartoonharry.nl</b><br>Site van Cartoon Harry.')



// new Array('http://www.hungersite.com/','P','hungersite_banner.gif','<b>www.hungersite.com</b><br>Doneer hier gratis voedsel betaald door sponsors.')
// new Array('http://www.stripster.nl/','P','stripster_banner.gif','<b>www.stripster.nl</b><br>De site met strips en informatie uit de smallpress wereld'),
// new Array('http://www.comicbase.nl/','P','comicbase_banner.gif','<b>www.comicbase.nl</b><br>Comicbase. Nieuws over strips en beeldcultuur door Jeroen Mirc'),
// new Array('http://www.devreemdezaak.nl/','P','vreemdezaak_banner.gif','<b>www.devreemdezaak.nl</b><br>Site van de leukste stripboekenwinkel van Zutphen.'),
// new Array('http://illustratoren.pagina.nl/','P','Illustratoren_banner.gif','<b>illustratoren.pagina.nl</b><br>Heel veel linkjes naar andere illustratoren.'),
// new Array('http://www.xs4all.nl/~rslegt/','P','officieuze_banner.gif','<b>www.xs4all.nl/~rslegt</b><br>de Officieuze strippagina van Remco Slegtenhorst.'),
// new Array('http://www.awi.nl/cookie/','P','cookie_banner.gif','<b>http://www.awi.nl/cookie/</b><br>De site van de enige echte Cookie. Prachtig werk!')

);

var linkstring;

// ************************************************************************
// FUNKTIES
// ************************************************************************

// ------------------------------------------------------------------------
// hetwerkt
// ------------------------------------------------------------------------

function hetwerkt(){
 alert('het werkt!');
}


// ------------------------------------------------------------------------
// popup
// ------------------------------------------------------------------------

function popup(url){
 h=250;
 w=400;
 winl= (screen.width-w)/2;
 wint= (screen.height-h)/2;

 win= window.open(url, 'popupje', 'top='+wint+'left='+winl+'location=no,width='+w+',height='+h+',scrollbars=yes,resizable=yes'); 
}


// ------------------------------------------------------------------------
// maaklinkstring
// ------------------------------------------------------------------------

function maaklinkstring(){
 linkstring='';
 linkstring= linkstring+ '<HTML><HEAD></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000">';
 linkstring= linkstring+ '<BR><CENTER><IMG SRC="sitegfx/snverlinkt.gif"></CENTER><BR><BR>';
 linkstring= linkstring+ '<TABLE WIDTH="600" BORDER="0" CELLSPACING="0" CELPADDING="0" ALIGN="center">';
 for (t=0;t<linkregels.length;t++){
  linkstring= linkstring+ '<TR>';
  linkstring= linkstring+ '<TD ALIGN="center" HEIGHT="80" WIDTH="250"><A HREF="'+linkregels[t][0]+'" TARGET="_new">';
  if (linkregels[t][1]=='P'){
   linkstring= linkstring+ '<IMG SRC="sitegfx/'+linkregels[t][2]+'" BORDER="0"></A></TD>';
  }
  else{
   linkstring= linkstring+ linkregels[t][2]+'</A></TD>';
  }
  linkstring= linkstring+ '<TD HEIGHT="80" WIDTH="350" VALIGN="middle"><font size=3 face="Arial, Helvetica, sans-serif" color=#000000>'+linkregels[t][3]+'</font></TD>';
  linkstring= linkstring+ '</TR>';
 }
 linkstring= linkstring+ '</TABLE></BODY></HTML>';
};


// ------------------------------------------------------------------------
// laadlinks:
// ------------------------------------------------------------------------

function laadlinks(){
 maaklinkstring();
 top.fr_hoofd.document.open();
 top.fr_hoofd.document.write(linkstring);
 top.fr_hoofd.document.close();
};


// ------------------------------------------------------------------------
// randomnummer:
// ------------------------------------------------------------------------
function randomnummer(nr,l){
  while(nr>99){nr=nr-100};
  return(Math.floor(randomarray[nr]*l));
};


// ------------------------------------------------------------------------
// overvan:
// ------------------------------------------------------------------------
//function overvan(index,taak)
//{ if(taak==0){
//   top.fr_menu.document.images[menuafbeelding[index][0]].src=top.menuafbeelding[index][1].src;
//  }
//  else{
//   top.fr_menu.document.images[menuafbeelding[index][0]].src=top.menuafbeelding[index][2].src;
//  }
//}


// ------------------------------------------------------------------------
// wijzigmenu:
// ------------------------------------------------------------------------
function wijzigmenu(id){
 menuid= id;
 if (id!=''){
  si= as_menu[id];
  oi= si;
  while(menu[oi][0]=='s'){
   oi--;
  }
 }
 else{
  si= -1;
  oi= -1;
 }
 top.fr_menu.document.open();
 top.fr_menu.document.writeln('<HTML><HEAD></HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 BGCOLOR="#FFFFFF" TEXT="#000000">');
 omt='';
 for (hi=0; hi<menu.length; hi++){
  if (hi==oi){
   sm= true;
  }
  else{
   if ((menu[hi][0]=='h')){
    sm= false;
    if(omt=='s'){
     top.fr_menu.document.write('<A><IMG SRC="sitegfx/blanco.gif" BORDER=0></A><BR>');
    }
   }
  }
  if((menu[hi][0]=='h')||(sm==true)){
   omt=menu[hi][0];
   if (hi==si){
    top.fr_menu.document.write('<A><IMG SRC="sitegfx/'+menu[hi][1]+'_3.gif" '+'BORDER=0 NAME="afb'+hi+'"></A><BR>');
   }
   else{
//    top.fr_menu.document.write('<A HREF="javascript:top.wijzigmenu(\''+menu[hi][1]+'\');" onMouseover="top.overvan('+hi+',1);" onMouseout="top.overvan('+hi+',0);"><IMG SRC="sitegfx/'+menu[hi][1]+'_1.gif" BORDER=0 NAME="afb'+hi+'"></A><BR>');
    top.fr_menu.document.write('<A HREF="javascript:top.wijzigmenu(\''+menu[hi][1]+'\');"><IMG SRC="sitegfx/'+menu[hi][1]+'_1.gif" BORDER=0 NAME="afb'+hi+'"></A><BR>');

   }
  }
 }

 top.fr_menu.document.close();
 if(id!=''){
  top.fr_titel.document.images['titelafbeelding'].src= top.menuafbeelding[si][4].src;
  if (menu[si][2]!=''){
   top.fr_hoofd.location= menu[si][2]+'.html';
  }
  else{
   (top.fr_hoofd.location= menu[si][1]+'.html');
  }
 }
 else{
  top.fr_titel.document.images['titelafbeelding'].src= "sitegfx/welkom_titel.gif";
  top.fr_hoofd.location= 'welkom.html';
 }
}


// ------------------------------------------------------------------------
// laadpresnav:
// ------------------------------------------------------------------------
function laadpresnav(){

 with(top.fr_hoofd.fr_presnav.document){
  open();
  writeln('<HTML><HEAD><TITLE></TITLE></HEAD>');
  writeln('<BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 BGCOLOR="#FFFFFF" TEXT="#000000">');

  writeln('<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" HEIGHT=100 bgcolor="#BABABA" align="left">');
  writeln('<TR>');
    writeln('<TD width="80%" align="center" valign="middle">');
        writeln('<FORM NAME="theform">');
        writeln('<SELECT NAME="theselect" size="1" onchange="top.wijzigpresentatie(theform.theselect.options[selectedIndex].value);">');
          if (as_presinfo[menuid][4]=='I'){
           writeln('<OPTION VALUE="introductie">- introductie -</OPTION>');
          }
          for(t=0;t<presdata.length;t++){
           writeln('<OPTION VALUE="'+presdata[t]+'">'+presdata[t]+'</OPTION>');
          }
        writeln('</SELECT>');
        writeln('</FORM>');
        writeln('<A HREF="javascript:top.wijzigpresentatie(\'vorige\');"><img src="sitegfx/links.gif" border=0></A>');
        writeln('<A HREF="javascript:top.top.wijzigpresentatie(\'volgende\');"><img src="sitegfx/rechts.gif" border=0></A>');


    writeln('</TD>');
    writeln('<TD bgcolor="#FFFFFF">');
        writeln('&nbsp;');
    writeln('</TD width="20%">');
  writeln('</TR>');
  writeln('</TABLE>');

  writeln('</BODY></HTML>');
  close();
 }
}


// ------------------------------------------------------------------------
// decodeer: die een deel van de xx-xx-xx code teruggeeft
// ------------------------------------------------------------------------
function decodeer(string,veld){
 switch(veld){
  case(1): {p1=0; p2=2;} break;
  case(2): {p1=3; p2=5;} break;
  case(3): {p1=6; p2=8;} break;
 }
 return(string.substring(p1,p2));
}


// ------------------------------------------------------------------------
// laadpresentatie:
// ------------------------------------------------------------------------

function laadpresentatie(){

var temp1= new Array();
var temp2= new Array();
// normaleselectie
 function normaleselectie(){
  presdata.length=0;
  sleutel= as_presinfo[menuid][0];
  veld= as_presinfo[menuid][1];
  s= 0;
  for(a= 0; a<afbeeldingen.length; a++){
   code= afbeeldingen[a][0];
   if(decodeer(code,veld)==sleutel){
    presdata[s]= afbeeldingen[a][0];
    s++;
   }
  }
 }

// shuffleselectie
 function shuffleselectie(){
  temp1.length=0;
  sleutel= as_presinfo[menuid][0];
  veld= as_presinfo[menuid][1];
  s= 0;
  for(a= 0; a<afbeeldingen.length; a++){
   code= afbeeldingen[a][0];
   if(decodeer(code,veld)==sleutel){
    temp1[s]= new Array(afbeeldingen[a][0],afbeeldingen[a][1],afbeeldingen[a][2],0);
    //  0:afd_id, 1:voorkeur, 2:volgorde, 3:hulpveld
    s++;
   }
  }
  // shuffle de selectie
  for(t=0;t<temp1.length;t++){
//   rnd= Math.floor(Math.random()*temp1.length);
//   alert(randomnummer(t,temp1.length));
   rnd=randomnummer(t+as_menu[menuid],temp1.length);
   while((temp1[rnd][3]!=0)||(temp1[rnd][2]==0)){
    rnd++;
    if(rnd==temp1.length){
     rnd=0;
    }
   }
   voorkeur=temp1[rnd][1];
   temp2[t]=new Array(temp1[rnd][0],voorkeur);
   temp1[rnd][3]=1;
   door=true;
   u=1;
   while(door){
    if(rnd+u<temp1.length){
     if(temp1[rnd+u][2]==0){
      temp2[t+u]= new Array(temp1[rnd+u][0],voorkeur);
      temp1[rnd+u][3]=1;
      u++;
     }
     else{
     door= false;
     }
    }
    else{
     door= false;
    }
   }
   t=t+u-1;
  }
  temp1.length=0; // ruim temp1 op

  //zet voorkeuren vooraan
  presdata.length=0;
  i=0;
  for(t=0;t<temp2.length;t++){
   if(temp2[t][1]=='v'){
    presdata[i]=temp2[t][0];
    i++;
   }
  }
  for(t=0;t<temp2.length;t++){
   if(temp2[t][1]!='v'){
    presdata[i]=temp2[t][0];
    i++;
   }
  }
  temp2.length=0; // ruim temp2 op
 };


// ------------------------------------------------
// body laadpresentatie
// ------------------------------------------------
 if (as_groep[as_presinfo[menuid][3]][3]=='J'){
  shuffleselectie();
 }
 else{
  normaleselectie();
 };
 laadpresnav();
 wijzigpresentatie('introductie');
// showpresdata();
}


function wijzigpresinfo(string){
 if(string!='introductie'){
  veld1a= as_string[as_groep[as_presinfo[menuid][3]][0]];
  if(veld1a!=''){
   if(as_codeinfo[decodeer(string,as_groep[as_presinfo[menuid][3]][1])][1]=='L'){
    veld1b='<A HREF="javascript:top.wijzigmenu(\''+as_codeinfo[decodeer(string,as_groep[as_presinfo[menuid][3]][1])][2]+'\');">'+as_codeinfo[decodeer(string,as_groep[as_presinfo[menuid][3]][1])][0]+'</A>';
  //  alert(veld1b);
   }
   else{
    veld1b= as_codeinfo[decodeer(string,as_groep[as_presinfo[menuid][3]][1])][0];
   }
  }
  else{
   veld1b='';
  }
  veld2a= as_string[as_groep[as_presinfo[menuid][3]][2]];
  if(veld2a!=''){
  veld2b= afbeeldingen[as_afbeeldingen[string]][5];
  }
  else{
   veld2b='';
  }
 }
 else
 { veld1a='&nbsp;';
   veld1b='&nbsp;';
   veld2a='&nbsp;';
   veld2b='&nbsp;';
 }

 with(top.fr_hoofd.fr_presinfo.document){
  open();
  writeln('<HTML><HEAD><TITLE></TITLE><link rel="stylesheet" href="styles.css" type="text/css"></HEAD>');
  writeln('<BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 BGCOLOR="#FFFFFF" TEXT="#000000">');
  writeln('<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" HEIGHT=100 bgcolor="#BABABA" align="right">');
  writeln('<TR>');
    writeln('<TD height=26 WIDTH="6%" bgcolor="#FFFFFF">');
      writeln('&nbsp;');
    writeln('</TD>');
    writeln('<TD height=26 valign="bottom" WIDTH="150" CLASS="tekst_b">');
      writeln('<div>'+veld1a+'</div>');
    writeln('</TD>');
    writeln('<TD height=26 valign="bottom" WIDTH="60%" CLASS="tekst_n">');
      write('<div>'+veld1b+'</div>');
    writeln('</TD>');
  writeln('</TR>');
  writeln('<TR>');
    writeln('<TD height=49 WIDTH="6%" bgcolor="#FFFFFF">');
      writeln('&nbsp;');
    writeln('</TD>');
    writeln('<TD height=49 valign="top" WIDTH="150" CLASS="tekst_b">');
      writeln('<div>'+veld2a+'</div>');
    writeln('</TD>');
    writeln('<TD height=49 valign="top" WIDTH="60%" CLASS="tekst_b">');
      write('<div>'+veld2b+'</div>');
    writeln('</TD>');
  writeln('</TR>');
  writeln('</TABLE>');
  writeln('</BODY></HTML>');
  close();
 }
};


// ------------------------------------------------------------------------
// wijzigpresentatie:
// ------------------------------------------------------------------------
function wijzigpresentatie(string){
 switch(string){
  case('vorige'):{
   with(top.fr_hoofd.fr_presnav.document.theform.theselect){
    if(selectedIndex>0){
     selectedIndex--;
     focus();
     wijzigpresentatie(options[selectedIndex].value);
    }
   }
  }
  break;
  case('volgende'):{
   with(top.fr_hoofd.fr_presnav.document.theform.theselect){
    if(selectedIndex<options.length-1){
     selectedIndex++;
     focus();
     wijzigpresentatie(options[selectedIndex].value);
    }
   }
  }
  break;
  case('introductie'):{
//   top.fr_hoofd.fr_presafb.location= menuid+'.html';
   if (as_presinfo[menuid][4]=='I'){
    with(top.fr_hoofd.fr_presafb.document){
     open();
     write('<html><head><title></title><link rel="stylesheet" href="noodweer.css" type="text/css"></head><body bgcolor="#FFFFFF" text="#000000"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><tr><td align="center" valign="middle"><table width="600" border="0" cellspacing="0" cellpadding="0" height="300"><tr><td align="left" valign="top"><img src="sitegfx/'+menuid+'_bio.jpg" align="right" hspace="10"><span class="kop">'+'Biografie'+'</span><br><br><span class="tekst">'+as_biostrings[menuid]+'</span></td></tr></table></td></tr></table></body></html>');
     close();
    }
    wijzigpresinfo(string);
   }
   else{
    wijzigpresentatie(presdata[0]);
   }
  }

  break;
  default:{
   with(top.fr_hoofd.fr_presafb.document){
    open();

    rb_h = 50;
    rb_b = 25;
    lo_h = 25;
    lo_b = 50;
    ro_h = 25;
    ro_b = 25;

    pl_b = afbeeldingen[as_afbeeldingen[string]][3];
    pl_h = afbeeldingen[as_afbeeldingen[string]][4];

    th= pl_h + rb_h + ro_h;
    tb= pl_b + lo_b + ro_b;

    vh= pl_h - rb_h;
    vb= rb_b;

    hh= lo_h;
    hb= pl_b - lo_b;

    write('<HTML><HEAD><TITLE></TITLE></HEAD><BODY BGCOLOR="FFFFFF"><CENTER>');
    write('<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><tr><td align="center" valign="middle"><table width="'+pl_b+'" border="0" cellspacing="0" cellpadding="0" height="'+pl_h+'" align="center"><tr><td colspan="2" rowspan="2"><img src="afbeeldingen/'+string+'.jpg" width="'+pl_b+'" height="'+pl_h+'" vspace="0" hspace="0" align="right"></td><td width="'+rb_b+'" height="'+rb_h+'" valign="bottom"><img src="sitegfx/rb.gif" width="'+rb_b+'" height="'+rb_h+'" vspace="0" hspace="0" align="left"></td></tr><tr><td width="'+vb+'" height="'+vh+'" valign="bottom"><img src="sitegfx/ver.gif" width="'+vb+'" height="'+vh+'" vspace="0" hspace="0" align="bottom"></td></tr><tr><td width="'+lo_b+'" height="'+lo_h+'"><img src="sitegfx/lo.gif" width="'+lo_b+'" height="'+lo_h+'" vspace="0" hspace="0" align="right"></td><td width="'+hb+'" height="'+hh+'" align="left" valign="bottom"><img src="sitegfx/hor.gif" width="'+hb+'" height="'+hh+'" vspace="0" hspace="0" align="right"></td><td width="'+ro_b+'" height="'+ro_h+'" align="left" valign="bottom"><img src="sitegfx/ro.gif" width="'+ro_b+'" height="'+ro_h+'" vspace="0" hspace="0" align="left"></td></tr></table></td></tr></table>');

//
//    write('<TABLE WIDTH="100%" height="100%"><TR><TD VALIGN="MIDDLE" ALIGN="CENTER">');
//    write('<IMG SRC="afbeeldingen/'+string+'.jpg" BORDER=0>');
//    write('</TR></TD></TABLE>');

   write('</CENTER></BODY></HTML>');
    close();
    wijzigpresinfo(string);
   }
  }
 }
};