
/*
	site search box
	
	requires: globals.js
	
	
	©2009 Copyright HMH, Inc.   thinkhmh.com
	Do not sell or transfer without the expressed written consent of HMH.
	This message must remain intact wherever/however this file is used.
*/

var SEARCH = {
    init: function() {
        var frm = HMH.getById("gsitesearch");
        var bx = HMH.getByClass("searchbox", frm);
        if (bx.length > 0 ) {
            bx[0].value = "search";
            bx[0].onblur = function() {
                if (bx[0].value == "") {
                    bx[0].value = "search";
                    bx[0].className = String(bx[0].className).replace(/dim/gi, "") + " dim";
                }
            }
            bx[0].onfocus = function() {
                if (bx[0].value == "search") {
                    bx[0].value = "";
                    bx[0].className = String(bx[0].className).replace(/dim/gi, "");
                }
            }
        }
    }
};

GLOBALS.addOnload(SEARCH.init);