//'algemene scripts Iederwijs-site
var sDebug = "";      //' OOK WEGHALEN UIT "function W()"
function Debug(){
 document.write("<TEXTAREA id='textarea1' name='textarea1' COLS=400 ROWS=8>"+ sDebug +"</TEXTAREA>");
}

//'Framehoogtes, breedtes etc. reguleren
var SWidth = screen.availWidth;
var sHeight = screen.availHeight-320;
var cWidth = 85;  // moet altijd oneven getal zijn!! => komt terug op verschillende soorten pagina's (index, inhoud-pagina's, categorie-pagina's etc.)
var cWidthMenuLinks = 150;
var cLeft = (101-cWidth)/2;
var cRight = 90       // ruimte die nodig is voor linker kantlijn
var cKantlijn = 190;  // ruimte nodig voor rechter kantlijn (menu)
var cMidden = 25;
var cLeftPixels = parseInt((SWidth*cLeft)/cWidth,10); 
var cLeftPerc = parseInt((cKantlijn+cMidden+cLeftPixels)/SWidth*100,10)+1;  // uitlijnen Titel (op categorie-pagina's)!

var iMenuC = 12; // deze constante bepaald na hoeveel enters het Iederwijsje.gif komt
//

var sBGImage = "..\/include\/lente.jpg";
var sBullet = "..\/include\/bullet1.gif";
var sBgLinks = "..\/include\/bglinks.gif";
var sBg = "..\/include\/bg.gif";
var sBgRight = "..\/include\/bgright.gif";
var cFontSize = 10;


//'Write-functie
function W(strHTML){
document.write(strHTML);
sDebug = sDebug+strHTML+"\n"; //Voor debugging
}
//

function TimeToInt(Date){
return (Date.getHours()*60*24)+(Date.getMinutes()*60)+Date.getSeconds();
}

//'CONSTANTEN VOOR EENVOUDIGE AANPASSINGEN AAN LAYOUT
var cFont = "verdana, arial, san serif";
var cMenuLink = 9;
var cText = "#000000";
var cBackground = "#FFFFFF";

var cLila = "#DDDDEE";
var cLLila = "#EEEEFF";
var cDLila = "#8C8FB8";
var cGrey = "#555555";
var cRood = "#0D0035";
var cBlauw = "#454068";

var cLink = cBlauw;
var cVisited = cBlauw;
var cVisitedSiteMap = cDLila;
var cActive = cDLila;
var cHover = cRood;
var cSteunKleur = cBackground;
var cHR = cBackground;
var cSchaduw = cLila;

var sI = ""  // voor pagina's die inhoud tonen.. zie function StartInhoud() en function Print()
var d = new Date();
var iTime1 = TimeToInt(d);
var iTime2 = 0;
// " onMouseOver=\"window.status=\'\';return true\" onMouseOut=\"window.status=\'\';return true\""
var cBalkBovenLinks = "<B style=\'font-size: 8pt;\'> &nbsp;N&nbsp;&nbsp;E&nbsp;&nbsp;D&nbsp;&nbsp;E&nbsp;&nbsp;R&nbsp;&nbsp;L&nbsp;&nbsp;A&nbsp;&nbsp;N&nbsp;&nbsp;D<\/SPAN>"

//e-mail:
var cMailTo = "mailto:info@iederwijs.nl?SUBJECT=Reactie%20op%20Iederwijs-website"

//Veest:
var sVeest = ""
var sVisie = "" //speciaal voor visie.html..
var cV1 = ""
var cV2 = ""
var cV3 = ""
var cV4 = ""
var cV5 = ""
var cV6 = ""


if (SWidth <= 850) {
iMenuC = 8
cFontSize = 9;
cRight = 80;
}

function IMG800(s800, s1024){
 if (SWidth < 850) {
  W("<IMG src=\'"+s800+"\'>");
 } else {
  W("<IMG src=\'"+s1024+"\'>");
 }
}

