/*FlashObject.js*/
/**
 * FlashObject v1.2.3: Flash detection and embed - http://blog.deconcept.com/flashobject/
 *
 * FlashObject is (c) 2005 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof com == "undefined") var com = new Object();
if(typeof com.deconcept == "undefined") com.deconcept = new Object();
if(typeof com.deconcept.util == "undefined") com.deconcept.util = new Object();
if(typeof com.deconcept.FlashObjectUtil == "undefined") com.deconcept.FlashObjectUtil = new Object();
com.deconcept.FlashObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, redirectUrl, detectKey){
   this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
   this.skipDetect = com.deconcept.util.getRequestParameter(this.DETECT_KEY);
   this.params = new Object();
   this.variables = new Object();
   this.attributes = new Array();

   if(swf) this.setAttribute('swf', swf);
   if(id) this.setAttribute('id', id);
   if(w) this.setAttribute('width', w);
   if(h) this.setAttribute('height', h);
   if(ver) this.setAttribute('version', new com.deconcept.PlayerVersion(ver.toString().split(".")));
   if(c) this.addParam('bgcolor', c);
   var q = quality ? quality : 'high';
   this.addParam('quality', q);
   this.setAttribute('redirectUrl', '');
   if(redirectUrl) this.setAttribute('redirectUrl', redirectUrl);
   useExpressInstall=true;
   if(useExpressInstall) {
   // check to see if we need to do an express install
   var expressInstallReqVer = new com.deconcept.PlayerVersion([8,0,0]);
  
   var installedVer = com.deconcept.FlashObjectUtil.getPlayerVersion();
    
      if (installedVer.versionIsValid(expressInstallReqVer) && !installedVer.versionIsValid(this.getAttribute('version'))) {
         this.setAttribute('doExpressInstall', true);
      }
   } else {
      this.setAttribute('doExpressInstall', false);
   }
}
com.deconcept.FlashObject.prototype.setAttribute = function(name, value){
	this.attributes[name] = value;
}
com.deconcept.FlashObject.prototype.getAttribute = function(name){
	return this.attributes[name];
}
com.deconcept.FlashObject.prototype.getAttributes = function(){
	return this.attributes;
}
com.deconcept.FlashObject.prototype.addParam = function(name, value){
	this.params[name] = value;
}
com.deconcept.FlashObject.prototype.getParams = function(){
	return this.params;
}
com.deconcept.FlashObject.prototype.getParam = function(name){
	return this.params[name];
}
com.deconcept.FlashObject.prototype.addVariable = function(name, value){
	this.variables[name] = value;
}
com.deconcept.FlashObject.prototype.getVariable = function(name){
	return this.variables[name];
}
com.deconcept.FlashObject.prototype.getVariables = function(){
	return this.variables;
}
com.deconcept.FlashObject.prototype.getParamTags = function(){
   var paramTags = ""; var key; var params = this.getParams();
   for(key in params) {
        paramTags += '<param name="' + key + '" value="' + params[key] + '" />';
    }
   return paramTags;
}
com.deconcept.FlashObject.prototype.getVariablePairs = function(){
	var variablePairs = new Array();
	var key;
	var variables = this.getVariables();
	for(key in variables){
		variablePairs.push(key +"="+ variables[key]);
	}
	return variablePairs;
}
com.deconcept.FlashObject.prototype.getHTML = function() {
    var flashHTML = "";
    if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
        flashHTML += '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') + '" name="'+ this.getAttribute('id') +'"';
		var params = this.getParams();
        for(var key in params){ flashHTML += ' '+ key +'="'+ params[key] +'"'; }
		pairs = this.getVariablePairs().join("&");
        if (pairs.length > 0){ flashHTML += ' flashvars="'+ pairs +'"'; }
        flashHTML += '></embed>';
    } else { // PC IE
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
        flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') +'">';
        flashHTML += '<param name="movie" value="' + this.getAttribute('swf') + '" />';
		var tags = this.getParamTags();
        if(tags.length > 0){ flashHTML += tags; }
		var pairs = this.getVariablePairs().join("&");
        if(pairs.length > 0){ flashHTML += '<param name="flashvars" value="'+ pairs +'" />'; }
        flashHTML += '</object>';
    }
    return flashHTML;
}
com.deconcept.FlashObject.prototype.write = function(elementId){
	if(this.skipDetect || this.getAttribute('doExpressInstall') || com.deconcept.FlashObjectUtil.getPlayerVersion().versionIsValid(this.getAttribute('version'))){
		if(document.getElementById){
		   if (this.getAttribute('doExpressInstall')) {
		      this.addVariable("MMredirectURL", escape(window.location));
		      document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		      this.addVariable("MMdoctitle", document.title);
		   }
		   //setTimeout('WriteID("' + elementId + '","' + escape(this.getHTML())+'");','100');
			document.getElementById(elementId).innerHTML = this.getHTML();
			
		}
	}else{
		if(this.getAttribute('redirectUrl') != "") {
			document.location.replace(this.getAttribute('redirectUrl'));
		}
	}
}
/* ---- detection functions ---- */
com.deconcept.FlashObjectUtil.getPlayerVersion = function(){
   var PlayerVersion = new com.deconcept.PlayerVersion(0,0,0);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (window.ActiveXObject){
	   try {
   	   var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
   		PlayerVersion = new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
	   } catch (e) {}
	}
	return PlayerVersion;
}
com.deconcept.PlayerVersion = function(arrVersion){
	this.major = parseInt(arrVersion[0]) || 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
}
com.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;
}
/* ---- get value of query string param ---- */
com.deconcept.util.getRequestParameter = function(param){
	var q = document.location.search || document.location.href.hash;
	if(q){
		var startIndex = q.indexOf(param +"=");
		var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
		if (q.length > 1 && startIndex > -1) {
			return q.substring(q.indexOf("=", startIndex)+1, endIndex);
		}
	}
	return "";
}

