// Build Menu - Head Script
// The menu was based on a script with copyright by Stephen Chapman, 4th March 2005, 5th February 2006
// this script was originaly creating a horizontal menu, now it creates the menu verticaly
// you may copy this menu provided that you retain the copyright notice

var name = "info";
var domain = "corvanloenen.com";

var fix = 1; var delay = 2000; var modd = 0;
var bar = new menuBar();
var mapLink = 'http://www.corvanloenen.com';
var mapName = 'sitemap.html';

bar.addMenu('Cor van Loenen');
bar.addItem('index.html','Hoofdpagina');
bar.addItem('overcor.html','Over Cor');
bar.addMenu('Schilderijen');
bar.addItem('olieverf.html','Olieverf');
bar.addItem('pastel.html','Pastel');
bar.addItem('portret.html','Portret');
bar.addMenu('Informatie');
bar.addItem('persberichten.html','Persberichten');
bar.addItem('contact.html','Contact');
bar.addItem('links.html','Links');



// do not change anything below this line
var blc = '#E6C41B';/*#F5CF13 de kleur van de balk nadat deze ooit geselecteerd is*/
var blh = '#ffffff';/*#ffffff top bar hover*/
var bla = '#D2B110';/*#6600cc top balk die geselecteerd wordt*/
var lc = '#666666'/*'#FFFFCC'*/;/*top bar link normal letter na selectie*/
var lh = '#6600cc';/*top bar link hover*/
var la = '#ffffff';/* top bar link active*/

function createMenuColumn()
{
document.write('<table><tr><td>\r\n');
document.write('<font style="font-size: 16px" color="#AE6A04 "><strong><br>Cor van Loenen<br>Kunstschilder<br><br>\r\n');
document.write('<\/strong><\/font><br><br><\/tr>\r\n');
document.write('<tr><td style="width:120;">\r\n');
createMenu();
document.write('<\/td><\/tr>\r\n');
document.write('<tr><td style="height:420px;vertical-align: bottom; "><div class="tekst" >\r\n');
writeEmail();
document.write('\r\n<\/div><\/td><\/tr><\/table>\r\n');
}

function createMenu()
{
if (document.getElementById) 
{
document.writeln('<div id="mB">\r\n');
bar.writeBar();
document.write('\r\n<\/div>\r\n\r\n');
bar.writeDrop();
} 
else
document.writeln('<div id="mB"><a class="mO" href="'+mapLink+'">'+mapName+'<\/a><\/div>');
}

function menuBar() 
{this.jj = -1;this.kk = 0;this.mO = new Array();this.addMenu = addMenu;this.addItem = addItem;this.writeBar = writeBar;this.writeDrop = writeDrop;}

function addMenu(main) 
{this.mO[++this.jj] = new Object();this.mO[this.jj].main = main;this.kk = 0;this.mO[this.jj].link = new Array();this.mO[this.jj].name = new Array();}

function addItem(link,name) 
{this.mO[this.jj].link[this.kk] = link;this.mO[this.jj].name[this.kk++] = name;}

function writeBar() 
{
 for (var i=1;i <= this.mO.length; i++)
 {
   document.write('<div id="navMenu'+i+'" class="mH">'+this.mO[i-1].main+'<\/div>');
 }
}

function writeDrop() 
{
 for (var i=1;i <= this.mO.length; i++)
 {
   document.write('<div id="dropMenu'+i+'" class="mD">\r\n');
   for (var h=0;h < this.mO[i-1].link.length; h++)
   {
     document.write('<a class="mL" href="'+this.mO[i-1].link[h]+'">'+this.mO[i-1].name[h]+'<\/a>\r\n');
   }
   document.write('<\/div>\r\n');
 }
}

if (fix) window.onscroll=sMenu;
window.onload=iMenu;
var onm = null;
var ponm = null;
var podm = null;
var ndm = bar.mO.length;

function posY() 
{return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;}

function sMenu() 
{document.getElementById('mB').style.top = posY() + 'px';
 for (i=1; i<=ndm; i++) 
 {
   menuName = 'dropMenu' + i;odm = document.getElementById(menuName); 
   if (onm) 
   {
     var yPos = onm.offsetParent.offsetTop + onm.offsetParent.offsetHeight;
     odm.style.top = yPos + 'px';
   }
  }
}

function iMenu() 
{
 if (document.getElementById) 
 {
   document.onclick = mHide; 
   for (i=1; i<=ndm; i++)
   {
     menuName = 'dropMenu' + i;
     navName = 'navMenu' + i; 
     odm = document.getElementById(menuName); 
     onm = document.getElementById(navName); 
     odm.style.visibility = 'hidden'; 
     onm.onmouseover =  mHov;      
     onm.onmouseout = mOut;
   } 
   onm = null;
 } 
 return;
}

function  mHov(e) 
{
 if (modd) clearTimeout(modd);
 document.onclick = null; 
 honm = document.getElementById(this.id);  if (honm != onm) 
 {
   honm.style.color = lh; 
   honm.style.backgroundColor = blh;
 } 
 menuName = 'drop' + this.id.substring(3,this.id.length); 
 odm = document.getElementById(menuName); 
 if (podm == odm)  {
   mHide(); 
   return;
 } 
 if (podm != null) mHide();
 onm = document.getElementById(this.id); 
 if ((ponm != onm ) || (podm == null)) 
 {
   onm.style.color = la; 
   onm.style.backgroundColor = bla;
 } 
 if (odm)  
 {
   xPos = onm.offsetParent.offsetLeft + onm.offsetLeft + onm.offsetWidth; 
   yPos = onm.offsetParent.offsetTop + onm.offsetTop ;
   odm.style.left = xPos + 'px'; 
   odm.style.top = yPos + 'px';    
   odm.style.visibility = 'visible'; 
   odm.onmouseover = omov; 
   odm.onmouseout = omot; 
   podm = odm;    ponm = onm;
 }
}

function omov() 
{if (modd) clearTimeout(modd);}

function omot() 
{modd = setTimeout('mHide()',delay);}

function mOut(e) 
{modd = setTimeout('mHide()',delay);document.onclick = mHide;oonm = document.getElementById(this.id); if (oonm != onm) {oonm.style.color = lc; oonm.style.backgroundColor = blc;}}

function mHide() 
{document.onclick = null; if (podm) {podm.style.visibility = 'hidden'; podm = null; ponm.style.color = lc; ponm.style.backgroundColor = blc;} onm = null;}
if (fix) {var ag = navigator.userAgent.toLowerCase();var isG = (ag.indexOf('gecko') != -1);var isR=0;if (isG) {t = ag.split("rv:"); isR = parseFloat(t[1]);}if (isR && isR<1) setInterval('sMenu()',50);}

function writeEmail()
{
document.write('<a class=\"tekst\" href=\"mailto:' + GetMailadres() + '\">');
document.write(name + '@' + domain + '</a>');

}
function writeEmailBlack()
{
document.write('<a class=\"BlackTekst\" href=\"mailto:' + GetMailadres() + '\">');
document.write(name + '@' + domain + '</a>');

}
function GetMailadres()
{
  return(name + '@' + domain);
}
function getadres()
{
  formulier=document.getElementById('MailFormulier');
  formulier.action = "mailto:"+ GetMailadres();
}
