/*
 * main.js
 * general utility functions that can be used in any site 
 */


function imgOn( which ) {
        if(document.images) {
                document.images[which].src = 'images/' + which + '_on.gif';
        }
}
function imgOff( which ) {
        if(document.images) {
                document.images[which].src = 'images/' + which + '_off.gif';
        }
}

function preselect_form( fobj, which ) {
	if(fobj != null && fobj.options != null) {

		for(i=0; i<fobj.options.length;i++) {
			o = fobj.options[i];
			if(o.value == which) {
				o.selected = true;
			}
		}
	}
}


function zoomFolio(where) {
        window.open(where, '', 'height=500,width=825,statusbar=no,locationbar=no,scrollbars=no,menubar=no');
}

// photos.php functions

function new_album() {
	document.photo_form.page.value=1;	// default to page 1
	document.photo_form.submit();
}
