NS4=document.layers;
IE=document.all;

function showLayer(lName,posX, posY)
{
 x=document.body.clientWidth;
 if(x==0) x=window.innerWidth;
 y=document.body.clientHeight;
 if(y==0) y=window.innerHeight;
 x=(x/2)-374;
 if(x<0) x=0;
 y=(y/2)-239;
 if(y<0) y=0;
 x+=posX+1;
 y+=posY+1;
 if(IE)
 {
  document.all[lName].style.left=x;
  document.all[lName].style.top=y;
  document.all[lName].style.visibility="visible";
 }
 else if(NS4)
 {
  eval("document."+lName+".style.left=x");
  eval("document."+lName+".style.top=y");
  eval("document."+lName+".visibility='show'");
 }
 else
 {
  document.getElementById(lName).style.left=x;
  document.getElementById(lName).style.top=y;
  document.getElementById(lName).style.visibility="visible";
 }
}

function hideLayer(lName)
{
 if(IE)
  document.all[lName].style.visibility="hidden";
 else if(NS4)
  eval("document."+lName+".visibility='hide'");
 else document.getElementById(lName).style.visibility="hidden";
}

function layerName(mNr)
{

 return "menu"+mNr;
}

function cellName(mNr)
{
 return "mh"+mNr;
}

function imageName(mNr)
{
 return "menu"+mNr;
}

function showMenu(mNr,pos)
{
 hideAllMenus();
 chgImg(imageName(mNr)+"img",imageName(mNr)+"down.gif");
 showLayer(layerName(mNr),pos,21);
 return true;
}

function hideMenu(mNr)
{
 chgImg(imageName(mNr)+"img",imageName(mNr)+"up.gif");
 hideLayer(layerName(mNr));
 return true;
}

function hideAllMenus()
{
 for(i=1; i<=5; i++) hideMenu(i);
 return true;
}

function cellHigh(cell)
{
 cell.style.color='#EFEFEF';
 cell.style.backgroundColor='#535869';
}

function cellLow(cell)
{
 cell.style.color='#FFFFFF';
 cell.style.backgroundColor='#FF4F01';
}

function chgImg(imgName, chgTo)
{
 if(document.images)
 {
  document[imgName].src="images/"+chgTo;
 }
 return true;
}

function ResolutieCheck()
{
 if(screen.width<800)
 {
  window.alert('Deze website is geoptimaliseerd voor een resolutie van minimaal 800 x 600!');
  	
 }
}
function popupvacature()
{
	var v=window.open("vacaturebanner.php","vacature"," toolbar=no,location=no,menubar=no,scrollbars=no,width=320, height=135");
	v.parent.window.moveTo(50,50);
	v.parent.window.focus();
	if (!v.opener) v.opener=self;
}
function fotopopup()
{
	var v=window.open("http://www.bka-opleidingen.nl/fotopopup/fotopopup.php","fotopopup"," toolbar=no,location=no,menubar=no,scrollbars=no,width=500, height=600");
	v.parent.window.moveTo(50,50);
	v.parent.window.focus();
	if (!v.opener) v.opener=self;
} 
function fotopopup2()
{
	var v=window.open("http://www.bka-opleidingen.nl/fotopopup/fotopopup.php?map=lang haar&typemenu=albums","fotopopup"," toolbar=no,location=no,menubar=no,scrollbars=no,width=500, height=600");
	v.parent.window.moveTo(50,50);
	v.parent.window.focus();
	if (!v.opener) v.opener=self;
} 
function fotopopupgrease()
{
	var v=window.open("http://www.bka-opleidingen.nl/fotopopup/fotopopup.php?map=grease","fotopopup"," toolbar=no,location=no,menubar=no,scrollbars=no,width=500, height=600");
	v.parent.window.moveTo(50,50);
	v.parent.window.focus();
	if (!v.opener) v.opener=self;
}