/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use / backwards compatibility */
var getQueryParamValue = com.deconcept.util.getRequestParameter;
var FlashObject = com.deconcept.FlashObject;


function WriteID(id,html)
{
document.getElementById(id).innerHTML = unescape(html);
}

	

 
/*getanchor.js*/
// getAnchorPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the page.
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// getAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function getAnchorWindowPosition(anchorname) {
	var coordinates=getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x=coordinates.x-document.body.scrollLeft+window.screenLeft;
			y=coordinates.y-document.body.scrollTop+window.screenTop;
			}
		else {
			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
			}
		}
	else if (document.all) {
		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		y=coordinates.y-document.body.scrollTop+window.screenTop;
		}
	else if (document.layers) {
		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
	}	
function AnchorPosition_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
	}


/*querystring.js*/
/* Client-side access to querystring name=value pairs
	Version 1.2.3
	22 Jun 2005
	Adam Vandenberg
*/
function Querystring(qs) { // optionally pass a querystring to parse
	this.params = new Object()
	this.get=Querystring_get
	
	if (qs == null)
		qs=location.search.substring(1,location.search.length)

	if (qs.length == 0) return

// Turn <plus> back to <space>
// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
	qs = qs.replace(/\+/g, ' ')
	var args = qs.split('&') // parse out name/value pairs separated via &
	
// split out each name=value pair
	for (var i=0;i<args.length;i++) {
		var value;
		var pair = args[i].split('=')
		var name = unescape(pair[0])

		if (pair.length == 2)
			value = unescape(pair[1])
		else
			value = name
		
		this.params[name] = value
	}
}

function Querystring_get(key, default_) {
	// This silly looking line changes UNDEFINED to NULL
	if (default_ == null) default_ = null;
	
	var value=this.params[key]
	if (value==null) value=default_;
	
	return value
}

function changeSANAimage(item, src){

	item.src = src;

}

function changeimg(name, src){
	var doc = document.images[name]

	switch (src) {
		case '' :
			break;
		default :
			doc.src = src;
	}
}

function changetreebutton(item, src){

	item.src = src;

}

function openurl(self)
{
	document.location.href = self.children(0).href;	
}

/*DONT REMOVE!*/
function changeSANAimage(item, src){

	item.src = src;

}

function changeimg(name, src){
	var doc = document.images[name]

	switch (src) {
		case '' :
			break;
		default :
			doc.src = src;
	}
}