function StartHTML(){
W("<HEAD>");
W("  <TITLE>dine & wine<\/TITLE>");
W("  <META NAME='description' CONTENT='www.dine-wine.nl, de beste thuiskok voor uw diner. Van een intiem diner voor twee tot een volledig verzorgt feest voor u en uw gasten. Leuk om kado te doen en nog veel leuker om te krijgen.  ed'>");
W("  <META NAME='keywords' CONTENT='thuiskok,catering,biologisch,restaurant,culinair,koken,lekker,wijn,uit,kookdemonstratie,thuis,wageningen,renkum,arnhem,gelderland,ede,bennekom,veluwe,utrecht,amersfoort,gezellig,feest,feestje,bruiloft,jubileum,liefde,passie,dine,wine,voorgerecht,hoofdgerecht,dessert,taart,ijs,recept,ervaring,experience,kado,gift,ervaringskado,origineel,origineel kado,amuse,tapas,sushi,sashimi,biologisch,'>");
W("  <META NAME='robots' CONTENT='All'>");
W("  <META NAME='revisit-after' CONTENT='7'>\n");
W("  <META NAME='author' CONTENT='J.V. Romijn'>");
W("  <META HTTP-EQUIV='content-type' CONTENT='text\/html; charset=iso-8859-1'>");
W("  <META HTTP-EQUIV='content-script-type' CONTENT='text\/javascript'>");
W("  <LINK REL=\'shortcut icon\' HREF=\'http:\/\/www.dine-wine.nl\/favicon.ico\' TYPE=\'image\/ico\'>");
W("  <STYLE type='text\/css'>");
W("  <!--");
W("  BODY, DIV, P, TABLE, TR, PRE { font-family: " + cFont + "; font-size: " + cFontSize + "pt; color: " + cText + "; line-height: 1.3 }");
W("  #Inhoud     { padding-left: 0em; padding-right: 0.5em; margin-left: 0px ;");
W("           scrollbar-3d-light-color:    "+ cLila +" ;");
W("           scrollbar-arrow-color:       "+ cLila +" ;");
W("           scrollbar-base-color:        "+ cLLila +" ;");
W("           scrollbar-dark-shadow-color: "+ cBlauw +" ;");
W("           scrollbar-face-color:        "+ cLila +" ;");
W("           scrollbar-highlight-color:   "+ cBackground +" ;");
W("           scrollbar-shadow-color:      "+ cBackground +" ;}\n");
W("  BODY      { background: url("+sBGImage+") repeat-y 100% 0% "+cBackground+"; }");
W("  A:link    { text-decoration: none;      font-style: normal; font-weight: bold; color: "+cLink+";    }");
W("  A:visited { text-decoration: none;      font-style: normal; font-weight: bold; color: "+cVisited+"; }");
W("  A:active  { text-decoration: none;      font-style: normal; font-weight: bold; color: "+cActive+";  }");
W("  A:hover   { text-decoration: underline; font-style: normal; font-weight: bold; color: "+cHover+";   }");
W("  #Sitemap  { text-decoration: none; } ");
W("  A.Sitemap:link    { text-decoration: none; font-style: normal; font-weight: normal; color: "+cText+"; }");
W("  A.Sitemap:visited { text-decoration: none; font-style: normal; font-weight: normal; color: "+cVisitedSiteMap+"; }");
W("  A.Sitemap:active  { text-decoration: none; font-style: normal; font-weight: normal; color: "+cBlauw+"; background-color: "+cLila+"}");
W("  A.Sitemap:hover   { text-decoration: none; font-style: normal; font-weight: normal; color: "+cText+"; background-color: "+cLila+"}");
W("  .LikeA    { text-decoration: none;  font-size: 13;  font-style: normal; font-weight: bold; color: "+cRood+"; }");
W("  TABLE     { border-width: 0px; text-valign: top; }");
W("  TD        { text-valign: top; text-align: left;}");
W("  IMG       { border: 0px; margin-right: 15px; }   ");
W("  UL        { margin-left: 17px; margin-top: 0px; margin-bottom: 0px; list-style-position: outside; list-style: url("+sBullet+") circle; }");
W("  H3        { color: "+cGrey+" ; text-align: center;}   ");
W("  H4        { color: "+cGrey+"; }   ");
W("  H5        { color: "+cGrey+"; }   ");
W("  HR        { border-style: none; }   ");
W("  -->");
W("  <\/STYLE>");
W("<\/HEAD><BODY>");
W("<TABLE width=\'100%\'><TR><TD>");
// Hier nog een stukje javascript welke nu niet tussen <SCRIPT>-</SCRIPT> hoeft te staan..
var image = new Image();
image.src = "../include/printer1.gif";
var image1 = new Image();
image1.src = "../include/printer2.gif";
var image2 = new Image();
image2.src = "../include/bullet1.gif";
var image3 = new Image();
image3.src = "http://wwww.iederwijs.nl/favicon.ico";
}

