		
		function scriptsladen_onload() 
		{ 
			if (document.getElementById("frontend"))
			{
				verticaal_centreren_homepage(); 
			}
		} 
		function scriptsladen_onresize() 
		{ 
			if (document.getElementById("frontend"))
			{
				verticaal_centreren_homepage(); 
			}
		}
		//window.onbeforeload = scriptsladen_onbeforeload;
		window.onload = scriptsladen_onload;
		window.onresize = scriptsladen_onresize;
	
	//---------------------------------------------------------------------------------------------------------------------
	// LINK OP EEN ELEMENT
	//---------------------------------------------------------------------------------------------------------------------
		
		function paginalink(theURL,winName) 
		{ 
			window.open(theURL,winName);
		}

	//---------------------------------------------------------------------------------------------------------------------
	// EINDE LINK OP EEN ELEMENT
	//---------------------------------------------------------------------------------------------------------------------
		
	//---------------------------------------------------------------------------------------------------------------------
	// FORMULIEREN VERSTUREN BIJ EEN ONCLICK OP ELEMENTS
	//---------------------------------------------------------------------------------------------------------------------

		function submitform(theform)
		{
			document.getElementById(theform).submit()			
		}

	//---------------------------------------------------------------------------------------------------------------------
	// EINDE FORMULIEREN VERSTUREN BIJ EEN ONCLICK OP ELEMENTS
	//---------------------------------------------------------------------------------------------------------------------

	//---------------------------------------------------------------------------------------------------------------------
	// VERTICAAL CENTREREN PAGINA
	//---------------------------------------------------------------------------------------------------------------------

		function verticaal_centreren_homepage()
		{
			// de breedte van de navigatie
			var li 															= document.getElementsByTagName("li");
			var width_of_navig = 0;
			for (var i = 0; i< li.length; i++)
			{
				if( li[i].className == 'navig_element' )
				{
					width_of_navig 											= width_of_navig + li[i].clientWidth;
				}	
				else
				{
					width_of_navig 											= width_of_navig + 0;
				}
			}
			var ypos_enddiv		 											= document.getElementById("enddiv").offsetTop;
			var width_of_content		 									= document.getElementById("navig_container_content").clientWidth;
			var height_of_body_container 									= document.getElementById("body_container").clientHeight;
			// browser ophalen
			var non_IE 														= (typeof( window.innerWidth ) == 'number');
			var IE_6 														= (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ));
			var IE_4 														= (document.body && ( document.body.clientWidth || document.body.clientHeight ));
			
			if( non_IE )
			{
				//Non-IE
				bodywidth 													= window.innerWidth;
				bodyheight 													= window.innerHeight;
			} 
			
			else if( IE_6 ) 
			{
				//IE 6+ in 'standards compliant mode'
				bodywidth 													= document.documentElement.clientWidth;
				bodyheight 													= document.documentElement.clientHeight;
			} 			
			else
			{
				//IE 4 compatible
				bodywidth 													= document.body.clientWidth;
				bodyheight 													= document.body.clientHeight;
			}
			
			// de margin top berekenen
			//body_paddingtop 												= (bodyheight - height_of_body_container) / 2;
			body_paddingtop 												= (bodyheight - ypos_enddiv) / 2;
			if (body_paddingtop >= 0)
			{
				document.getElementById("body_container").style.paddingTop  	= body_paddingtop + "px";
				document.getElementById("body_container").style.height  		= bodyheight - body_paddingtop + "px";
			}
			// positie voor de navigatie
			navig_paddingleft = (width_of_content - width_of_navig) / 2;
			if (navig_paddingleft >= 0)
			{
				document.getElementById("navig_ul").style.paddingLeft  			= navig_paddingleft + "px";
			}
		}
		
	//---------------------------------------------------------------------------------------------------------------------
	// EINDE VERTICAAL CENTREREN PAGINA
	//---------------------------------------------------------------------------------------------------------------------

	//---------------------------------------------------------------------------------------------------------------------
	// IMAGE RADIO BUTTONS
	//---------------------------------------------------------------------------------------------------------------------

		function SetState(obj_checkbox, obj_textarea)
		{  
			if(obj_checkbox.checked)
			{ 
			   obj_textarea.disabled = true;
			}
			else
			{ 
			   obj_textarea.disabled = false;
			}
		}
		function set_radio_buttons_orientatie(obj_checkbox, formname) 
		{
			var form = 'form_' + formname;
			if(obj_checkbox.checked)
			{ 
				document.getElementById(form).custom_width_large.disabled = true;
				document.getElementById(form).custom_height_large.disabled = true;
				document.getElementById(form).custom_width_thumb.disabled = true;
				document.getElementById(form).custom_height_thumb.disabled = true;
				document.getElementById(form).custom_width_large.value = '';
				document.getElementById(form).custom_height_large.value = '';
				document.getElementById(form).custom_width_thumb.value = '';
				document.getElementById(form).custom_height_thumb.value = '';
			}
			else
			{ 
				document.getElementById(form).custom_width_large.disabled = false;
				document.getElementById(form).custom_height_large.disabled = false;
				document.getElementById(form).custom_width_thumb.disabled = false;
				document.getElementById(form).custom_height_thumb.disabled = false;
			}
		}
		function clear_radio_buttons_orientatie(formname) 
		{
			 var form = 'form_' + formname;
			 for (var i = 0; i < document.getElementById(form).orientatie.length; i++) 
			 {
				  document.getElementById(form).orientatie[i].checked = false;
			 }
			 document.getElementById(form).custom_width_large.disabled = false;
			 document.getElementById(form).custom_height_large.disabled = false;
			 document.getElementById(form).custom_width_thumb.disabled = false;
			 document.getElementById(form).custom_height_thumb.disabled = false;
		}

	//---------------------------------------------------------------------------------------------------------------------
	// EINDE IMAGE RADIO BUTTONS
	//---------------------------------------------------------------------------------------------------------------------

		function show_cats()
		{
			var URL = document.form_pd_cats.pd_cats.options[document.form_pd_cats.pd_cats.selectedIndex].value;
			window.location.href = URL;   
		} 
