

function LaunchSubscribe(inID)
{
	var myURL = "http://www.torahohr.net/lists/?p=subscribe&id=" + inID;
	window.open(myURL, "subscribeWin", "resizable=0,location=0,scrollbars=1,directories=0,toolbar=0,status=0,menubar=0,width=450,height=450");
}


function LaunchSlichot()
{
	window.open("http://www.torahohr.net/audio/slichot/index.html", "slichotWin", "resizable=0,location=0,scrollbars=1,directories=0,toolbar=0,status=0,menubar=0,width=450,height=500");
	
}

function LaunchOlman()
{
	window.open("http://www.torahohr.net/audio/olman/index.html", "olmanWin", "resizable=0,location=0,scrollbars=1,directories=0,toolbar=0,status=0,menubar=0,width=450,height=600");
	
}

function FilterLanguage()
{
	var myLocation = "video.php?";

	var lang = GetDropDownValue(document.filter_form.Language_Filter);
	if (lang != "all") {
		myLocation = myLocation + "lang=" + lang + "&";
	}

	var cat = GetDropDownValue(document.filter_form.Category_Filter);
	if (cat != "all") {
		myLocation = myLocation + "cat=" + cat + "&";
	}

	window.location.href = myLocation;

}


function GetDropDownValue(inObj)
{
	var i;

	//gLogWin.document.write("GetDropDownValue: " + inObj.type + "<BR>");
	for (i = 0; i < inObj.options.length; i++) {
		if (inObj.options[i].selected) {
			return inObj.options[i].value;
		}
	}
	//alert("GetDropDownValue: Couldn't find selected value");	
}

function SetDropDownValue(inObj,inValue)
{
	var i;
	for (i = 0; i < inObj.options.length; i++) {
		if (inObj.options[i].value == inValue) {
			inObj.options[i].selected = true;
			return;
		}
	}
	//alert("SetDropDownValue: Couldn't set " + inValue);	
}