function changetreebutton(item, src){

	item.src = src;

}

function openurl(self)
{
	document.location.href = self.children(0).href;	
}
//SA07-12955: PAYMENT CODE  

var FormSubmitInProces = 0;

function HideFinalyzeOrderLink()
{
	var submitLink = document.getElementById("finalizeorderlink")
	submitLink.style.visibility = 'hidden';
}

function RefreshPaymentMethods()
{
	FormSubmitInProces = 1;
	HideFinalyzeOrderLink();
	document.paymentmethod.submit();
}

function FinalyzeOrder()
{	
	if (FormSubmitInProces == 0){	
		FormSubmitInProces = 1;
		document.paymentmethod.state.value = "finalyzeorder";
		document.paymentmethod.submit();
	}
}
 
function PostPaymentMethodForm(automaticIncasso, paymentMethodAutomaticIncasso) {
	var selectedmethodid; 
	var maxarraycount;
	var i;
	var currentvalue;
	var newvalue;
	var newselectedid;
	var dorefresh;
	dorefresh = false;
	
	if (FormSubmitInProces == 1 ) return false;
	
	FormSubmitInProces  = 1;
	maxarraycount		=	document.paymentmethod.maxarraycount.value;
	selectedmethodid	=	document.paymentmethod.selectedmethodid.value;
	newselectedid		=	document.paymentmethod.paymentmethoddd.value;

	if ((newselectedid == automaticIncasso) || (selectedmethodid == paymentMethodAutomaticIncasso)) {
		dorefresh = true;
	}
	
	for (i = 0; i < maxarraycount; i++) {
		if (selectedmethodid == PM[i][0]) {
			currentvalue = PM[i][1];
		}
		if (newselectedid == PM[i][0]) {
			newvalue = PM[i][1];
		}
	}	
		
	document.paymentmethod.selectedmethodid.value = newselectedid;
	
	if ((currentvalue != newvalue) || dorefresh) {
		if ((typeof currentvalue != "undefined") || (newvalue != 0) || dorefresh) {
			//Hide the submit link to prevent people to click it
			//When clicked the page will stop loading because javascript is executed
			HideFinalyzeOrderLink();
			document.paymentmethod.submit()
		}
		else {
			FormSubmitInProces=0;
		}
	}
	else {
		FormSubmitInProces=0;
	}
}

// END PAYMENTCODE
//----------------------------Popup--------------------------------------------------------
function CreatePopup()
{
    if(document.getElementById("Mainpopupcontainer")==null)
    {
        var popupstr='<div class="Mainpopupcontainer" style="display: none;" id="Mainpopupcontainer"><iframe class="PopupMainConteiner" id="PopupMainConteiner" style="background-color:red;" ></iframe><div class="PopUpWindow" id="PopUpWindow"></div></div>';
        var elementObj = document.createElement("div");
        
        elementObj.innerHTML=popupstr;
        document.body.appendChild(elementObj);
    }
}
if(window.addEventListener)
{ 
    window.addEventListener('load', CreatePopup, false);
} 
else
{
    window.attachEvent('onload', CreatePopup);
}

function LoadFlash(productid)
{
					
	var flashvars = {};
	flashvars.xmlPath = BaseURL+"getXML_Products.aspx";
    if(productid)
    {
	    flashvars.xmlPath=flashvars.xmlPath+"?productid="+productid;
	}
	    
	var params = {};
	params.wmode = "transparent";
	
	var attributes = {};
	swfobject.embedSWF(BaseURL+"content/flash/interieurplanner.swf", "PopUpWindow", "100%", "100%", "9.0.0", false, flashvars, params, attributes);
}
			
function closeWindow(){
				document.getElementById("Mainpopupcontainer").style.display="none";
}
	
//------------------------------------------------------------------------------------------	
			
