function about()
{
	var ht = screen.height; var wdth = screen.width; var newWidth = 450; var newHeight = 350; var lft = (wdth / 2) - (newWidth / 2); var tp = (ht / 2) - (newHeight / 2);
	win = window.open("../Common/About.aspx","newHelpSearch", "toolbar=no,location=no,alwaysRaised=yes,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=" + lft + ",top=" + tp + ",width=" + newWidth + ",height=" + newHeight);
}

function searchhelpwin()
{
	var ht = screen.height; var wdth = screen.width; var newWidth = 640; var newHeight = 480; var lft = (wdth / 2) - (newWidth / 2); var tp = (ht / 2) - (newHeight / 2);
	win = window.open("SearchHelp.aspx","newHelpSearch", "toolbar=no,location=no,alwaysRaised=yes,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,copyhistory=no,left=" + lft + ",top=" + tp + ",width=" + newWidth + ",height=" + newHeight);
}

function helpwin(anc)
{

var ht = screen.height; var wdth = screen.width; var newWidth = 640; var newHeight = 480; var lft = (wdth / 2) - (newWidth / 2); var tp = (ht / 2) - (newHeight / 2);
    win = window.open("../Admin/AdminHelp.aspx#"+anc,"newWin", "toolbar=no,location=no,alwaysRaised=yes,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,copyhistory=no,left=" + lft + ",top=" + tp + ",width=" + newWidth + ",height=" + newHeight);
}

var win;

function winopen1(){
	
	var ht = screen.height; var wdth = screen.width; var newWidth = 640; var newHeight = 480; var lft = (wdth / 2) - (newWidth / 2); var tp = (ht / 2) - (newHeight / 2);
    win = window.open("HelpSearch.aspx","newWin", "toolbar=no,location=no,alwaysRaised=yes,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,copyhistory=no,left=" + lft + ",top=" + tp + ",width=" + newWidth + ",height=" + newHeight);
   
}

function winopen2(){
var ht = screen.height; var wdth = screen.width; var newWidth = 640; var newHeight = 480; var lft = (wdth / 2) - (newWidth / 2); var tp = (ht / 2) - (newHeight / 2);
   win = window.open("HelpIndex.aspx","newWin", "toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,copyhistory=no,left=" + lft + ",top=" + tp + ",width=" + newWidth + ",height=" + newHeight);        
}

var pUrl = "http://<%=pUrl%>/OHT/UI/HelpTopic/Default.aspx";
var winMy = null;
function openParent(url)
{
	winMy = self.opener.location.href = pUrl + url;
}

function AddItemFromCntrl(FromItem,ListName)
{
	str = document.Form1.elements[FromItem].value;
	AddItem(str,"",ListName);
}


function AddItem(str,val,ListName)
{
	LstIndex = document.Form1.elements[ListName].length;
	document.Form1.elements[ListName].options[LstIndex] = new Option(str,val);
}

function RemoveItemFromCntrl(ListName)
{
RemoveItem(document.Form1.elements[ListName].selectedIndex,ListName);
}


function RemoveItem(Current,ListName)
{

	if(Current != -1)
	{
		
		if(document.Form1.elements[ListName].options[Current] != null)
			document.Form1.elements[ListName].options[Current] = null;
		
		if(document.Form1.elements[ListName].options[Current] != null)
			document.Form1.elements[ListName].options[Current].selected = true;
		
		else
		{	
		
		New = Current - 1;
		
		if(New != -1) 
		{
			
			if(document.Form1.elements[ListName].options[New] != null)
				document.Form1.elements[ListName].options[New].selected = true;
		}
			
		}
			
	}


}


function AppendAnswers(ListName,HiddenTxtFld)
{

document.Form1.elements[HiddenTxtFld].value = "";

	for(i=0;i<document.Form1.elements[ListName].length;i++)
	{
	document.Form1.elements[HiddenTxtFld].value = document.Form1.elements[HiddenTxtFld].value + document.Form1.elements[ListName].options[i].value + ",";
	}


}


function AddRelatedTopic(ID,strVal)
{
	var flag = 0;
	for(i=0;i<document.Form1.elements['CtrRelatedTopic1_lstRelTopics'].length;i++)
	{
		if (document.Form1.elements['CtrRelatedTopic1_lstRelTopics'].options[i].value == ID)
		{
			flag = 1;
			break;
		}
	}


	if (flag != 1)
	{
		LstIndex = document.Form1.elements['CtrRelatedTopic1_lstRelTopics'].length;
		document.Form1.elements['CtrRelatedTopic1_lstRelTopics'].options[LstIndex] = new Option(strVal,ID);
	}
	
}

function opwnWindow(url)
{
	var win = window.open(url,'name','height=400,width=800');
	if (window.focus) {win.focus()}
}