function collapseContact(id)
{
	var contactDiv	= document.getElementById(id);
	var kinderen	= contactDiv.childNodes;
	
	for(var i=0; i<kinderen.length; i++)
	{
		try{
			var kind	= kinderen[i];
			if(kinderen[i].className=="gegevens")
			{
				if(kind.style.display=="none")
				{
					kind.style.display	= "block";
					status				= "open";
				}else
				{
					kind.style.display	= "none";
					status				= "closed";
				}
			}else if(kind.className="title")
			{
				var kinderen2	= kind.childNodes;
				
				for(var j=0; j<kinderen2.length; j++)
				{
					var kind2	= kinderen2[j];
					if(kind2.className=="naam")
					{
						kind2.className="naam2";
					}else if(kind2.className=="naam2")
					{
						kind2.className="naam";
					}else if(kind2.className=="rondhoek")
					{
						kind2.className="rondhoek2";
					}else if(kind2.className=="rondhoek2")
					{
						kind2.className="rondhoek";
					}
				}
			}
		}catch(e){}
	}
}

function focusField(field)
{
	field.style.backgroundColor	= '#FFFFCC';
}
function blurField(field)
{
	field.style.backgroundColor	= 'white';
}


function CurrencyFormatted(amount)
{
	var i = parseFloat(amount);
	if(isNaN(i)) { i = 0.00; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	i = parseInt((i + .005) * 100);
	i = i / 100;
	s = new String(i);
	if(s.indexOf('.') < 0) { s += '.00'; }
	if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
	s = minus + s;
	return s;
}

function flipVisible(divId){
	el = document.getElementById(divId);
	if(el.style.display == 'none'){
		el.style.display = 'block';
	} else {
		el.style.display = 'none';
	}
}

function Wait(item,seconds,callback)
{
	this.item 			= item;
	this.callback		= callback;
	this.seconds		= seconds;
	
	var self			= this;
	this.timer			= window.setTimeout(function(){self.Execute();},seconds);
	
	this.Execute = function Execute()
	{			
		if(this != arguments.callee._oScope)
		{
			return arguments.callee.apply(arguments.callee._oScope, arguments);
		};		
	
		eval(this.callback+"(this.item)");
		this.timer			= window.setTimeout(function(){self.Execute();},seconds);
	};
	
	this.Stop = function Stop()
	{
		clearTimeout(this.timer);
	};

	//setting reference
	this.Execute._oScope = this;
};