function StopHTML(){
W("<\/TD><TD width=\'"+cRight+"\'>");  // Voor het uitlijnen van de background-repeat (IederwijsBG.jpg)
W("<\/TD><\/TR><\/TABLE><\/BODY><\/HTML>");
}




//'LINK-FUNCTIES -> kan later uitgebreid worden met een systeem waarmee we kunnen scoren hoeveel een bepaalde link wordt gescoord..

function Link(strText, strURL, strColour){
if (strColour+""==""){strColour="";} else {strColour = "' style='color: " + strColour + ";";}
  W("<A href=\'" + strURL +  strColour + "\'>" + strText + "<\/A>");
}

function MenuLink(sText, sURL){
W("<BR>&nbsp;&nbsp;<A href=\'" + sURL + "\'><SPAN style='font-size: "+cMenuLink+"pt; color: "+cBlauw +"'>&bull;&nbsp;" + sText + "<\/SPAN><\/A>");
iMenuC--
}

function SiteLink(sText, sURL){
W("<LI><A CLASS=\'Sitemap\' href=\'" + sURL  + "\'>" + sText + "<\/A><BR>");
}

function CategorieLink(sText, sURL){
if (sURL+"" != "") { W("<A CLASS=\'Sitemap\' href=\'" + sURL  + "\'>")}
W("<SPAN style='text-decoration: none;  font-size: 13;  font-style: normal; font-weight: bold; color: "+cRood+";'>" + sText + "<\/SPAN><\/A><UL>");  // ;class=\'LikeA\'
}

function BalkLink(sText, sURL){
return "<A href=\'" + sURL  + "\'><SPAN STYLE='color: "+cRood+"'>" + sText + "<\/SPAN><\/A>";
}

function Go(sPag,sCat){
var e = new Date();
iTime2 = TimeToInt(e);
var r = document.referrer;
var sG = "?Time1="+iTime1+"&Time2="+iTime2+"&CurrPage="+HuidigePagina+"&CurrCat="+Categorie+"&NextPage="+sPag+"&NextCat="+sCat+"&Ref="+r
alert (sG);
window.location.href = "..\/"+sCat+"\/"+sPag+".html"
}
//





//'STANDAARD FUNCTIE voor weergave van aantal harde spaties en lineBReaks
function Add(iS,sAdd){
var iC = 1;
var str = "";
  for (iC = 0 ; iC <= iS; iC++){
    str = str + sAdd;
  }
return str;
}
function Breaks(iS){
return (Add(iS,"<BR>&nbsp;"))
}
function Spaties(iS){
return (Add(iS,"&nbsp;"))
}
//





//'FUNCTIES VOOR LAYOUT VAN TEKST
//'Inhoudelijke pagina's
var WebPagina = "";
var Categorie = "";
var HoofdTitel = "";
var BalkBovenLinks = BalkLink("Home","..\/algemeen\/index.html");
var BalkBovenMidden = "";
var BalkBovenRechts = "";
var BalkOnderLinks = "<A href=\'javascript:history.back()\'><SPAN CLASS='LikeA'>Terug</SPAN></A>";  //"<A href='javascript:document.location.href=history.back(1)'>Terug</A>";
var BalkOnderMidden = BalkLink("Contact","../algemeen/contact.html");
var BalkOnderRechts = "";

//'Rechte Lijn
function LayoutHR(){
W("   <HR size='2' width=\'" + cWidth + "%\' align='center' color='" + cHR + "'>");
}

