function closeAlert( AlertObject ) {
	var Element = document.getElementById( AlertObject );
	
	$( Element ).slideUp();
}

function switchPayment( IDElement, IDValue, NameElement, NameValue ) {
	var IDObject = document.getElementById( IDElement );
	
	if ( IDObject ) {
		IDObject.value = IDValue;
	}
	
	var NameObject = document.getElementById( NameElement );
	
	if( NameObject ) {
		NameObject.innerHTML = NameValue
	} else {
		alert( 'Name object could not be set with value ' + NameValue );
	}
	
}

function toggleBox( BoxName, jQueryEffect ) {
	
	if ( ! jQueryEffect ) {
	
		//Get element that we want to toggle
		var CloseElement = document.getElementById( BoxName );
		
		//If element was found
		if ( CloseElement ) {
			if ( CloseElement.style.display == 'none' ) {
				//Element is close, then display
				CloseElement.style.display = 'block';
				//Don't continue to next, return
				return false;
			} 
	
			if ( CloseElement.style.display == 'block' ) {
				//If the element is block, then set 'none'
				CloseElement.style.display = 'none';
				//Don't continue code
				return false;
			}
		}
	} else {
		// open/close with jquery effects
		$('#' + BoxName).toggle(jQueryEffect);
	}
}