function getParamValue( url, name )
{
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );

  var results = regex.exec( url );
  if( results == null )
    return null;
  else
    return results[1];
}

function addParam (url, param)
{
	// nvp[0] will equal the param name
	// nvp[1] will equal the param value
	nvp = param.split("=");

	// see if the current url contains this parameter
	value = getParamValue(url,nvp[0]);

	if (value != null)
	{
		// the parameter already exists, so we need to replace the value
		//alert (nvp[0] + "was found");

		// Here There be Dragons...
		var oldNVP = nvp[0]+"="+value;
		url = url.replace(oldNVP,param);

	}
	else
	{
		// the parameter does not exist, so add the param to the end of
		// the current url
		//alert (nvp[0] + "was not found");
		if (url.indexOf('?')==-1)
		{
			url = url + '?' + param;
		}
		else
		{
			url = url + '&' + param;
		}
	}
	//alert ("NAME VALUE PAIR:" +nvp);
	return url;


}

function selectLOB(choice){
    //alert("Property Type is: " + choice);
    if (choice=="Auto")
    {
        if (document.getElementById) {
        document.forms.landingPage.lob.value="Auto";
        document.forms.landingPage.product.value="AutoSimple";
        //alert("Product is: " + document.landingPage.product.value);
        //alert("Product is Auto: " + choice);
        }
        else
        {
        document.forms.landingPage.lob.value="Auto";
        document.forms.landingPage.product.value="AutoSimple";
        //alert("Product is: " + landingPage.product.value);
        //alert("Product is Auto: " + choice);
        };
    }
    else
    {
        if (document.getElementById) {
            document.forms.landingPage.lob.value="Property";
            document.forms.landingPage.product.value="PropSimple";
            //alert("Product is: " + document.landingPage.product.value);
            //alert("Product is Auto: " + choice);
            }
            else
            {
            document.forms.landingPage.lob.value="Property";
            document.forms.landingPage.product.value="PropSimple";
            //alert("Product is: " + document.landingPage.product.value);
            //alert("Product is Auto: " + choice);
            };
    }
    document.forms.landingPage.policyType.value=choice;
}