//Lichtgekleurde balk (cSteunKleur) op scherm (95%)
function LayoutBalk(strLeft, strMiddle, strRight){
var str= "";
str= str+ "<TABLE align='center' width=\'" + cWidth + "%\' border='0' STYLE='background-color: " + cSteunKleur + ";'>";
str= str+ "  <TR>";
str= str+ "    <TD width='33%' align='left' STYLE='text-align: left; background-color: " + cSteunKleur + ";'><SPAN align='center' class='LikeA'>";
if (strLeft == "") { str= str+ Spaties(20); } else { str= str+ strLeft }
str= str+ "<\/SPAN><\/TD>";
str= str+ "    <TD width='33%' align='center' STYLE='text-align: center; background-color: " + cSteunKleur + ";'><SPAN align='center' class='LikeA'>";
if (strMiddle == "") { str= str+ Spaties(20); } else { str= str+ strMiddle }
str= str+ "<\/SPAN><\/TD>";
str= str+ "    <TD align='right' STYLE='text-align: right; background-color: " + cSteunKleur + ";'><SPAN align='right' class='LikeA'>";
if (strRight== "") { str= str+ Spaties(20); } else { str= str+ strRight }
str= str+ "<\/SPAN><\/TD>";
str= str+ "  <\/TR>"  + "<\/TABLE>"  + "<\/DIV>";
W(str);
}

function LayoutShadowH1(strTekst,sStijl){
var strHTML = "";
strHTML = strHTML + "<H1 STYLE=\""+sStijl+" font-size: 18pt; margin-top: 0px;   margin-left: 0px;  color: " + cSchaduw+ "\">";
strHTML = strHTML + strTekst + "<\/H1>";
strHTML = strHTML + "<H1 STYLE=\""+sStijl+" font-size: 18pt; margin-top: -49px; margin-left: -1px; color: " + cBlauw+ "\">";
strHTML = strHTML + strTekst + "<\/H1>";
W(strHTML);
}

function Koptekst(sT){
LayoutShadowH1(sT," text-align: center;");
}


// bouwt sVeest op.. deze string wordt HTML voor de Areamap welke de Veest opbouwd..
function AddV(sId, sCoords, sV, sTop, sHref){
var sFunc = "eval";
 if (WebPagina == "visie"){ 
  sFunc = "FontSize";
  sVisie = sVisie + "<DIV ID=\'"+sId+"\' NAME=\'"+sId+"\' style=\'font-size: 12pt; \'>"+sV+"<\/DIV><BR>";
 } else {
  sVeest = "<DIV ID=\'"+sId+"\' NAME=\'"+sId+"\' style=\'font-size: 16pt; position: absolute; z-index: 2; top: "+sTop+"px; left: 350px; width: 350px; visibility: hidden; \'>"+sV+"<\/DIV>"+sVeest;
 }
 sVeest = sVeest + "<AREA SHAPE=\'poly\'"+sHref+" COORDS=\'"+sCoords+"\' onmouseover=\'"+sFunc+"Show(\""+sId+"\");\' onmouseout=\'"+sFunc+"Hide(\""+sId+"\");\'>";
}
function Veest(){
var sHref = " href=\'..\/algemeen\/index.html\'";
var sRect = "<AREA SHAPE=\'rect\' COORDS=\'0,0, 246,112\' href=\'..\/algemeen\/index.html\'>";
 sVeest = "<MAP NAME=\'logo\'>";
 if (WebPagina == "index"){ 
  sHref = "";
  sRect = "";
 }
 AddV("v1", "212,31, 231,52, 244,21", cV1, 25, sHref);
 AddV("v2", "210,30, 230,53, 200,58", cV2, 30, sHref);
 AddV("v3", "207,31, 179,34, 199,57", cV3, 35, sHref);
 AddV("v4", "208,29, 180,35, 191,2", cV4, 40, sHref);
 AddV("v5", "210,27, 226,1, 192,1", cV5, 45, sHref);
 AddV("v6", "219,24, 227,0, 245,20", cV6, 50, sHref);
 sVeest = sVeest + sRect + "<\/MAP>";
 W(sVeest);
}
//

