
/* PRELOAD IMAGES */
if(document.images)
{
	preload_image_object = new Image();
	
	// set image url
	image_url = new Array();
	image_url[0] = "/www_pearle_nl/images/pearle_menu_zoek_vestiging.gif";
	image_url[1] = "/www_pearle_nl/images/pearle_menu_zoek_vestiging_mouseover.gif";
	image_url[2] = "/www_pearle_nl/images/pearle_menu_selected.gif";

	for(var i = 0; i<= image_url.length; i++) 
	{
		 preload_image_object.src = image_url[i];
	}
}


/* COOKIE */

function geefCookie(naam)
{
	var start = document.cookie.indexOf(naam + "=", 0);

	var len   = start + (naam.length) + 1;

	var einde = document.cookie.indexOf(";", len);
	
	return unescape(document.cookie.substring(len, einde));
}

function zetCookie(naam, waarde)
{
	var today = new Date();
	
	date = new Date(today.getTime() + (1000 * 60 * 60 * 24));
	
	document.cookie = naam + "=" + escape(waarde) + ";expires=" + date.toGMTString() + ";path=/";
}


/* NAVIGATION */

var focussed_hoofdmenu;

/* */
function gaNaar(url)
{
  document.location.href = url;
}

function gaNaarExtern(url)
{
	window.open(url, "", "location=1,status=1,menubar=1,toolbar=1,resizable=1,scrollbars=1");
}

/* */
function gaNaarBladzijde(bladzijde)
{
  gaNaar(voegParameterToeAanURL(document.location.href, "blz", bladzijde));
}

/* */
function gaNaarPositie(naam)
{
  document.location.href = "#" + naam;
}

/* zoek machine */
function gaNaarResultaten(bladzijde)
{
  (document.getElementById('blz')).value = bladzijde;
  
  submitFormulier("zoeken", "zoekmachine");
}

/* */
function gaNaarURL(url, opgegeven_kant)
{
  if(opgegeven_kant == kant)
  {
    document.location.href = url;
  }
}

/* */
function openCustomPopup(url, breedte, hoogte)
{
  window.open(url, "", "height=" + hoogte + "px,left=200px,scrollbars=yes,top=200px,width=" + breedte + "px");
}

/* */
function openCustomPopupCentered(url, breedte, hoogte)
{
  window.open(url, "", "height=" + hoogte + "px,left=" + (((screen.width - breedte) / 2)) + "px,resizable=yes,scrollbars=yes,status=1,top=" + (((screen.height - hoogte) / 2)) + "px,width=" + breedte + "px");
}

function openNewWindow(url)
{
	window.open (url);
}

/* */
function openPopup(url)
{
  window.open(url, "", "height=300px,left=200px,top=200px,width=420px");
}

function openCommercial(url)
{
  window.open(url, "", "height=250px,left=200px,top=200px,width=340px,scrollbars=no,menubar=no,status=no,toolbar=no,resizable=yes");
}


/* */
function openPopupFullscreen(url)
{
  window.open(url, "", "height=" + (screen.height - 36) + "px,left=0px,resizable=yes,top=0px,width=" + (screen.width - 8) + "px");
}

/* */
function openWindow(url)
{
	window.open(url, "", "location=1,status=1,menubar=1,toolbar=1,resizable=1,scrollbars=1");
}

/* */
function stuurDoor(pagina_id)
{
  openCustomPopupCentered(pad + 'template/popup/vertel_een_vriend.php?pagina_id=' + pagina_id + '', '480', '240');
}

/* */
function verversParentScherm()
{
  self.opener.location.href = self.opener.location.href;
}

/* */
function verversScherm()
{
  document.location.href = document.location.href;
}

/* */
function volgendeBladzijde()
{
  gaNaar(voegParameterToeAanURL(document.location.href, "blz", (parseInt(blz) + 1)));
}

/* */
function vorigeBladzijde()
{
  gaNaar(voegParameterToeAanURL(document.location.href, "blz", (parseInt(blz) - 1)));
}


/* GUI METHODEN */

/*
  bestand invoegen
*/
function bestandInvoegen(bestand, veld_id)
{
  (document.getElementById(veld_id)).value = bestand;
  
  if(document.getElementById("afbeelding_" + veld_id) != null)
  {
		document.getElementById("afbeelding_" + veld_id).src = upload_pad + bestand;
  }
}

