function jumpto(menu)
{

ref=menu.choice.options[menu.choice.selectedIndex].value;

if (ref != "") 
	{
	fullref = "gallery_" + ref + ".html";	
	window.location=fullref;}
}

/**
 * clearForm
 * clears every input field in the given form object
 */
function clearForm(form) {

	// iterate over form elements
	for (var i=0; i<form.elements.length; i++) {
		
		// get element and associated type
		var element = form.elements[i];
		var type = element.type;
		
		// text and textarea elements
		if (type.indexOf("text") != -1)
			element.value = "";
		// checkbox and radio button elements
		else if (type == "checkbox" || type == "radio")
			element.checked = false;
		// select element
		else if (type.indexOf("select") != -1)
			element.selectedIndex = 0;
	}
}

/**
 * submitForm
 * submits the named form
 */
function submitForm(name) {
	// get the form
	var form = getObject(name);

	// if the form exists submit it
	if (form != null) {
		form.submit();
	} else {
		alert("form " + name + " does not exist!");
	}
}


/**
 * openWindow
 * opens a window of specified width and height
 */
function openWindow(url, name) {
	var newWindow;	
	var features = 'toolbar=yes,location=no,dependent=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,top=1,left=1,width=700,height=400';
	newWindow = window.open(url,name,features);
}

function openMapWindow(url, name) {
	var newWindow;	
	var features = 'toolbar=yes,location=no,dependent=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,top=1,left=1,width=500,height=500';
	newWindow = window.open(url,name,features);
}

function openImageWindow(url, name) {
	var newWindow;	
	var features = 'toolbar=yes,location=no,dependent=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,top=1,left=1,width=450,height=300';
	newWindow = window.open(url,name,features);
}

/**
 * closeWindow
 * closes the current window
 */
function closeWindow() {
	window.close();
}

function contact(address, display) {
	document.write("<a" + " href=\"mailto:" + address + "@ho" + "tmai" + "l.co" + "m\"" + "class=\"email\"" + ">" + display + "</a>");
}

function contactdark(address, display) {
	document.write("<a" + " href=\"mailto:" + address + "@ho" + "tmai" + "l.co" + "m\"" + "class=\"emaildark\"" + ">" + display + "</a>");
}	