    //Begin Empty text field validation
    function validText() {
        if  (document.productQuery.h_query.value == "" || document.productQuery.h_query.value == document.productQuery.h_query.defaultValue) {
            document.productQuery.h_query.focus();
                 if (document.productQuery.h_pagetype[0].checked == true){
                    alert("Please enter a product name or number");
                    return false;
                }
                if (document.productQuery.h_pagetype[1].checked == true){
                    alert("Please enter a product name or number");
                    return false;
                }
                else
                {
                    alert("Please select a search option and enter your product name or number");
                    document.productQuery.h_query.focus();
                    return false;
                }
            }
            return true
        }
    // Clear text box information function
    function clearText(textInfo){
        if (textInfo.value == textInfo.defaultValue){
            textInfo.value = "" ;
            }
        }

    // Begin Form Validation
    function validateForm(){
        if (!validText())
            return false;
        return true;
        }
     //



	//
	//---------------------------------------------------------------------------
	//
	// getVars()
	//
	// PURPOSE:
	//  this is a utility function that will check the query string for the
	//  current window's URL.  For each 'variable=value' pair in the query
	//  string, it will create a variable that contains the string equivalent
	//  of that value.  This makes these variables available to the code on the
	//  rest of the page.
	//
	//
	//---------------------------------------------------------------------------
	function getVars()
	{
	   var varString = window.location.search.substring(1);
	   var varArray = varString.split('&');
	   var expression;
	   var tempArray;
	   for (i=0;i<varArray.length;i++)
	   {
			if (varArray[i].indexOf("=") >= 1)
			{
				tempArray = varArray[i].split('=');
				expression = tempArray[0] + "=\'" + tempArray[1] + "\'";
				eval(expression);
			}
	   }
	}
	// This function will preset the radio.  You have to initialize "selectedValue" somewhere or it will not work.
	var selectedValue = "";
	function setRadio()
	{
	var myRadio = document.productQuery.h_pagetype;
		for (var i=0; i<myRadio.length; i++)
		{
			if (myRadio[i].value == selectedValue)
			{
				myRadio[i].checked = true;
				return;
			}
		}
	}

// Here we define the correct elements for the page, depending on how it is to be displayed.
// NOTE: if the defaults change you MUST change the NOSCRIPT tags in the page to match.
	var titleSupport = "Tugi ja veaotsing";
	var docTitleSupport = "HP tugi ja veaotsing";
	var titleDrivers = "Tarkvara ja draiverite allalaadimine";
	var docTitleDrivers = "HP tarkvara ja draiverite allalaadimine";
	var titleDefault = "Tugi ja draiverid";
	var docTitleDefault = "HP tugi ja draiverid";
	var imageSupport = "http://welcome.hp-ww.com/country/img/emea/support/support9_selected.jpg";
	var imageDrivers = "http://welcome.hp-ww.com/country/img/emea/support/support2_selected.jpg";
	var imageDefault = "http://welcome.hp-ww.com/country/img/emea/support/support.jpg";
	var colorSupport = "#0066FF";
	var colorDrivers = "#990000";
	var colorDefault = "#336666";
	var sPageNameSupport = "gw: ee/et: support & troubleshooting";
	var sPageNameDrivers = "gw: ee/et: software & driver download";
	var sPageNameDefault = "gw: ee/et: support & drivers";
	var pagetypeDefault =  "h_pagetype=s-001";
	var pgTitle = titleDefault;
	var docTitle = docTitleDefault;
	var pgImage = imageDefault;
	var colorTheme = colorDefault;
	var sPageName = sPageNameDefault;
	var sPagetype = pagetypeDefault;
	getVars();
	if (typeof pageDisplay != "undefined")
	{
		if (pageDisplay == "support")
		{
			docTitle = docTitleSupport;
			pgTitle = titleSupport;
			pgImage = imageSupport;
			sPageName = sPageNameSupport;
			colorTheme = colorSupport;
			selectedValue = "s-001";
			window.onload = setRadio;
		}
		else if (pageDisplay == "drivers")
		{
			docTitle = docTitleDrivers;
			pgTitle = titleDrivers;
			pgImage = imageDrivers;
			sPageName = sPageNameDrivers;
			colorTheme = colorDrivers;
			selectedValue = "s-002";
			window.onload = setRadio;
		}
		sPagetype = "h_pagetype=" + selectedValue;
	}
	document.title = docTitle;
	theme = colorTheme
	s_pageName = sPageName

