function GetData()
{
	var type = document.selection[0]
	for (var i = 0; i <document.selection.type.length; i++) {
		if (document.selection.type[i].checked) {
			break
			}
		}

var URL = "default.asp?Caliber="
var Caliber = (document.data.caliber2.options[document.data.caliber2.selectedIndex].value)
var Source = Caliber + "&Source=" + document.data.Source.value
var FullUrl = URL + Source + "&Type="+ document.selection.type[i].value

// alert (URL);
// alert (weight);
// alert (FullUrl);

var replaceStr = "%20"
var FullUrl = FullUrl.replace(" ", replaceStr)
var FullUrl = FullUrl.replace(" ", replaceStr)
var FullUrl = FullUrl.replace(" ", replaceStr)
location.href= FullUrl;
// top.bweight.location.href= FullUrl;
// top.bweight.location.href= NewURL
// top.data.location.href= "data.htm";

}

function GetLoadData()
{

// document.data.flag2.click();

	var sort = document.Order[0]
	for (var i = 0; i <document.Order.sort.length; i++) {
		if (document.Order.sort[i].checked) {
			break
			}
		}

var URL = "default.asp?Caliber="
var Caliber = (document.data_bw.caliber_text.value)
var type = (document.data_bw.type_text.value)
var weight = "&Weight=" + (document.data_bw.BulletWeight2.options[document.data_bw.BulletWeight2.selectedIndex].value)
var FullUrl = URL + Caliber + weight + "&type=" + type + "&Order=" + (document.Order.sort[i].value)

// alert (URL);
// alert (Caliber);
// alert (weight);

// alert (FullUrl);
var replaceStr = "%20"
var FullUrl = FullUrl.replace(" ", replaceStr)
var FullUrl = FullUrl.replace(" ", replaceStr)
var FullUrl = FullUrl.replace(" ", replaceStr)
// top.data.location.href= "default.asp?caliber=9 mm&weight=90";
var FullURL2 = FullUrl + "&Source=" + document.data.Source.value
location.href= FullURL2;

}

function GetCalibers()
{

var URL;

	var type = document.selection[0]
	for (var i = 0; i <document.selection.type.length; i++) {
		if (document.selection.type[i].checked) {
			break
			}
		}

// alert (type);

// alert (document.selection.type[i].value);

var URL = "default.asp?type="+ document.selection.type[i].value + "&Source=" + document.data.Source.value
// alert (URL);
location.href= URL;
//top.data.location.href= "data.htm";
//top.bweight.location.href="bweight.asp";
}

function ReSort()
{
var W = (document.data_bw.BulletWeight2.options[document.data_bw.BulletWeight2.selectedIndex].value)
if (W == "All") { alert ("I'm sorry, resorting by Powder or Velocity does not work when All bullet weights are selected") }

else if ( W != "All") {
	var sort = document.Order[0]
	for (var i = 0; i <document.Order.sort.length; i++) {
		if (document.Order.sort[i].checked) {
			break
			}
		}


// alert (document.Order.sort[i].value);

var URL = "default.asp?Caliber="
var Caliber = (document.data_bw.caliber_text.value)
var type = (document.data_bw.type_text.value)
var weight = "&Weight=" + (document.data_bw.BulletWeight2.options[document.data_bw.BulletWeight2.selectedIndex].value)
var FullUrl = URL + Caliber + weight + "&type=" + type + "&Order=" + (document.Order.sort[i].value) 

var replaceStr = "%20"
var FullUrl = FullUrl.replace(" ", replaceStr)
var FullUrl = FullUrl.replace(" ", replaceStr)
var FullUrl = FullUrl.replace(" ", replaceStr)

var FullURL2 = FullUrl + "&Source=" + document.data_bw.Source.value
location.href= FullURL2;
// alert (FullUrl);

}
}