function bestandRemoteInvoegen(bestand, veld_id)
{ 
  self.opener.bestandInvoegen(bestand, veld_id);
  
	window.close();
}

function flashInvoegen(bestand, veld_id, width, height)
{
	var flash_code = ''+
									 '<script type="text/javascript">'+
									 '  AC_FL_RunContent("codebase","http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0","width","' + width + '","height","' + height + '","id","magazine","align","middle","src","swf_' + veld_id + '","quality","high","bgcolor","#ffffff","name","swf_' + veld_id + '","allowscriptaccess","sameDomain","pluginspage","http://www.macromedia.com/go/getflashplayer","movie","' + pad + 'upload/' + bestand + '" );'+
									 '</script>'+
									 '<noscript>'+
									 ' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="swf_' + veld_id + '" align="middle">'+
									 '    <param name="allowScriptAccess" value="sameDomain" />'+
									 '    <param name="movie" value="' + pad + 'upload/' + bestand + '" />'+
									 '    <param name="quality" value="high" />'+
									 '    <param name="bgcolor" value="#ffffff" />'+
									 '    <embed src="' + pad + 'upload/' + bestand + '" quality="high" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="swf_' + veld_id + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
									 '  </object>'+
									 '</noscript>';
	
	if(document.getElementById(veld_id) != null)
	{
		(document.getElementById(veld_id)).value = flash_code;
	}
  
  if(document.getElementById("flash_" + veld_id) != null)
  {
    document.getElementById("flash_" + veld_id).innerHTML = flash_code;
  }
}/**/

function flashRemoteInvoegen(bestand, veld_id, width, height)
{
  self.opener.flashInvoegen(bestand, veld_id, width, height);
  
	window.close();
}/**/


/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

/* 
  selecteer template type
*/

function selecteerTemplateType(sectie_id, template_type)
{
  var static_selector  = document.getElementById("sectie_" + sectie_id + "_static");
  var pointer_selector = document.getElementById("sectie_" + sectie_id + "_pointer");
  var custom_selector  = document.getElementById("sectie_" + sectie_id + "_custom");
  
  static_selector.style.visibility  = (template_type == "static"  ? "visible" : "hidden");
  pointer_selector.style.visibility = (template_type == "pointer" ? "visible" : "hidden"); 
  custom_selector.style.visibility  = (template_type == "custom"  ? "visible" : "hidden");

  static_selector.style.position  = (template_type == "static"  ? "relative" : "absolute");
  pointer_selector.style.position = (template_type == "pointer" ? "relative" : "absolute"); 
  custom_selector.style.position  = (template_type == "custom"  ? "relative" : "absolute");
  
  var type_selector = document.getElementById("sectie_" + sectie_id + "_type");
  
  for(var i = 0; i < type_selector.options.length; i++)
  {
    if(type_selector.options[i].value == template_type)
    {
      type_selector.selectedIndex = i;
      
      break;
    }
  }
}

/*
  bewerk blok
*/

function bewerkBlok(template_id)
{
  openCustomPopupCentered(pad + "php/util/popup/blok.php?template_id=" + template_id, 566, 600);
}

/*
  bewerk template
*/

function bewerkTemplate(template_id)
{
  openCustomPopupCentered(pad + "php/util/popup/template.php?template_id=" + template_id, 506, 600);
}

function bewerkTemplateWizzard(template_id)
{
  openCustomPopupCentered("nieuw.stap1.php?template_id=" + template_id, 540, 560);
  
  return false;
}

function verplaatsTemplate(template_id, richting)
{
  document.getElementById('id').value     = template_id;
  document.getElementById('waarde').value = richting;
  
  submitFormulier('verplaats', 'template');
}


/* FORM METHODEN */

/*
  item gewijzigd
*/

function isGewijzigd(id, sectie)
{
  //item(s)
  document.getElementById("id").value += (id + ",");
  
  //sectie(s)
  document.getElementById("sectie").value += (sectie + ",");  
}

/*
*/

function zetGewijzigd(id)
{
  document.getElementById("id").value = id;
}

/*
  item toevoegen
*/

function itemToevoegen(object, item_id)
{
  document.getElementById("id").value = item_id;
  
  submitFormulier("toevoegen", object);
}

