<div id="deltr-filter">

<div class=" deltr-filter-loader">Loading...</div>

<h3 class="with-icon"<span data-icon=";" role="img" title="image: filter search results" class="icon x32 left-align"</span>Search Results</h3>

<select id=" deltr-filter-year">

option>SelectYear</option>

option>------</option>

<option value="1964">1964</option>

<option value="1984">1984</option>

<option value="1993">1994</option>

<option value="2011">2011</option>

<option value="All">View All</option>

</select>

<select id="deltr-filter-division">

option>Select Division</option>

option>------</option>

<option value="1">Div. 1</option>

<option value="2">Div. 2</option>

<option value="3">Div. 3</option>

<option value="4">Div. 4</option>

<option value="5">Div. 5</option>

<option value="6">Div. 6</option>

<option value="7">Div. 7</option>

<option value="8">Div. 8</option>

<option value="9">Div. 9</option>

<option value="10">Div. 10</option>

<option value="11">Div. 11</option>

<option value="12">Div. 12</option>

<option value="13">Div. 13</option>

<option value="14">Div. 14</option>

</select>

<select id="deltr-filter-product">

option>Select Product</option>

option>------</option>

<option value="Field Requests">Field Requests</option>

<option value="Corrections">Corrections</option>

<option value="HTOs">HTOs</option>

<option value="TIPs">TIPs</option>

<option value="Purchase Order Contracts">Purchase Order Contracts</option>

<option value="Municipal Agreements">Municipal Agreements</option>

<option value="Petitions">Petitions</option>

<option value="Other">Other</option>

<option value="All">View All</option>

</select>

<a href="#" class="button important search-deltr">Get Report</a>

</div>

script

(function($){

if(typeof $ != 'function')

{

return;

}

}

// Read a page's GET URL variables and return them as an associative array.

functiongetUrlVars()

{

varvars = [], hash;

var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');

for(vari = 0; ihashes.length; i++)

{

hash = hashes[i].split('=');

vars.push(hash[0]);

vars[hash[0]] = hash[1];

}

returnvars;

}

// get page name

varpageUrl = window.location.pathname,

pageName = pageUrl.substring(pageUrl.lastIndexOf('/') + 1);

// this is where we create the url string for the filter & the wisk the visitor off to the search results.

$('#deltr-filter .search-deltr').click(function()

{

varyear= $('#deltr-filter-year').val(),

division= $('#deltr-filter-division').val(),

product= $('#deltr-filter-product').val(),

url= 'TestQueryString2Page.aspx';

document.location.href = url + '?deltr-type-year=' + 'deltr-filter-division' + 'deltr-filter-product';

};

$('.deltr-filter-loader').fadeOut(1800);

})( (typeofjQuery == 'undefined' || jQuery) );

</script>

script