SetLoadingCustom = function(mc, te)
    {
     var el = mc;

     var bodySize = BodySize();

     el.style.height = bodySize.offsetHeight + 'px';
     el.style.width = bodySize.offsetWidth + 'px';
     if(document.getElementById("mIframe"))
     {
        document.getElementById("mIframe").style.height = bodySize.offsetHeight + 'px';
        document.getElementById("mIframe").style.width = bodySize.offsetWidth + 'px';
     }
     el.style.backgroundColor = '#4C453F';
     var spL = te;

     spL.style.top = Math.round((bodySize.height/2) + bodySize.top) + 'px';
     spL.style.left = Math.round((bodySize.width/2) + (bodySize.left - 20)) + 'px';
     
     if(typeof el.style.filter != 'undefined') el.style.filter = 'alpha(opacity=80)';
     else if(typeof el.style.MozOpacity != 'undefined') el.style.MozOpacity = '0.8';
     else if(typeof el.style.opacity != 'undefined') el.style.opacity = '0.8';
    };
SetLoading = function(mc, te)
    {
     var el = mc;

     var bodySize = BodySize();

     el.style.height = bodySize.offsetHeight + 'px';
     el.style.width = bodySize.offsetWidth + 'px';
     if(document.getElementById("mIframe"))
     {
        document.getElementById("mIframe").style.height = bodySize.offsetHeight + 'px';
        document.getElementById("mIframe").style.width = bodySize.offsetWidth + 'px';
     }
    var doc = el.contentDocument;
    if (doc == undefined || doc == null)
        doc = el.contentWindow.document;
     doc.bgColor='#4C453F';
     /*var ttt = el.getElementsByTagName("body");
     alert(ttt.length);
     el.style.backgroundColor = '#4C453F';*/
     var spL = te;

     spL.style.top = Math.round((bodySize.height/2) + bodySize.top) + 'px';
     spL.style.left = Math.round((bodySize.width/2) + (bodySize.left - 20)) + 'px';
     
     if(typeof el.style.filter != 'undefined') el.style.filter = 'alpha(opacity=80)';
     else if(typeof el.style.MozOpacity != 'undefined') el.style.MozOpacity = '0.8';
     else if(typeof el.style.opacity != 'undefined') el.style.opacity = '0.8';
    };

    BodySize = function()
    {
     var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body
     var dsocleft=document.all? iebody.scrollLeft : pageXOffset
     var dsoctop=document.all? iebody.scrollTop : pageYOffset
     var scrlBarLengthX = 0;
     var scrlBarLengthY = 0;
     if ( window.scrollMaxX ) scrlBarLengthX = window.scrollMaxX==0?0:15;
     if ( window.scrollMaxY ) scrlBarLengthY = window.scrollMaxY==0?0:15;
     var dsocwidth = window.innerWidth?(window.innerWidth - scrlBarLengthY):iebody.clientWidth;
     var dsocheight = window.innerHeight?(window.innerHeight - scrlBarLengthX):iebody.clientHeight;
     var retObj = new Object();
     retObj.height = dsocheight;
     retObj.width = dsocwidth;
     retObj.left = dsocleft;
     retObj.top = dsoctop;
     retObj.offsetWidth = (iebody.scrollWidth || iebody.offsetWidth);
     retObj.offsetHeight = (iebody.scrollHeight || iebody.offsetHeight);
     return retObj;
    };
function showpopup()
{
    if(document.getElementById("Mainpopupcontainer"))
        SetLoading(document.getElementById("PopupMainConteiner"),document.getElementById("PopUpWindow"));
        document.getElementById("Mainpopupcontainer").style.display="";
}
function showpopup_custom()
{
    if(document.getElementById("Mainpopupcontainer_custom"))
        SetLoadingCustom(document.getElementById("PopupMainConteiner_custom"),document.getElementById("PopUpWindow_custom"));
        document.getElementById("Mainpopupcontainer_custom").style.display="";
}

