﻿function WriteEmailAddress (name, domain, topLevelDomain, css)
{
  document.write('<a');
  if (css.length > 0)
  {
    document.write(' class=\"' + css + '\"');
  }
  document.write(' href=\"mailto:' + name + '@' + domain + '.' + topLevelDomain + '\">');
  document.write(name + '@' + domain + '.' + topLevelDomain + '</a>;');
}

var _win=null;

function closeWin()
{
  if(_win && !_win.closed && _win.open)
  {
      _win.close();
	  _win=null;
  }
}

function openWin(theURL,winName,features)
{
  closeWin();
  	var winLeft = (screen.width - 200) / 2;
	var winUp = (screen.height - 200) / 2;
  _win=window.open(theURL,'MyPopup', 'width=100,height=100,left='+winLeft+',top='+winUp+',scrollbars=no');
  _win.focus();
}

function openZoom(imagepath)
{
	var winLeft = (screen.width - 200) / 2;
	var winUp = (screen.height - 200) / 2;
	//openWin('/HypotheekBerekening/Default.aspx?' + imagepath, 'MyPopup', 'width=100,height=100,left='+winLeft+',top='+winUp+',scrollbars=no');
    openWin(imagepath, 'MyPopup', 'width=100,height=100,left='+winLeft+',top='+winUp+',scrollbars=no');
}

function InitializeMenu()
{
	//alert("test");
    if (document.all && document.getElementById)
    {
        var navRoot = document.getElementById("Nav2");
        for (i=0; i<navRoot.childNodes.length; i++)
        {
            node = navRoot.childNodes[i];
            if (node.nodeName == "LI")
            {
                node.onmouseover=function()
                {
                    this.className+=" over";
                }
                node.onmouseout=function()
                {
                    this.className=this.className.replace(" over", "");
                }
            }
        }
    }
}

