// Dollar function allows allows elements to be accessed using their $('--elementID---')
function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}

// Function populates E-mail address with screen tip unless one has already been partially entered
function populateEmail(value) {
	if(value=="Enter E-Mail Address") {
		$('mlemail').value="";
	} 
	if(value=="") {
		$('mlemail').value="Enter E-Mail Address";
	}
}

// Function toggles the display type of an element
function toggle(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}

// Function to swap images (where 1 images is large and 3 are small)
function swapImages(ID) {		
	var oldBig=position[1];
	position[1]=position[ID];
	position[ID]=oldBig;
	$('small_'+ID).src=position[ID];
	$('big_1').src=position[1];
}