/*
  item toevoegen aan sectie
*/

function bepaaldeTemplateToevoegenAanSectie(object, pagina_id, sectie_id, template_naam)
{
  document.getElementById("pagina").value = pagina_id;
  document.getElementById("sectie").value = sectie_id;  
  document.getElementById("id").value = template_naam;
	
  submitFormulier("toevoegen", object);
}

function itemToevoegenAanSectie(object, pagina_id, sectie_id, item_type)
{
  document.getElementById("pagina").value = pagina_id;
  document.getElementById("sectie").value = sectie_id;
  document.getElementById("id").value     = item_type;
  
  submitFormulier("toevoegen", object);
}

function templateToevoegenAanSectie(object, pagina_id, sectie_id)
{
  document.getElementById("pagina").value = pagina_id;
  document.getElementById("sectie").value = sectie_id;  
  var template_type                       = document.getElementById("sectie_" + sectie_id + "_type");
  template_type                           = template_type.options[template_type.selectedIndex].value;
  var template_naam                       = document.getElementById("sectie_" + sectie_id + "_" + template_type);
  
  if(template_naam != null)
  {
    template_naam                           = template_naam.options[template_naam.selectedIndex].value; 
    document.getElementById("id").value     = template_naam;
    
    if(template_type != "" && template_naam != "")
    {     
      submitFormulier("toevoegen", object);
    }
    else
    {
      alert("U heeft geen geldige template geselecteerd");
    }
  }
  else
  {
    alert("U heeft geen geldige template type geselecteerd");
  }
}

/* 
  item toevoegen aan template
*/

function blokToevoegenAanTemplate(template_id)
{
  var template_naam                         = document.getElementById("template_" + template_id + "_blok");
  template_naam                             = template_naam.options[template_naam.selectedIndex].value; 
  document.getElementById("id").value       = template_naam;
  document.getElementById("template").value = template_id;
  
  submitFormulier("toevoegen", "blok"); 
}

/*
  item verwijderen
*/

function itemVerwijderen(object, item_id)
{
  document.getElementById("id").value = item_id;
  
  if(confirm("Weet u zeker dat u dit item wilt verwijderen?") == true)
  {
    submitFormulier("verwijderen", object);
  }
}

/*
  item verwijderen uit sectie
*/

function itemVerwijderenUitSectie(object, sectie_id, item_id)
{
  document.getElementById("sectie").value = sectie_id;
  document.getElementById("id").value = item_id;  
  
  submitFormulier("verwijderen", object);
}

/*
  item wijzigen
*/

function itemWijzigen(object, item_id)
{
  document.getElementById("id").value = item_id;
  
  submitFormulier("wijzigen", object);
}

/*
  item (on)zichtbaar maken
*/

function itemZichtbaar(object, item_id)
{
  isGewijzigd(item_id); 
  var zichtbaar = document.getElementById(item_id + "_zichtbaar").value;
  
  if(zichtbaar == "0")
  { //maak zichtbaar
    document.getElementById(item_id + "_zichtbaar").value           = "1";
  }
  else
  { //maak onzichtbaar
    document.getElementById(item_id + "_zichtbaar").value           = "0";
  }
}

/*
  submit (globaal) formulier
*/

function submitFormulier(actie, object)
{
  //zet actie
  document.getElementById("actie").value = actie;
  
  //zet object
  document.getElementById("object").value = object;
  
  //submit formulier
  document.getElementById("globaal_formulier").submit();
}

/*
*/

function selecteerModus(modus)
{
  var url = document.location.href;
  
  url     = voegParameterToeAanURL(url, "modus", modus);
  
  gotoURL(url);
}

/*
*/

function geefLinkGegevens(naam)
{
	var linknaam = document.getElementById("linknaam_" + naam).value;
	var linkurl  = document.getElementById("linkurl_" + naam).value;
	
	return new Array(linknaam, linkurl);
}

function voegLinkAanLinklijstToe(id, groep)
{
  openCustomPopupCentered(pad + "php/util/popup/linklijst.php?template_id=" + id + "&groep=" + groep, 500, 200);
  
  isGewijzigd(id);
  
  submitFormulier("wijzigen", "template");
}

function wijzigLink(id)
{
	openCustomPopupCentered(pad + "php/util/popup/link.php?id=" + id, 500, 200);
}