function PlaatsLogoGroot(){
W("<TABLE width=\'"+cWidth+"%\'  border=\"0\"><TR><TD height=\"66\">");
W("<DIV align=\'center\' STYLE=\'position: absolute; z-index: 2; top: 2px; left: "+cLeft+"%\'>");

W("    <IMG src=\'..\/include\/logogroot.gif\' USEMAP=\'#logo\'>");
W("</A></DIV>");
W("</TD></TR></TABLE>");
Veest();
}
function PlaatsLogoKlein(){
W("<DIV style=\'position: absolute; z-index: 1; top: 0px; left: "+cLeft+"%;\'>");
W("<A href=\'..\/algemeen\/index.html\'>");
W("<IMG src=\'../include/logoklein.gif\'></A></DIV>");
}
function PlaatsPrinter(){
return "<A href=\"javascript:Print();\" onMouseOver=\"document.printer.src=\'../include/printer1.gif\'; window.status=\'Klik hierop om de gehele pagina te printen.\'; return true;\" onMouseOut=\"document.printer.src=\'../include/printer2.gif\'; window.status=''; return true;\"><IMG id=\'printer\' name=\'printer\'  src=\'../include/printer2.gif\'></A>";
}
//






//VOOR MENU OP INDEX.HTML & CATEGORIEEN
function StartMenu(){
W("<TABLE width=\'"+cWidth+"%\' align=\'center\' border=\'0\'>");
W("  <TR>");
W("    <TD valign=\'top\' width=\'"+cKantlijn+"\' style=\'background-image: url("+sBgLinks+"); background-repeat: repeat-y;\'>");
W("      <DIV STYLE=\'line-height: 1.8em\'>");
}
function PauseMenu(sGif){
if (iMenuC<=0){iMenuC=1 };
W(Breaks(iMenuC));
if (sGif+""=="") { sGif="../include/gras.jpg"}
W("<DIV style=\'text-align: right;\'><IMG src=\'"+sGif+"\'></DIV>");
W("<BR>&nbsp;");
W("      </DIV>");
W("    <\/TD><TD width=\'"+cMidden+"\'>&nbsp;<\/TD>");
W("    <TD valign=\'top\' align=\'left\'>");
}

function StopMenu(){
W("    <\/TD>");
W("  <\/TR>");
W("<\/TABLE>");
LayoutHR();
LayoutBalk (BalkOnderLinks, BalkOnderMidden , BalkOnderRechts);
StopHTML();
}
//



// VOOR CATEGORIE-PAGINA's:
function StartCategorie(){
PlaatsLogoKlein();
W("<TABLE width=\'100%\' border=\'0\'>");
W("  <TR>");
W("    <TD valign=\'top\' width=\'"+(cLeft-1)+"\%' height=\'21\'>&nbsp;<\/TD>");
W("    <TD valign=\'top\' width=\'"+cKantlijn+"\'>&nbsp;<\/TD>");
W("    <TD valign=\'top\' width=\'"+cMidden+"\'>&nbsp;<\/TD>");
W("    <TD valign=\'top\' >"); //width=\'"+(50)+"%\'>");
W("    <\/TD><\/TR><\/TABLE>");
W("<DIV style=\'position: absolute; top: 16px; left: "+cLeftPerc+"%;\'>")
LayoutShadowH1(HoofdTitel,"");
W("</DIV>");
LayoutBalk("","","");
LayoutHR();
StartMenu();
W("<BR>");
}
function CategorieEinde(){
W("<BR><\/UL>");
}
//





