/*
Javascript file for ALL scripts used on CYC Sydney Hobart Yacht Race
Created 6/11/2002 by Todd Baker @ Massive
*/
function RollImage(objImage, strImage){
	var objStr,obj;
	if(document.images){
		objStr = 'document.' + objImage;
		obj = eval(objStr);
		obj.src = strImage;
	}
}
function SubmitSearch(){
	var strS = document.frmSearch.search.value
	if (strS != "" && strS != "Keyword Search"){
		document.frmSearch.submit()
	}else{
		alert("Please enter a word to search for.")
	}
}
function Reset(obj){
	if(obj.value == ""){
		obj.value = "Keyword Search";
	}
}
function preload() {
	if (!document.images) return;
	var ar = new Array();
	var arguments = preload.arguments;
	for (var i = 0; i < arguments.length; i++) {
		ar[i] = new Image();
		ar[i].src = arguments[i];
	}
}
function openPopup(url, w, h){
	if (!w)
		w = 500;
		
	if (!h)
		h = 500;
		
	if (url != ""){
		var objGalleryWindow = window.open(url,'gallery','height=' + h + ',width=' + w + ',left=50,top=50,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0');
		//setTimeout('objGalleryWindow.focus();',100);
	}
}
function openYacht(url){
	if (url != ""){
		var objYachtWindow = window.open(url,'yacht','height=600,width=600,left=50,top=50,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0');
	}
}
function openFavourites(url){
	if (url != ""){
		var objFavWindow = window.open(url,'yacht','height=600,width=600,left=50,top=50,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0');
	}
}
