function OpenKMSEmail()
{
	var vWinEmail = window.open("EMailKMS.asp", "EMailKMS", 
		"width=700,height=500,status=no,resizable=yes,top=200,left=200");
	vWinEmail.opener = self;
	vWinEmail.focus();
}

function AddNewQARedirect()
{
	window.navigate ("QAAuthorAddEdit.asp");
}

/////////////////////////////////////////////////////
function BuildSubCategory()
{

var i;
var oNewOption;
var s = new String();
var CatId = document.FrmQASearch.SelCat.options[document.FrmQASearch.SelCat.selectedIndex].value;
var n = document.FrmQASearch.SelSub.length;

document.FrmQASearch.TxtCategory.value = document.FrmQASearch.SelCat.options[document.FrmQASearch.SelCat.selectedIndex].text;

for(  i =n-1; i>=0; i-- ) 
{

  document.FrmQASearch.SelSub.options[i]  = null;
}

oNewOption = new Option();
oNewOption.value = 0;
oNewOption.text = "<All>";
document.FrmQASearch.SelSub.add (oNewOption);

n = document.FrmQASearch.SelSubList.length;
for (i=0;i<n;i++)
{
	s = document.FrmQASearch.SelSubList.options[i].text;
	
	if (document.FrmQASearch.SelSubList.options[i].value == CatId){
		oNewOption = new Option();
		oNewOption.value = s.substring(0, s.indexOf("|"));
		oNewOption.text = s.substring(s.indexOf("|") + 1, s.length);
		document.FrmQASearch.SelSub.add (oNewOption);
	}
}


}
//////////////////////////////////
function ChangeSubCategory()
{
	document.FrmQASearch.TxtSubcategory.value = document.FrmQASearch.SelSub.options[document.FrmQASearch.SelSub.selectedIndex].text;
}



function ClearAll()
{
	document.FrmQASearch.TxtSearch.value = "";
	document.FrmQASearch.SelAuthorApprover.selectedIndex = 0;
	document.FrmQASearch.TxtDateFrom.value = "";
	document.FrmQASearch.SelCat.selectedIndex = 0;
	document.FrmQASearch.SelSub.selectedIndex = 0;
	document.FrmQASearch.SelStatus.selectedIndex = 0;
	document.FrmQASearch.TxtDateTo.value = "";
	document.FrmQASearch.Expired.checked = false;
}



