﻿        window.onload = function() {

            var f = document.getElementById('cse-search-box');

            if (f) {

                var q = document.getElementById('q');

                var n = navigator;

                var l = location;

                if (n.platform == 'Win32') {

                    q.style.cssText = 'border: 1px solid #7e9db9; padding: 2px;';

                }

                var b = function() {

                    if (q.value == '') {

                        q.style.background = '#F0FCF8 url(http://www.brokeragereviews.org/images/main/google_custom_search_watermark.gif) left no-repeat';
                        q.style.wodth='210px';
                    }

                };

                var f = function() {

                    q.style.background = '#ffffff';

                };

   q.onfocus = f;

                q.onblur = b;

                if (!/[&?]q=[^&]/.test(l.search)) {

                    b();

                }

            }

        }

        searchkeydown = function() {

            if (window.event) {

                key = window.event.keyCode;     //IE

            }

            else {

                key = e.which;     //firefox

            }

            if (key == 13) {

                event.returnValue = false;

                event.cancel = true;

                googlesearch();

            }

        }

    

        googlesearch = function() {

        window.open('http://www.google.com/cse?q=' + escape(document.getElementById('q').value) + '&ie=ISO-8859-1&cx=partner-pub-1209652365671155:w468uzz75oy');

         }