function wijzigLinklijst(id)
{
  openCustomPopupCentered(pad + "php/util/popup/linklijst.php?id=" + id, 500, 200);
}

function zetLinkGegevens(naam, linknaam, linkurl)
{
	document.getElementById("linknaam_" + naam).value = linknaam;
	
	document.getElementById("linkurl_" + naam).value = linkurl;
		
	linkGewijzigd();
}


/* GLOBAL */

//depricated
function gotoURL(url)
{
  document.location.href = url;
}


/*
  UTIL
*/

function geefObject(id)
{
  var object = document.getElementById(id);
  
  return object;
}

function geefObjectPositie(obj)
{
	var curleft   = 0;
	var curtop    = 0;
	
	if(obj.offsetParent)
	{
		curleft   = obj.offsetLeft;
		curtop    = obj.offsetTop;
		
		while(obj = obj.offsetParent) 
		{
			curleft   += obj.offsetLeft;
			curtop    += obj.offsetTop;
		}
	}
	
	return [curtop, curleft];
}

function transformeerDatum(bron_object_id, doel_object_id)
{
  var datum       = document.getElementById(bron_object_id).value;
  
  var datum_array = datum.split("-");
  
  document.getElementById(doel_object_id).value = (datum_array[2] + "-" + datum_array[1] + "-" + datum_array[0]);
}

function verwijderParameterUitURL(url, naam)
{
  var url_splitted = url.split("?");  
  var url          = url_splitted[0];
  
  if(url_splitted.length > 1)
  {
    var params = url_splitted[1];
    
    if(params.indexOf("&") > 0)
    {
      var param_array = params.split("&");

      for(var p = 0; p < param_array.length; p++)
      {
        var param_name = param_array[p].split("=");
        
        if(param_name[0] != naam)
        {
          url += (p == 0 ? "?" : "&") + param_array[p];
        }
      }
    }
    else
    {
      var param_name = params.split("=");
      
      if(param_name[0] != naam)
      {
        url += "?" + params;
      }
    }
  }
  
  return url;
}

function voegParameterToeAanURL(url, naam, waarde)
{
  url = verwijderParameterUitURL(url, naam);
  
  if(url.indexOf("?") > 0)
  {
    url += "&" + naam + "=" + waarde;
  }
  else
  {
    url += "?" + naam + "=" + waarde;
  }
  
  return url;
}

function zetDatumTijd(object_id, type, field, value)
{
  var object = document.getElementById(object_id);
  var object_value = object.value;
  
  //the value of the object has not beed set yet
  if(object_value == "")
  {
    if(type == "date")
    {
      object_value = "0000-00-00";
    }
    if(type == "time")
    {
      object_value = "00:00:00";
    }
    if(type == "datetime")
    {
      object_value = "0000-00-00 00:00:00";
    }
  }
  
  var new_object_value = "";
  
  //process date
  if(type == "date" || type == "datetime")
  {
    var date       = object_value.split(" ");
    var date_array = date[0].split("-");
    
    if(field == "day")  { date_array[2] = value; }
    if(field == "month"){ date_array[1] = value; }
    if(field == "year") { date_array[0] = value; }
    
    new_object_value += date_array[0] + "-" + date_array[1] + "-" + date_array[2];
  }
  
  //process time
  if(type == "time" || type == "datetime")
  {
    var time       = object_value.split(" ");
    var time_array = (type == "datetime" ? time[1].split(":") : time[0].split(":"));
    
    if(field == "hour")  { time_array[0] = value; }
    if(field == "minute"){ time_array[1] = value; }
    if(field == "second"){ time_array[2] = value; }
    
    new_object_value += (type == "datetime" ? " " : "") + time_array[0] + ":" + time_array[1] + ":" + time_array[2];
  }
  
  object.value = new_object_value;
  
  return new_object_value;
}

/*
	item specefieke functie(s)
*/

function geefVoorgedefineerdePaginaTemplateId(pagina_id, sectie_id)
{
	var selectbox_object = document.getElementById(pagina_id + "_" + sectie_id + "_selectbox");
	
	return selectbox_object.options[selectbox_object.selectedIndex].value;
}

function switchToHome()
{
	var divElem = document.getElementById('video');
	so.write("video");
}