


function setImage(objImage, image)
{
	source = objImage.src;
	
	source = source.substring(0, source.lastIndexOf("/")+1);
	
	objImage.src = source + image;
	

}


function deleteInitialText(objInput)
{
	if (objInput.value == "Vul hier uw reiscode in")
	{
		objInput.value = "";
		objInput.className = "active";
	}
}

function insertInitialText(objInput)
{
	strInitialText = "Vul hier uw reiscode in";

	if (objInput.value == "") 
	{
		objInput.value = strInitialText;
		objInput.className = "inactive";
	}
}



function showElement(strElementID) 
{
	objElement = document.getElementById(strElementID);
	objElement.style.visibility = "visible";
	objElement.style.display = "block";
}

function hideElement(strElementID) 
{
	objElement = document.getElementById(strElementID);
	objElement.style.visibility = "hidden";
	objElement.style.display = "none";
}

function toggleElement(strElementID) 
{
	objElement = document.getElementById(strElementID);
	
	if ((objElement.style.visibility == "") || (objElement.style.visibility == "hidden"))
	{
		showElement(strElementID);
	} else {
		hideElement(strElementID);
	}
}

function toggleElementByCheckBox(strElementID, objCheckBox, blnSlide)
{
	if (objCheckBox.checked)
	{
		if (blnSlide) {
			Effect.SlideDown(strElementID, {duration:0.25});
		} else {
			showElement(strElementID);
		}
	} 
	else 
	{
		if (blnSlide) {
			Effect.SlideUp(strElementID, {duration:0.25});
		} else {
			hideElement(strElementID);
		}
		
	}
}


function changeCellValueByCheckbox(strElementID, objCheckBox, amountToAdd)
{
	objCell = document.getElementById(strElementID);
	
	var curAmount = objCell.firstChild.nodeValue;
	
	newAmount = curAmount.replace(",", ".");
	
	if (objCheckBox.checked) {
		newAmount = Number(newAmount) + amountToAdd;
	} else {
		newAmount = Number(newAmount) - amountToAdd;
	}
	
	newAmount = newAmount.toFixed(2);
	
	objCell.firstChild.nodeValue = newAmount;
	
}

function showUpdater()
{
	Effect.SwitchOff("updating", {duration:0.55});
}


function setMainImage(newSource)
{
	document.mainimage.src = newSource;
}

function hoverOn(objDiv)
{
	objDiv.className = "thumb-on";
}

function hoverOff(objDiv)
{
	objDiv.className = "thumb";
}