function var_dump(obj, recursive)
{	
	//var recursive = recursive||true;
	var s = var_dump_noprint(obj, 0, recursive);
	
	s = s.replace(/</g, '&lt;');
	s = s.replace(/>/g, '&gt;');
	debugwin = window.open('', 'debugwin', 'left=20,top=20,width=400,height=800,toolbar=0,location=0,status=0,scrollbars=1,resizable=1');
	debugwin.document.write('<html><body style="cursor:pointer;" onClick="self.close()"><pre>' + s + '</pre></body></html>');
	debugwin.document.close();
}

/**
* voor debuggen, wordt gebruikt door var_dump hierboven
* ook los te gebruiken: alert(var_dump_noprint(obj));
*/
function var_dump_noprint(obj, indent_level, recursive)
{

	var LINEFEED = '\n';	
	var INDENT   = '\t';
	var indent_level = indent_level||0;
	var indent_str = '';
	var j;
	for(j=0; j<indent_level; j++) {
		indent_str += INDENT;
	}
	var s = '';
	if(typeof obj == 'undefined' || obj==null) {
		s += 'undefined' + LINEFEED;
	} else if(typeof obj == 'array' || typeof obj == 'object') {
		s += typeof obj + ' (' + LINEFEED;
		if(recursive || indent_level==0) {
			var i;
			for(i in obj) {
				s += indent_str + INDENT + '[' + i + '] => ' /*+ INDENT*/ + var_dump_noprint(obj[i], (indent_level+1), recursive);
			}
		}
		s += indent_str + ')' + LINEFEED;
	} else if(typeof obj == 'function') {
		s += 'function' + LINEFEED;
	} else {
		s += '(' + typeof obj + ') ' /*+ INDENT*/ + obj + LINEFEED;
	}
	return s;
}

//Event.observe(window, 'load', function() 
//{
//	// nav();
//});
//Hier worden de navigatie items aangeroepen
function nav()
{
	var Navigators 		= new Array();
	newNavigator = new NavigatorCollection();
	newNavigator.getNavigator({
		'id'				:	"menu1",
		'activeitem'		:	"brand",
		'activatesubmenu'	:	"hover",
		'effect'			:	"slide"
	});
	newNavigator.getNavigator({
		'id'				:	"menu2",
		'submenu'			:	"downblind",
		'activatesubmenu'	:	"hover",
		'effect'			:	"slide"
	});
}


function RunFoo()
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="128" height="38" id="main" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="/images/banners/reprovinci.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="bgcolor" value="#FFFFFF" />\n');
	document.write('<param name="wmode" value="opaque" />\n');
	document.write('<embed src="/images/banners/reprovinci.swf" wmode="opaque" quality="high" bgcolor="#FFFFFF" width="128" height="38" name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
}


function RunVideo()
{
	document.write('<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="320" height="240" id="short" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="/images/short.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="bgcolor" value="#ffffff" />\n');
	document.write('<embed src="/images/short.swf" quality="high" bgcolor="#ffffff" width="320" height="240" name="short" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
}


function updateCart(cartcollection)
{
	
	var totalamount = cartcollection.jsonobj.totalcleanprice;

//   	 if (cartcollection.jsonobj.shippingcosts == 0)
//   	 {
//     	document.getElementById('tr_1a').style.display = 'none';
//   	 }
//   	 else
//   	 {
//   	 	
//   	 	if (isie)
//   	 	{
//   	 		document.getElementById('tr_1a').style.display = 'block';
//   	 	}
//   	 	else
//   	 	{
//   	 		document.getElementById('tr_1a').style.display = '';
//   	 	}
//   	 	
//   	 }
   	 document.getElementById("quantity").innerHTML = cartcollection.jsonobj.totalquantity;
   	 document.getElementById("description2").innerHTML = cartcollection.jsonobj.totalprice;
}

function showHideElement(source, target)
{	
	if(document.getElementById(source).checked == 1)
	{
		document.getElementById(target).style.display = 'block';
	}
	else
	{
		document.getElementById(target).style.display = 'none';
	}
}
