/*AVP Referal Module */

var whoisit;
/*
possibles are 
?[something]                  which will go straight to a product called something
?searchstring[something]      which initiates a search for the string something
?site=something               which registers any sale as having come from the company something
*/

	if (location.search.length>0)
	{
	  /* passed a string from one of our lovely dealers */
	  whoisit=location.search.substring(1);
	  whoisit=whoisit.toLowerCase();
  /*is it a string that contains a search?*/
  if (whoisit.indexOf("searchstring")!=-1)
  {
    srchstr="";
    pos=0;
    pos=whoisit.indexOf("searchstring")
    srchstr=whoisit.substring(pos+13,whoisit.length)
    document.srchfrm.srchstring.value=srchstr;
document.srchfrm.submit();

	
  }
  else
  {

	  /*is it a string that contains a search?*/

	    if (whoisit.indexOf("site=")!=-1)
	    {
	        /*do nothing this is a refferral so don't look for the product dummy!*/
	    }
	    else
	    {
	        top.theframe.location="products/"+whoisit+".htm";

	    }
	}

  }

