function displayOption(objectname)
{
	document.getElementById('meer_info').style.display = "none";
	document.getElementById('omschrijving').style.display = "none";
	document.getElementById('reviews').style.display = "none";
	document.getElementById('mailafriend').style.display = "none";
	document.getElementById(objectname).style.display = "";
}

function hideObject(objectname)
{
	document.getElementById(objectname).style.display = "none";
}

function displayObject(objectname)
{
	document.getElementById(objectname).style.display = "";
}


function addElement(objectName, title, value, selected)
{
	var object = document.getElementById(objectName);
	//var option = document.createElement('option');
	var option = new Option(title,value,selected,selected);

	option.text = title;
	option.value = value;
	try 
	{
		object.add(option, null); // standards compliant; doesn't work in IE
	}
	catch(ex) 
	{
		object.add(option); // IE only
	}
}



function removeAllOptions(objectName)
{
	document.getElementById(objectName).options.length = 0;
}

function confirmpopup(Message, url) { 
    var is_confirmed = confirm(Message);
    if (is_confirmed) 
	{
	   location.href = url;
    }
	else return is_confirmed;
} 


function roundit(Num, Places) 
{
	if (Places > 0) 
	{
		if ((Num.toString().length - Num.toString().lastIndexOf('.')) > (Places + 1)) 
		{
			var Rounder = Math.pow(10, Places);
			return Math.round(Num * Rounder) / Rounder;
		}
		else return Num;
   }
   else return Math.round(Num);
}

function checkprijs(objEvent) 
{
  var allowed="1234567890"
  if (allowed.indexOf(String.fromCharCode(objEvent.keyCode)) == -1)
  {
    return false;
  }
}

