function EraseList(L1) {
	if (L1.options.length > 1) { L1.options.length = 0;	}
}

function getCookie(v) {
	var allcookies = document.cookie;
	var pos = allcookies.indexOf(v);
	if (pos!=-1) {
		var start = pos + v.length;
		var end = allcookies.indexOf(";", start);
		if (end == -1) end = allcookies.length;
		var value = allcookies.substring(start, end);
		if (value == "") { value = "-1"; }
//		if (v == "stp1="){
//			for (di=0;di<vDS.length;di++) {
//			    if (vDSid[di] == value) { value = vDS[di]; }
//			}
//			if (value == 2) { value = "1¼"; }
//			if (value == 3) { value = "1½"; }
//		}
	}
	else if (pos == -1){ value = -1 }
	
    return value
}
	
function resWiz(){
	if (getCookie("stp1=") != -1){ document.cookie = "stp1=" }
	if (getCookie("stp2=") != -1){ document.cookie = "stp2=" }
	if (getCookie("stp3=") != -1){ document.cookie = "stp3=" }
	if (getCookie("stp4=") != -1){ document.cookie = "stp4=" }
	if (getCookie("stp4b=") != -1){ document.cookie = "stp4b=" }
//	tester(getCookie("stp1="));
//    var d = new Date();
//    document.cookie = "v0=1;expires=" + d.toGMTString() + ";" + ";";
	location.reload(true);	
}

function Step1(stp1) {
	if (stp1 != "select"){
		if (getCookie("stp2=") != -1){
			alert("Click \"Reset Wizard\" first!");
		} else {
			document.cookie = "stp1=" + stp1;
			location.reload(true);
			EraseList(document.LF.Inlet);
		}
	}
}
	
function Step2(stp2){
	if (stp2 != "select"){
		document.cookie = "stp2=" + stp2;
		location.reload(true);
	}
}
	
function Step3(stp3){
	if (stp3 != "select"){
		document.cookie = "stp3=" + stp3;
		location.reload(true);
	}
}
	
function Step4(stp4){
	if (stp4 != "select"){
		if (getCookie("stp4b=") != -1){ document.cookie = "stp4b=" }
		EraseList(document.LF.LayLength);
		document.cookie = "stp4=" + stp4;
		location.reload(true);
	}
}
	
function Step4b(stp4b) {
	if (stp4b != "select"){
		document.cookie = "stp4b=" + stp4b;
		location.reload(true);
	}
}

/*
function printing()
{
	window.print();
}
*/

var spc = "&nbsp;";
var ds = getCookie("stp1=");
var dsi = "";
var isPr=0;
var osPr=0;
var llPr=0;

if (ds != -1){
	for (di=0;di<vDS.length;di++) {
	    if (vDSid[di] == ds) { dsi = vDS[di]; }
	}
}

