	var win=null;
	function WinPopupPage(w, h, page, resize) {
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
		var settings  ='height='+h+',';
			settings +='width='+w+',';
			settings +='top='+wint+',';
			settings +='left='+winl+',';
			settings +='scrollbars='+scroll+',';
			settings +='resizable='+resize+'';

		win=window.open(page,'editor',settings);
		if(parseInt(navigator.appVersion) >= 4) {
			win.window.focus();
		}
	}



function ValidateSearchBoxForm() {

	if (document.getElementById('searchstr').value.length < 3){
		alert('Please enter more than 2 characters to search for.');
		return(false);
	}
	return(true);
}


	function popup_image(image_url, title) {
		var winl = (screen.width - 200)/2;
		var wint = (screen.height - 300)/2;
		var settings ='top='+wint+',';
		settings +='left='+winl+',';
		settings +='width=200, ';
		settings +='height=300, ';
		settings +='scrollbars=no,';
		settings +='resizable=yes';

		title = title.replace(/\s/g, '%20');

		win=window.open('image_popup.php?image_url='+image_url+'&title='+title, 'image',settings);

		if(parseInt(navigator.appVersion) >= 4) {
			win.window.focus();
		}
	}

	function popup_gallery(g, i, w, h) {
		var winl = (screen.width - 700)/2;
		var wint = (screen.height - 500)/2;
		var settings ='top='+wint+',';
			settings +='left='+winl+',';
			settings +='width=700, ';
			settings +='height=500, ';
			settings +='scrollbars=no,';
			settings +='resizable=yes';

		win=window.open('/gallery_popup.php?g='+g+'&i='+i+'&w='+w+'&h='+h, 'image',settings);

		if(parseInt(navigator.appVersion) >= 4) {
		   win.window.focus();
		}
	}

	/* preload images */
	if (document.images) {
		var spacerOn = new Image();
		spacerOn.src = "images/spacer.gif";
	}
	
	function nav_mouseover (img,imgNum) {
			img.src = "/menu-images/menu" + imgNum + "-roll.gif";
			//document.images[imgName].src = "/images/1/nav/nv" + imgNum + "on.gif";
	}

	function nav_mouseout (img,imgNum) {
			//document.images[imgName].src = "/images/1/nav/nv" + imgNum + "off.gif";
			img.src = "/menu-images/menu" + imgNum + ".gif";
	}

