    function makeGIVisible(search) {
        document.getElementById('gi-wrapper').style.display='block'
        document.getElementById('gbi-wrapper').style.display='none' 
        document.getElementById('fl-wrapper').style.display='none'
         document.getElementById('gv-wrapper').style.display='none' 
       document.getElementById('gbi-tab').className='gbi-tab image-tab image-tab-inactive' 
        document.getElementById('google-tab').className='google-tab image-tab image-tab-active' 
        document.getElementById('flickr-tab').className='flickr-tab image-tab image-tab-inactive'
        document.getElementById('googlevideo-tab').className='googlevideo-tab image-tab image-tab-inactive' 
        
        var sci = new GSearchControl();

        var options = new GsearcherOptions();
        options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN); 
		sci.setResultSetSize('large');
        sci.addSearcher(new GimageSearch(), options);
        sci.draw(document.getElementById("search_control"));

        sci.execute(search);
		GSearch.getBranding(document.getElementById("gi-branding"));
    }
    function makeGVVisible(search) {
        document.getElementById('gv-wrapper').style.display='block'
        document.getElementById('gi-wrapper').style.display='none'
        document.getElementById('gbi-wrapper').style.display='none' 
        document.getElementById('fl-wrapper').style.display='none'
        document.getElementById('gbi-tab').className='gbi-tab image-tab image-tab-inactive' 
        document.getElementById('googlevideo-tab').className='googlevideo-tab image-tab image-tab-active' 
        document.getElementById('google-tab').className='google-tab image-tab image-tab-inactive' 
        document.getElementById('flickr-tab').className='flickr-tab image-tab image-tab-inactive'
        
            window._uds_vsw_donotrepair = true;

      var options = {
        twoRowMode : true
      };
      var videoSearch = new GSvideoSearchControl(
                              document.getElementById("gvsearch-control"),
                              [{ query : search}], null, null, options);

		GSearch.getBranding(document.getElementById("gv-branding"));
    }
    function makeGBVisible(search) {
        document.getElementById('gbi-wrapper').style.display='block'
        document.getElementById('gi-wrapper').style.display='none' 
        document.getElementById('fl-wrapper').style.display='none' 
        document.getElementById('gv-wrapper').style.display='none' 
        document.getElementById('gbi-tab').className='gbi-tab image-tab image-tab-active' 
        document.getElementById('google-tab').className='google-tab image-tab image-tab-inactive' 
        document.getElementById('flickr-tab').className='flickr-tab image-tab image-tab-inactive' 
        document.getElementById('googlevideo-tab').className='googlevideo-tab image-tab image-tab-inactive' 
	}
    function makeFLVisible(search,page) {
        document.getElementById('fl-wrapper').style.display='block'
        document.getElementById('gbi-wrapper').style.display='none' 
        document.getElementById('gi-wrapper').style.display='none' 
        document.getElementById('gv-wrapper').style.display='none' 
        document.getElementById('gbi-tab').className='gbi-tab image-tab image-tab-inactive' 
        document.getElementById('google-tab').className='google-tab image-tab image-tab-inactive' 
        document.getElementById('flickr-tab').className='flickr-tab image-tab image-tab-active' 
        document.getElementById('googlevideo-tab').className='googlevideo-tab image-tab image-tab-inactive' 
        makeFlickrRequest(search,page)
   }
   
   function makeFlickrRequest(search,page) {
        esearch = encodeURIComponent(search);
        url = "http://www.GreatBuildings.com/buildings/flickr_server.php?search=" + esearch + "&page=" + page;
        
        var httpRequest;

        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            httpRequest = new XMLHttpRequest();
            if (httpRequest.overrideMimeType) {
                httpRequest.overrideMimeType('text/xml');
                // See note below about this line
            }
        } 
        else if (window.ActiveXObject) { // IE
            try {
                httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }

        if (!httpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        httpRequest.onreadystatechange = function() { displayFlickrContents(httpRequest); };
        httpRequest.open('GET', url, true);
        httpRequest.send('');

    }

    function displayFlickrContents(httpRequest) {

        if (httpRequest.readyState == 4) {
            if (httpRequest.status == 200) {
                document.getElementById('fl-wrapper').innerHTML = httpRequest.responseText;
            } else {
                alert('There was a problem with the request.');
            }
        }

    }
    
    
    
    function makeGoogleWebVisible(search) {
        document.getElementById('googleweb-wrapper').style.display='block'
        document.getElementById('gbw-wrapper').style.display='none' 
        document.getElementById('gbw-tab').className='gbw-tab image-tab image-tab-inactive' 
        document.getElementById('googleweb-tab').className='googleweb-tab image-tab image-tab-active' 
        
        var scw = new GSearchControl();

        var options = new GsearcherOptions();
        options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN); 

		scw.setResultSetSize('small');
        scw.addSearcher(new GwebSearch(), options);
        scw.draw(document.getElementById("websearch_control"));

        scw.execute(search);
		GSearch.getBranding(document.getElementById("webbranding"));
    }
    function makeGBWebVisible(search) {
        document.getElementById('gbw-wrapper').style.display='block'
        document.getElementById('googleweb-wrapper').style.display='none' 
        document.getElementById('gbw-tab').className='gbw-tab image-tab image-tab-active' 
        document.getElementById('googleweb-tab').className='googleweb-tab image-tab image-tab-inactive' 
	}



    function makeGBResVisible(search) {
        document.getElementById('gbr-wrapper').style.display='block'
        document.getElementById('amazon-wrapper').style.display='none' 
        document.getElementById('gbr-tab').className='gbr-tab image-tab image-tab-active' 
        document.getElementById('amazon-tab').className='amazon-tab image-tab image-tab-inactive' 
	}
    function makeAmazonVisible(search) {
        document.getElementById('amazon-wrapper').style.display='block'
        document.getElementById('gbr-wrapper').style.display='none' 
        document.getElementById('gbr-tab').className='gbr-tab image-tab image-tab-inactive' 
        document.getElementById('amazon-tab').className='amazon-tab image-tab image-tab-active' 
        makeAmazonRequest(search)
   }
   function makeAmazonRequest(search) {
        esearch = encodeURIComponent(search);
        url = "http://www.GreatBuildings.com/gbc/amazon/amazon_products.php?search="+esearch;
        
        var httpRequest;

        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            httpRequest = new XMLHttpRequest();
            if (httpRequest.overrideMimeType) {
                httpRequest.overrideMimeType('text/xml');
                // See note below about this line
            }
        } 
        else if (window.ActiveXObject) { // IE
            try {
                httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }

        if (!httpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        httpRequest.onreadystatechange = function() { displayAmazonContents(httpRequest); };
        httpRequest.open('GET', url, true);
        httpRequest.send('');

    }

    function displayAmazonContents(httpRequest) {

        if (httpRequest.readyState == 4) {
            if (httpRequest.status == 200) {
                document.getElementById('amazon-wrapper').innerHTML = httpRequest.responseText;
            } else {
                alert('There was a problem with the request.');
            }
        }

    }


    function makeGBCVisible() {
        document.getElementById('gbc-page').style.display='block'
        document.getElementById('archiplanet-page').style.display='none' 
        document.getElementById('gbc-tab').className='gbc-tab page-tab page-tab-active' 
        document.getElementById('archiplanet-tab').className='archiplanet-tab page-tab page-tab-inactive' 
	}
    function makeAPVisible(search) {
        document.getElementById('gbc-page').style.display='none'
        document.getElementById('archiplanet-page').style.display='block' 
        document.getElementById('gbc-tab').className='gbc-tab page-tab page-tab-inactive' 
        document.getElementById('archiplanet-tab').className='archiplanet-tab page-tab page-tab-active'
        var iframe = '<iframe width="816" height="1500" style="margin-left:2px; border:thin solid #CC9933;" src="http://www.Archiplanet.org/wiki/' + search +'" scrolling="auto"></iframe>'
        document.getElementById('archiplanet-page').innerHTML = iframe;
	}