ShowDialog = function (target,width,height,location,scrollbars,status,resizable,menubar,toolbar,directories)
{
 var lWidth = (width)?width:'auto'; //in pixels. The minimum value is 100.
 var lHeight = (height)?height:'auto'; //in pixels. The minimum value is 100
 var lLocation = (location)?location:0; //display the input field for entering URLs directly into the browser
 var lScrollbars = (scrollbars)?scrollbars:0; //display horizontal and vertical scroll bars
 var lStatus = (status)?status:0; //add a status bar at the bottom of the window
 var lResizable = (resizable)?resizable:0; //display resize handles at the corners of the window
 var lMenubar = (menubar)?menubar:0; //display the menu bar
 var lToolbar = (toolbar)?toolbar:0; //display the browser toolbar, making buttons such as Back, Forward, and Stop available
 var lDirectories = (directories)?directories:0; //Directory buttons

 var win = window.open(target,'_blank',
 'height='+height+
 ',width=' + width +
 ',location=' + lLocation +
 ',scrollbars=' + lScrollbars +
 ',status=' + lStatus +
 ',resizable=' + lResizable +
 ',menubar=' + lMenubar +
 ',toolbar=' + lToolbar +
 ',directories=' + lDirectories
 );
return;
}

/*Validate contact form*/
function trim(str)
{
	return str.replace(/(^\s+)|(\s+$)/g,"");
}


function attachEventToObj(obj, e, eFunction)
{
	if( obj.attachEvent )
	{
		eval('var func = function(){' + eFunction +'};');
		obj.attachEvent(e, func);
	}
	else
	{
		obj.setAttribute(e, eFunction); 
	}
}


function InitContactForm()
{
	var elements = new Array();
	elements = document.getElementsByTagName('a'); 

	for (i=0; i< elements.length; i++)
	{
		switch(elements[i].href)
		{
			
			case 'javascript:document.forms[%22SANAform%22].submit();':
				//elements[i].href = 'javascript:void(0)';
				attachEventToObj(elements[i], 'onclick', 'return validateContactForm();');
				break;
			case 'javascript:document.forms["SANAform"].submit();':
				//elements[i].href = 'javascript:void(0)';
				attachEventToObj(elements[i], 'onclick', 'return validateContactForm();');
				break;
			case 'javascript:document.forms["SANAform"].reset();':
				elements[i].href = 'javascript:void(0)';
				attachEventToObj(elements[i], 'onclick', "return clearContactForm(['naam_validasterix','email_validasterix','onderwerp_validasterix','vraag_validasterix']);");
				break;
		}
	}
}

function Init_Nieuwe_ondernemer()
{
	var elements = new Array();
	elements = document.getElementsByTagName('a'); 

	for (i=0; i< elements.length; i++)
	{
		switch(elements[i].href)
		{
			case 'javascript:document.forms["SANAform"].submit();':
				//elements[i].href = 'javascript:void(0)';
				attachEventToObj(elements[i], 'onclick', 'return validate_Nieuwe_ondernemer();');
				break;
			case 'javascript:document.forms[%22SANAform%22].submit();':
				//elements[i].href = 'javascript:void(0)';
				attachEventToObj(elements[i], 'onclick', 'return validate_Nieuwe_ondernemer();');
				break;
		}
	}
}

function clearContactForm(validAsterix)
{
	document.forms["SANAform"].reset();
	
	for( var i=0; i < validAsterix.length; i++)
    {
		document.getElementById(validAsterix[i]).className = 'validasterix';
    }
    
	return false;
}

