﻿function init() {
	frmSearch_attachEvent();
}

function frmSearch_attachEvent() {
	var oSearchEl = false;
	if(oSearchEl = document.getElementById('txtSearchTerm')) {
		oSearchEl.onfocus = function() {
			if(this.value == this.defaultValue) {
				this.value = '';
			}
		}
		oSearchEl.onblur = function() {
			if(this.value == '') {
				this.value = this.defaultValue;
			}
		}
	}
}


function searchsite() {
		var searchfield = document.getElementById("txtSearchTerm");
	if(searchfield.value=="Search the site")
		return;
	window.location="http://www.google.com/custom?q=&sa=Google+Search&cof=S%3Ahttp%3A%2F%2Fwww.xrfsamplecups.com%3BGL%3A0%3BAH%3Aleft%3BLH%3A102%3BL%3Ahttp%3A%2F%2Fwww.xrfsamplecups.com%2Fimages%2Fxrfsamplecups_googlesearch_logo.jpg%3BLW%3A903%3BAWFID%3Aa9c32a1d2b48ce1b%3B&domains=www.xrfsamplecups.com&sitesearch=www.xrfsamplecups.com&q="+searchfield.value;
	
	}

window.onload = init;