 $(document).ready(function(){
   
   RenderWeverTags();
   
 });

function toggle_advSwitch(dropdown, switchID, pnlAdvancedID)
{
	
	var myindex  = dropdown.selectedIndex;
	var SelValue = dropdown.options[myindex].value;
	var switchCtrl = document.getElementById(switchID);
		
	if(SelValue == 'contact')
	{
		$('#'+switchID).hide();
	
	}
	else
	{
		$('#'+switchID).show();
		

	}
}

function toggleSearchMode(link, tablerow)
{
	var curtext = $(link).html().toLowerCase();
	if(curtext == "simple")
		$(link).html("advanced");
		
	if(curtext == "eenvoudig")
		$(link).html("uitgebreid");
	
	if(curtext == "advanced")
		$(link).html("simple");
		
	if(curtext == "uitgebreid")
		$(link).html("eenvoudig");
		
		
	$(tablerow).toggle();
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
}



String.prototype.format = function()
{
var pattern = /\{\d+\}/g;
var args = arguments;
return this.replace(pattern, function(capture){ return args[capture.match(/\d+/)]; });
}

