// google search form submitter
function goose(){
var qry=document.getElementById('googleTerm').value;
var str='http://www.google.com/custom?q=';
if(qry=='')
alert('Please enter a word or phrase to search for!');
else {
str+=escape(qry)+'&sitesearch=www.ratbike.org'
str+='&client=pub-1283927625027519&forid=1&ie=ISO-8859-1&oe=ISO-8859-1&hl=en&cof=GALT%3A%23FFFF00%3BGL%3A1%3BDIV%3A%23CCCCCC%3BVLC%3A999999%3BAH%3Acenter%3BBGC%3A333333%3BLBGC%3A000000%3BALC%3AFFFFFF%3BLC%3AFFFFFF%3BT%3ACCCCCC%3BGFNT%3A999999%3BGIMP%3A999999%3BLH%3A25%3BLW%3A75%3BL%3Ahttp%3A%2F%2Fratbike.org%2Fimages%2Fz08mbl-but.gif%3BS%3Ahttp%3A%2F%2Fratbike.org%2Fhome.html%3BLP%3A1%3BFORID%3A1%3B&domains=www.ratbike.org';
location.href=str;
}}
// image zooming
var openImages = new Array();
function zoom(img,zid){
	if(document.getElementById(zid)){
		div = document.getElementById(zid);
		div.style.visibility='visible';
		if(!in_array(zid, openImages)){
			div.innerHTML = '<a href="javascript:hide();"><b>x</b> close</a><br/>';
			div.innerHTML += '<img src="/images/prog_bw.gif" onclick="hide();" id="i'+zid+'"/>';
			setTimeout('document.getElementById("i'+zid+'").src="'+img+'";',2000);
			openImages.push(zid);
		}
	}
	if(document.getElementById('black-box')){
		vv = document.getElementById('black-box');
		vv.style.display='block';
		vv.style.height=getHeight()+'px';
	}
}
function hide(){
	for(ii in openImages)
		if(document.getElementById(openImages[ii]))
			document.getElementById(openImages[ii]).style.visibility='hidden';

        if(document.getElementById('black-box'))

setTimeout("document.getElementById('black-box').style.display='none';",250);
}

function in_array(n, h){
	for(i in h)
		if(h[i]==n)
			return true;
	return false;
}
function getHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}