function ImgRoll(id, image)
{
	var obj = document.getElementById(id);
	if (obj) 
	{
		obj.src='/vimages/'+image;
	}
}
function PopImage(FileName, width, height)
{
	w = width + 20;
	h = height + 20;
	SX = Math.round((screen.availWidth - w) / 2);
	SY = Math.round((screen.availHeight - h) / 2);
	var win=window.open(FileName,'mywindow','width='+w+',height='+h+',toolbar=no,scrollbars=no,resizable=yes,menubar=no,location=no,status=no,screenX='+SX+',left='+SX+',screenY='+SY+',top='+SY);
	if(win.focus) win.focus();
}


function GC_Grotto(wpID)
{
	w = 700;
	h = 600;
	SX = Math.round((screen.availWidth - w) / 2);
	SY = Math.round((screen.availHeight - h) / 2);
	var win=window.open('https://tighnamara.ca/giftcerts/tnm_grotto_cert.asp?wpID='+wpID,'mywindow','width='+w+',height='+h+',toolbar=no,scrollbars=yes,resizable=yes,menubar=no,location=no,status=no,screenX='+SX+',left='+SX+',screenY='+SY+',top='+SY);
	if(win.focus) win.focus();
}
function GC_Resort(wpID)
{
	w = 700;
	h = 600;
	SX = Math.round((screen.availWidth - w) / 2);
	SY = Math.round((screen.availHeight - h) / 2);
	var win=window.open('https://tighnamara.ca/giftcerts/tnm_resort_cert.asp?wpID='+wpID,'mywindow','width='+w+',height='+h+',toolbar=no,scrollbars=yes,resizable=yes,menubar=no,location=no,status=no,screenX='+SX+',left='+SX+',screenY='+SY+',top='+SY);
	if(win.focus) win.focus();
}


function KeywordSearch() 
{
	var obj = document.getElementById('keywordsearch');
	if (obj) {
		obj.onclick = function () {
			obj.value = "";
			obj.style.color = "#000";
			obj.style.fontWeight = "bold";
		}
	}
};

function FormatE(name, domain, text)
{
	var strE = "<";
	strE += "a";
	strE += " href=";
	strE += "mail";
	strE += "to:";
	strE += name + "@" + domain + ">" + text + "</a>";
	document.write(strE);
};

function RunSearch(form) 
{ 
	var fld = form.keys;
	if (fld.value == '') { fld.focus(); fld.value = 'Enter Keyword'; return false; }
	if (fld.value == 'Enter Keyword') { fld.focus(); fld.style.color = '#000'; fld.style.fontWeight = 'bold'; return false; }
	return true;
};

function load() 
{
	KeywordSearch();
};

window.onload = load;