//VOOR INHOUD-PAGINA's:
function StartInhoud(){
//W("<TABLE width=\'100%\'><TR><TD>");
Koptekst(HoofdTitel);
if (CategorieTitel != ""){
  if (BalkBovenRechts == "" ){
    BalkBovenRechts = BalkLink(CategorieTitel,"..\/"+Categorie+"\/"+Categorie+".html");
  }
}
LayoutBalk (BalkBovenLinks,BalkBovenMidden,BalkBovenRechts+"</TD><TD width=\'1%\'>"+PlaatsPrinter());
LayoutHR();
W("<TABLE align=\'center\' style=\'WIDTH: "+cWidth+"%\'><TR><TD>");
sI = "Inhoud"
W("<DIV ID=\'"+sI+"\' NAME=\'"+sI+"\' style=\'width: 100%; height: "+sHeight+"; overflow: auto; \'>");
}

function StopInhoud(){
W("<\/DIV>");
W("</TD></TR></TABLE>");
LayoutHR();
LayoutBalk (BalkOnderLinks, BalkOnderMidden , BalkOnderRechts);
StopHTML();
}
//





//ENKEL VOOR SITEMAP..:
function StartKolommen(){
W("<TABLE width=\'"+cWidth+"%\' border=0 VALIGN='top' align='center'>");
//W("  <TR>");
//W("    <TD width='5%'>&nbsp;");
NieuweKolom();
}

function NieuweKolom(){
W("   </TD>");
W("    <TD width=\'33%\' valign=\'top\'>");
}

function StopKolommen(){
W("    <\/TD>");
W("  <\/TR>");
W("<\/TABLE>");
StopHTML();
}
//





// ENKEL VOOR FAQs --> Deze kunnen wellicht terugkomen op de Start-een-school-pagina's
var iF = 0;


function FontSizeHide(sE){
 document.getElementById(sE).style.fontSize = '12pt';
}
function FontSizeShow(sE){
 document.getElementById(sE).style.fontSize = '16pt';
}
function evalHide(sE){
 document.getElementById(sE).style.visibility = 'hidden';
 document.getElementById(sE).style.display = 'none';
}
function evalShow(sE){
 document.getElementById(sE).style.visibility = 'visible';
 document.getElementById(sE).style.display = 'list-item';
}
function CloseAll(){
var iC = 1;
for (iC = 1 ; iC <= iF; iC++){
 evalHide("sub"+iC);
}
}
function subDisplay(subName) {
if (document.getElementById(subName).style.visibility == 'hidden'){
 CloseAll();
 evalShow(subName)
} else {
 CloseAll();
}
}
function Print(){
var iC = 1;
 for (iC = 1 ; iC <= iF; iC++){
  document.getElementById("sub"+iC).style.visibility = 'visible';
  document.getElementById("sub"+iC).style.display = 'list-item';
 }
 if (sI!=""){
  document.getElementById("Inhoud").style.overflow = 'visible'
 }
 window.print()
}
function FAQ(sF){
iF++;
W("<\/DIV><B style=\'color: "+cBlauw+"; float: left; z-index: 1; \'>");
if (iF <= 9) {W("&nbsp;&nbsp;");}
W("&nbsp;&nbsp;&nbsp;"+iF+".</B><DIV style=\"margin-left: 50pt; z-index: 2; \">");
W("<A href=\"javascript:subDisplay(\'sub"+iF+"\');\">"+sF+"<\/DIV><\/A>");
W("<BR><DIV id=\'sub"+iF+"\' style=\' margin: 5pt 20pt; padding: 0.5em;\'>");
}

function OnderwerpFAQ(sOF){
W("<\/DIV><BR>");
Koptekst(sOF);
W("<DIV>");
}

function StartFAQ(){
PlaatsLogoKlein();
W("<TABLE width=\'100%\' border=\'0\'><TR>");
W("    <TD height=\'21\'>&nbsp;<\/TD><\/TR><\/TABLE>");
W("<DIV style=\'position: absolute; top: 16px; left: "+cLeftPerc+"%;\'>")
LayoutShadowH1(HoofdTitel,"");
W("</DIV>");
LayoutBalk("","",PlaatsPrinter());
LayoutHR();
W("<TABLE width=\'"+cWidth+"%\' align=\'center\' border=\'0\'>");
W("  <TR>");
W("    <TD valign=\'top\' style=\'background-image: url("+sBg+"); background-repeat: repeat-y\'>");
}
function StopFAQ(){
StopMenu();
}
//




StartHTML();