function KofC_ChangeStateWithSpan(id, state, spanstate) {
	var spanid = id + "span";
    if (document.getElementById) { // NETSCAPE 6, IE 5.X+
     //   document.getElementById(id).className = state;
        document.getElementById(spanid).className = spanstate;
    } else if (document.all) {
      //  document.all[id].className = state;
        document.all[spanid].className = spanstate;
    }
}

function showOrHide(id, b)
{
	//alert("showOrHide " + id);
	var obj = document.getElementById(id);
	if(b)
	{
		obj.style.display = "inline";
	}
	else
	{
		obj.style.display = "none";
	}
	
}

function getId()
{
	alert("getId");
	return "0"
}

function updateQuantity(index, type)
{
//	alert("updateQuantity index " + index);
	var loc = "updateQuantity.action?quantity=";
	var quantity;
	var title;
	var titleObjName = type + "_title" + index;
	var quantObjName = type + index;
	var obj = document.getElementById(titleObjName);
	title = obj.value;
	obj = document.getElementById(quantObjName);
	quantity = obj.value;
	loc += quantity;
	loc += "&title=";
	loc += title;
	loc += "&type=";
	loc += type;
	document.location = loc;
	//VHS_title
//	document.location = "updateQuantity.action?quantity=50&title=124th+Annual+Supreme+Council+Meeting&type=VHS";
}

function deleteVideo(index, type)
{
//	alert("updateQuantity index " + index);
	var loc = "deleteVideo.action?title=";
	var title;
	var titleObjName = type + "_title" + index;
	var obj = document.getElementById(titleObjName);
//	alert("titleObjName " + titleObjName);
	title = obj.value;
	loc += title;
	loc += "&type=";
	loc += type;
	document.location = loc;
	//VHS_title
//	document.location = "updateQuantity.action?quantity=50&title=124th+Annual+Supreme+Council+Meeting&type=VHS";
}

function addTheVideo()
{
	showOrHide("transparentDiv", true);
	showOrHide("insertDiv", true);	
}

function videoAdded()
{
	showOrHide("insertDiv", false);
	showOrHide("transparentDiv", false);
}

