// JavaScript Document

function Start(page) {
OpenWin = this.open(page, "", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}

function toggle(sobj){
    var obj = document.getElementById(sobj);
    var sStyle = 'block';
    if (obj.style.display == 'block'){sStyle = 'none'};
    obj.style.display = sStyle;
}

function show(sobj){
	document.getElementById(sobj).style.display='block';	
}

function hide(sobj){
	document.getElementById(sobj).style.display='none';	
}

function popfoto(foto,naam,opt)
{
	popmedia('foto',foto);
}

function popmedia(type,id)
{
file='/media.asp?type='+type+'&id='+id;
naam='Foto';
opt='resizable=yes,scrollbars=yes,width=1,height=1';
window.open(file,naam,opt);
}

function popscreen(file,opt,sTitel)
{
if(opt==null){opt='width=1,height=1'};
window.open(file,sTitel,opt);
}

function popcenteredsized(file,width,height,otheropt,title){
	var sOpt = 'width=' + width + ',height=' + height;
	var left=((self.screen.width - width) / 2);
	var top= (((self.screen.height - height) / 2)-50);
	sOpt += ',screenX=' + left + ',screenY=' + top;
	sOpt += ',left=' + left + ',top=' + top;
	if (otheropt)
		sOpt += ',' + otheropt;
	else
		sOpt+= ',scrollbars=no';
	window.open(file,title,sOpt);
}

//-->

function PopupPic(sPicURL) { 
 window.open( "/etalage/poppic.htm?"+sPicURL, "", "scrollbars=no,toolbar=no,menubar=no,location=no,resizable=no,HEIGHT=200,WIDTH=200"); 
} 

function wisselContent(iID,iAantal){
	for (iT=1;iT<=iAantal;iT++)
	{
		changeClass('tab'+iT,'tab_vert_uit');
		changeClass('tab_content'+iT,'tab_content_uit');
	}
	changeClass('tab'+iID,'tab_vert_aan');
	changeClass('tab_content'+iID,'tab_content_aan');
}

function changeClass(id, newClass) {
identity=document.getElementById(id);
identity.className=newClass;
}

function addClass(id, newClass) {
identity=document.getElementById(id);
identity.className= identity.className.replace(' ' + newClass,'');
identity.className= identity.className + ' ' + newClass;
}

function removeClass(id, oldClass) {
identity=document.getElementById(id);
identity.className=identity.className.replace(' ' + oldClass,'');
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

function sitemap(sobj){
    var obj = document.getElementById(sobj);
    var sStyle = 'block';
    if (obj.style.display == 'block'){sStyle = 'none'};
    obj.style.display = sStyle;
}

function getFormValue(sVal){
	try{
		return document.getElementById(sVal).value;
	}
	catch(e){
		return '';
	}
}

function getVal(sVal){
	return getFormValue(sVal)
}

function setVal(sObj,sVal){
	try{
		document.getElementById(sObj).value = sVal;
	}
	catch(e){
	}
}