(function($){

if(typeof $ != 'function')

{

return;

}

// Read a page's GET URL variables and return them as an associative array.

functiongetUrlVars()

{

varvars = [], hash;

var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');

for(vari = 0; ihashes.length; i++)

{

hash = hashes[i].split('=');

vars.push(hash[0]);

vars[hash[0]] = hash[1];

}

returnvars;

}

// get page name

varpageUrl = window.location.pathname,

pageName = pageUrl.substring(pageUrl.lastIndexOf('/') + 1);

// show/hide the year selection dropdown (show the year that was chosen in the box)

$('#deltr-filter #deltr-filter-year').change(function() {

vardeltrTypeChange = $(this).val();

if (deltrTypeChange == 'Select Year'){

$('#deltr-filter-year, .deltr-filter-year-label').animate({

opacity: 1,

width: 75

}, 600, function() {

// Animation complete.

});

$('#deltr-filter a.button').animate({

left: 485

}, 600, function() {

// Animation complete.

});

}

else if (deltrTypeChange == 'SelectYear' || deltrTypeChange == '------'){

}

else if ((deltrTypeChange != 'Select Year') & (deltrTypeChange != 'SelectYear' || deltrTypeChange != '------')){

$('#deltr-filter-year, .deltr-filter-year-label').animate({

opacity: 0,

width: 0

}, 600, function() {

});

$('#deltr-filter a.button').animate({

left: 420

}, 600, function() {

// Animation complete.

});

}

});

// is this TestQueryString2Page.aspx? well then, let us adjust those dropdowns shall we....

if (pageName == 'TestQueryString2Page.aspx') {

var type-division= getUrlVars()["deltr_division"],

status-product= getUrlVars()["deltr_product"];

if (type-division != undefined) {

if (type-year.length <= 2) {

$('#deltr-filter #deltr-filter-divisionoption[value="Select Division"]').attr('selected','selected');

$('#deltr-filter #deltr-filter-division option[value="' + type-division + '"]').attr('selected','selected');

$('#deltr-filter-division, .deltr-filter-division-label').animate({

opacity: 1,

width: 75

}, 600, function() {

// Animation complete.

});

$('#deltr-filter a.button').animate({

left: 485

}, 600, function() {

// Animation complete.

});

} else {

$('#deltr-filter #deltr-filter-yearoption[value="' + type-division + '"]').attr('selected','selected');

}

}

if (status-product != undefined) {

$('#deltr-filter #deltr-filter-productoption[value="' + status-product + '"]').attr('selected','selected');

}

functionchangeHeader(t, s) {

//alert("DE Letter List");

if (type-division == undefined) {

if (status-product == undefined) {} else {

if(status-product == 'Field Requests') {$('h1 small').html('Viewing: <span class="highlight">Field Requests</span>');}

else if(status-product == 'Corrections') {$('h1 small').html('Viewing: <span class="highlight"> Corrections </span>');}

else if(status-product == 'HTOs') {$('h1 small').html('Viewing: <span class="highlight">HTOs</span>');}

else if(status-product == 'TIPs') {$('h1 small').html('Viewing: <span class="highlight">TIPs</span>');}

else if(status-product == 'Purchase Order Contracts') {$('h1 small').html('Viewing: <span class="highlight">Purchase Order Contracts</span>');}

else if(status-product == 'Municipal Agreements') {$('h1 small').html('Viewing: <span class="highlight">Municipal Agreements</span>');}

else if(status-product == 'Petitions') {$('h1 small').html('Viewing: <span class="highlight">Petitions</span>');}

else{$('h1 small').html('Viewing: <span class="highlight">' + status-product + ' </span>');}

}

}else {

if (type-division.length <= 2) {

$('h1').html('DE Letters: <span class="highlight">Division ' + t + ' Reports</span<small>Viewing: <span class="highlight">All DE Letter Reports</span</small>');

} else {

$('h1').html('DE Letters List: <span class="highlight">' + t + ' Reports</span<small>Viewing: <span class="highlight">All DE Letter Reports</span</small>');

}

if (status-product == undefined) {} else {

if(status-product == 'Field Requests') {$('h1 small').html('Viewing: <span class="highlight">Field Requests</span>');}

else if(status-product == 'Corrections') {$('h1 small').html('Viewing: <span class="highlight">Corrections</span>');}

else if(status-product == 'HTOs') {$('h1 small').html('Viewing: <span class="highlight">HTOs</span>');}

else if(status-product == 'TIPs') {$('h1 small').html('Viewing: <span class="highlight">TIPs</span>');}

else if(status-product == 'Purchase Order Contracts') {$('h1 small').html('Viewing: <span class="highlight">Purchase Order Contracts</span>');}

else if(status-product == 'Municipal Agreements') {$('h1 small').html('Viewing: <span class="highlight">Municipal Agreements</span>');}

else if(status-product == 'Petitions') {$('h1 small').html('Viewing: <span class="highlight">Petitions</span>');}

else{$('h1 small').html('Viewing: <span class="highlight">' + status-product + '</span>');}

}

}

$('h1').css('background-color','#ffffff');

$('h1').animate({'opacity':'1'}, 900);

}

changeHeader(type-division, status-product);

}

// this is where we create the url string for the filter & the wisk the visitor off to the search results.

$('#deltr-filter .search-lets').click(function() {

varyear= $('#deltr-filter-year').val(),

division= $('#deltr-filter-division').val(),

product= $('#deltr-filter-product').val(),

url= 'TestQueryString2Page.aspx';

functioncheckStatus(t,s){

if ((s == 'Select Product' || s == '------' || s == 'All') & t != 'All') {

document.location.href = url + '?deltr_type-year=' + t;

} else if ((s == 'Select Product' || s == '------' || s == 'All') & t == 'All') {

document.location.href = url;

} else if ((s != 'SelectProduct' || s != '------' || s != 'All') & t == 'All') {

document.location.href = url + '?deltr_product=' + s;

} else if ((s != 'SelectProduct' || s != '------' || s != 'All') & t != 'All') {

document.location.href = url + '?deltr_year=' + t + '&deltr_product=' + s;

}

//alert(t + s);

}

// make sure they made a choice - Year

if (type == 'SelectYear' || type == '------') {

alert('Please select a Year first.');

}

else {

//choice made, is it a division?

if (type == 'Select Division') {

// yes, divsion

if (division == 'Select Division' || division == '------') {

alert('Please select a Division or choose a DE Letter Product');

} else {

type = division;

checkStatus(type-year, type-product);

}

} else {

// nope, not a year

checkStatus(type-year, type-product);

}

}

});

$('.deltr-filter-loader').fadeOut(1800);

})( (typeofjQuery == 'undefined' || jQuery) );

</script>