function validateContactForm(){
	var formIsValid = true;
     
	var name = document.getElementById('naam');
	var voorletters = document.getElementById('voorletters')
	var namev = document.getElementById('naam_validator');
	
	var voorlettersv = document.getElementById('voorletters_validator');
	
	if (trim(name.value) != "")
	{
		namev.className='validate_message_hide';
	}
	else
	{
		formIsValid =false;
		namev.className ='validate_message_show';
	}
	
	
	if (trim(voorletters.value) != "")
	{
		voorlettersv.className='validate_message_hide';
	}
	else
	{
		formIsValid =false;
		voorlettersv.className ='validate_message_show';
	}
	/*var postcode = document.getElementById('postcode');
	var postcodev = document.getElementById('postcode_validator');
	var postcodeformat = /^[0-9]{4}[a-zA-Z]{2}$/;
	if (trim(postcode.value) == "" || postcode.value.search(postcodeformat) == -1)
	{
		formIsValid =false;
		postcodev.className ='validate_message_show';
	}
	else
	{
		postcodev.className='validate_message_hide';
	}*/

	var telefoon = document.getElementById('onderwerp');
	var telefoonv = document.getElementById('telefoonnummer_validator');
	var telefoonformat = /^[0-9]{10}$/;
	if (trim(telefoon.value) == ""  || telefoon.value.search(telefoonformat) == -1)
	{
		formIsValid =false;
		telefoonv.className ='validate_message_show';
		
	}
	else
	{
		telefoonv.className='validate_message_hide';
	}

	var mail = document.getElementById('email');
	var mailv = document.getElementById('email_validator')
	var mailformat = /^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{1,3})$/;
	if (trim(mail.value) == "" || mail.value.search(mailformat) == -1)
	{
		formIsValid =false;
		mailv.className = 'validate_message_show';
	}
	else
	{
		mailv.className = 'validate_message_hide';
	}
	
	var vraag = document.getElementById('vraag');
	var vraagv = document.getElementById('vraag_validator');
	if (trim(vraag.value) == "")
	{
		formIsValid =false;
		vraagv.className ='validate_message_show';
	}
	else
	{
		vraagv.className='validate_message_hide';
	}	
	

	if (formIsValid)
	{
		return true;
		//document.getElementById('SANAform').submit();
	}
	else 
	{
		return false;
	}
}
	
	
	function validate_Nieuwe_ondernemer(){
	var formIsValid = true;
    
   
    var name1 = document.getElementById('dhr');
    var name2 = document.getElementById('mevr');
	var namev = document.getElementById('dhrmevr_error');
	if (name1.checked == false && name2.checked == false)
	{
		formIsValid =false;
		namev.className ='validate_message_show';
	}
	else
	{
		namev.className='validate_message_hide';
	} 
    
    var name = document.getElementById('naam');
	var namev = document.getElementById('naam_error');
	if (trim(name.value) == "")
	{
		formIsValid =false;
		namev.className ='validate_message_show';
	}
	else
	{
		namev.className='validate_message_hide';
	} 
	
    var name = document.getElementById('voorletters');
	var namev = document.getElementById('voorletters_error');
	if (trim(name.value) == "")
	{
		formIsValid =false;
		namev.className ='validate_message_show';
	}
	else
	{
		namev.className='validate_message_hide';
	} 

	var telefoon = document.getElementById('telefoonnummer');
	var telefoonv = document.getElementById('telefoonnummer_error');
	var telefoonformat = /^[0-9]{10}$/;
	if (trim(telefoon.value) == ""  || telefoon.value.search(telefoonformat) == -1)
	{
		formIsValid =false;
		telefoonv.className ='validate_message_show';
		
	}
	else
	{
		telefoonv.className='validate_message_hide';
	}

	var mail = document.getElementById('email');
	var mailv = document.getElementById('email_error')
	var mailformat = /^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{1,3})$/;
	if (trim(mail.value) == "" || mail.value.search(mailformat) == -1)
	{
		formIsValid =false;
		mailv.className = 'validate_message_show';
	}
	else
	{
		mailv.className = 'validate_message_hide';
	}
	
	var name1 = document.getElementById('yes');
    var name2 = document.getElementById('nee');
	var namev = document.getElementById('yesno_error');
	if (name1.checked == false && name2.checked == false)
	{
		formIsValid =false;
		namev.className ='validate_message_show';
	}
	else
	{
		namev.className='validate_message_hide';
	} 
	
	if (formIsValid)
	{
		return true;
		//document.getElementById('SANAform').submit();
	}
	else 
	{
		return false;
	}

	}
	/*end contact form*/

	/***** flash map *****/
	if (window.addEventListener) { // Mozilla, Netscape, Firefox
	    //alert("yes");
	    //window.addEventListener('load', validatemenuitem, false);
	}
	else { // IE
	    window.attachEvent('onload', showWinkels);
	}
	function showWinkels() 
	{
	    document.getElementById('outerright').style.display = 'block';
	}
	
		
	/*watermark textbox*/
	 function ChangeDefaultValueWaterMark (obj, defaulttext)
	{
		if(obj.value==defaulttext){
			obj.value='';
	}
	}
	function SetDefaultValueWaterMark (obj, defaulttext)
	{
		if(obj.value==defaulttext||obj.value.replace(/^\s+ /,'').replace(/\s+$ /,'')==''){
			obj.value=defaulttext;
	}
	}
	/*end watermark textbox*/