function doPostBack(task,taskid)
{		
	document.forms[0].task.value=task
	document.forms[0].taskid.value=taskid
	document.forms[0].submit()
}
function doOpenPopWindow(FileNameWithPath,Title,Width,Height)
{
	window.open(FileNameWithPath,Title,'menubar=no,width='+Width+',height='+Height+',left=50,top=50,scrollbars=no,resizable=no');
}
function doOpenWindowWithScrollBar(FileNameWithPath,Title,Width,Height)
{
	window.open(FileNameWithPath,Title,'menubar=no,width='+Width+',height='+Height+',left=50,top=50,scrollbars=yes,resizable');
}
function doOpenHelp(sFileName, topic,Width,Height)
{
	doOpenWindowWithScrollBar(sFileName+'?'+topic,'Help', Width, Height);
}
function UpdateCSVIDs()
{

	doPostBack('updateCSVIDs','');
}






function ValidateBBC()
{

	if(document.forms[0].SelectedBookValue.value + "" == "" && document.forms[0].SelectedTopicValue.value + "" == "" && document.forms[0].SelectedDateRangeValue.value + "" == "" && document.forms[0].SelectedChapterValue.value + "" == "" && document.forms[0].SelectedResourceTypeValue.value + "" == "")
	{
	alert("Please select an option.");
	}
	else if(document.forms[0].SelectedBookValue.value + "" != "" || document.forms[0].SelectedResourceTypeValue.value + "" != "")
	{
		if(document.forms[0].SelectedTopicValue.value + "" == "" && document.forms[0].SelectedDateRangeValue.value + "" == "" && document.forms[0].SelectedChapterValue.value + "" == "" )
		{
			alert("Please select topic or date range or chapter in addition to book.");
		}
		else
		{
			doPostBack("BBC","");
		}
	}
	else
	{
		doPostBack("BBC","");
	}
}
