    //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;
        }
     //

function drawGMNButton()
	{
	//window.alert("agt is " + agt + " and version is " + navigator.appVersion + " and is_major is " + is_major + " and agt.indexOf(msie 5.0) is" + agt.indexOf("msie 5.0") + " and isie4 is " + is_ie4 + " and Iswin is " + is_win + " and isie5up is " + is_ie5up);
		// this conditional should test for browsers that support the automatic product
		// detection functionality (GMN)
		// NOTE: support for ie5 has been removed, only ie6 and ie7 are currently supported
		if(is_win && (is_ie6 || is_ie7) && (!is_opera))
		{
			// the following elements will  be displayed if the OS/browser does support GMN:
			//
			// * the separator line above the GMN section
			// * the GMN heading
			// * the GMN button
			// * the GMN "about" link
			// * any spacers in the GMN section
			document.write('<table width="360" cellspacing="0" cellpadding="0" border="0">');
			document.write('<tr>');
			document.write('<td class="color999999bg" width="170" colSpan="4">');
			document.write('<img class="decoration" height="1" alt="" src="http://welcome.hp-ww.com/img/s.gif" width="365" border="0"></td>');
			writeSpacer(17);
			document.write('</tr>');
			document.write('<tr>');
			document.write('<td colspan="4" width="360"><h3 class="bold">O detectar productos:</h3></td>');
			document.write('</tr>');
			writeSpacer(10);
			document.write('<tr>');
			document.write('<td colspan="4" valign="top" align="center">');
			document.write('<form action="http://h20270.www2.hp.com/ediags/gmn2/index.aspx" method="get" name="productDetect" id="productDetect" style="margin-bottom: 0;">');
			document.write('<input type="submit" name="detectProducts" class="primButton" value="Iniciar detección &raquo;">');
			document.write('<input type="hidden" name="lc" value="es">');
			document.write('<input type="hidden" name="cc" value="es">');
			document.write('</form>');
			document.write('</td>');
			document.write('</tr>');
			writeSpacer(10);
			document.write('<tr>');
			document.write('<td colspan="4" class="color003366" align="center"><span class="small">&raquo;&nbsp;<a href="http://h20270.www2.hp.com/ediags/gmn2/index.aspx?about=yes&amp;lc=es&amp;cc=es">Acerca de HP Product Detection</a></span></td>');
			document.write('</tr>');
			document.write('<tr class="decoration">');
			document.write('<td colspan="2"><img src="http://welcome.hp-ww.com/img/s.gif" width="1" height="20" border="0" alt=""></td>');
			document.write('</tr>');
			document.write('</table>');
		}
	}
	function writeSpacer(height)
	{
			document.write('<tr class="decoration">');
			document.write('<td colSpan="4" width="100%">');
			document.write('<img height=\"');
			document.write(height);
			document.write('\" alt=\"\" src=\"http://welcome.hp-ww.com/img/s.gif\" width=\"1\" border=\"0\">');
			document.write('</td>');
			document.write('</tr>');
	}

	//
	//---------------------------------------------------------------------------
	//
	// 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 = "Asistencia técnica y solución de problemas";
	var docTitleSupport = "Asistencia técnica y solución de problemas de HP";
	var titleDrivers = "Descargar controladores y software";
	var docTitleDrivers = "Descargar controladores y software de HP";
	var titleDefault = "Soporte y Controladores";
	var docTitleDefault = "Soporte HP Espaсa";
	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: es/es: support & troubleshooting";
	var sPageNameDrivers = "gw: es/es: software & driver download";
	var sPageNameDefault = "gw: es/es: 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

