function swapImage(id, on)
{
	obj = document.getElementById(id);
	
	if (on == true)
	{
		obj.src = obj.src.replace('_off', '_on');
		obj.src = obj.src.replace('-off', '-on');
	}
	else
	{
		obj.src = obj.src.replace('_on', '_off');
		obj.src = obj.src.replace('-on', '-off');
	}
}


function customerserviceCloseWarning() {
    return confirm('Are you sure you want to exit? Please be aware that you will lose any data that you have entered in.');
}

function contactCustomerServiceValidate(form) {
	var required = ['name', 'email', 'cname', 'address', 'postal', 'phone', 'comments'];
	var returnValue = true;
	
	for(var i = 0; i < required.length; i++) {
		if(form.elements[required[i]].value == '') {
			$(required[i]).adjacent('label').each(function(name, index) {
				name.addClassName('alert-orange');
			});
			returnValue = false;
		} else {
			$(required[i]).adjacent('label').each(function(name, index) {
				name.removeClassName('alert-orange');
			});
		}
	}
	
	if (returnValue != true) {
		$('fill-all-fields').addClassName('alert-orange');
	}
	
	return returnValue;
}
