function showBusyLayer() {
	var busyLayer = document.getElementById("busy_layer")
	if (busyLayer != null) {
		busyLayer.style.visibility = "visible";
		busyLayer.style.height = "1000%";
	}
}

function hatch(a, b) {
	var div1 = document.getElementById("lochatched1");
	var div2 = document.getElementById("lochatched0");
	var pp = document.getElementById("placepoke");
	if (div1 != null) {
		if (a == 1) {
			div1.style.display = "block";
			div2.style.display = "none";
			pp.value = 16;
		} else {
			div2.style.display = "block";
			div1.style.display = "none";
			pp.value = b;
		}
	}
}

function editor(a) {
	var div1 = document.getElementById("editcustom");
	var div2 = document.getElementById("editevent");
	if (div1 != null) {
		if (a == 1) {
			div1.style.display = "block";
			div2.style.display = "none";
		} else {
			div2.style.display = "block";
			div1.style.display = "none";
		}
	}
}

function showInfo(a, b)
{
	var output = "";
	var target = document.getElementById(b);
	output = document.getElementById(a).innerHTML;
	
	target.innerHTML = output;
}

function submitform(extravalue)
{
	showBusyLayer();
	if (extravalue > 0) {
		document.theform.editextra.value = extravalue;
	}
	document.theform.action.value = "";
	document.theform.submit();
}

function submitform2(v)
{
	showBusyLayer();
	document.theform.extraall.value = v;
	document.theform.anchor.value = "boxview";
	document.theform.submit();
}

function changebox(v)
{
	showBusyLayer();
	document.theform.boxchange.value = v;
	document.theform.anchor.value = "boxview";
	document.theform.submit();
}

function changemode(modevalue)
{
	showBusyLayer();
	document.theform.mode.value = modevalue;
	document.theform.anchor.value = "boxview";
	document.theform.submit();
}

function checkout()
{
	showBusyLayer();
	document.theform.action.value = "checkout";
	document.theform.submit();
}

function ebaycheckout()
{
	showBusyLayer();
	document.theform.action.value = "ebaycheckout";
	document.theform.submit();
}

function resetconfig()
{
	showBusyLayer();
	document.theform.anchor.value = "top";
	document.resetall.submit();
}

function nosubmit() {	
}

function showdetails(l) {
	var div1 = document.getElementById("layer_"+l);
	var div2 = document.getElementById("layer_"+l+"0");
	div1.style.display = "block";
	div2.style.display = "none";
}

function a(s) { //Anchor
	document.theform.anchor.value = s;
}