
//Celebros Area

function check_value() {
    if (document.getElementById('textfield').value == 'Enter Keyword or Sku#') {
        document.getElementById('textfield').value = '';
    }
    
    if (document.getElementById('textfield').value == '') {
        alert('Please enter a value before attempting a search.');
    }
    else {
		//newURL = window.location.protocol + "//" + window.location.host + "/webapp/wcs/stores/servlet/AjaxCatalogSearchResultView?AtcSimpleSearchAlpha1%3Atextfield=" + document.getElementById('textfield').value ;
        top.location.href = getNewURL();
        
    }
    return false;
}

function submit_chars(e)
{

	var char;
	if (window.event) 
	{ 
		char= window.event.keyCode;
	} else {
		char= e.keyCode;
	}
	if (char == '13') 
	{
		//newURL = window.location.protocol + "//" + window.location.host + "/webapp/wcs/stores/servlet/AjaxCatalogSearchResultView?AtcSimpleSearchAlpha1%3Atextfield=" + document.getElementById('textfield').value ;
		top.location.href = getNewURL();
		return false;
	}
}


function onSelect(aParameter)
{ 
    if ((aParameter["SelectedURL"]!="")&&(aParameter["IsAutoComplete"]))
    {
        window.location = aParameter["SelectedURL"];
    }
    else
    { 
    	newURL = window.location.protocol + "//" + window.location.host + "/webapp/wcs/stores/servlet/AjaxCatalogSearchResultView?textfield="+escape(aParameter["SelectedQuery"]+cachedparameters);
        top.location.href = newURL
        //window.location="http://search.performbetter.com/search.aspx?textfield="+escape(aParameter["SelectedQuery"]);	
    }
}

//end ... Celebros Area

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

