function newWindow(title, features)
{
     var newWin=window.open('',title,features);
     newWin.focus();
}

function messageClose()
{
  //      opener.document.location.reload();
        window.close();
}           
function openWithFocus(winname,url)
{
     var newWin=window.open(url,winname,'toolbar=1,location=1,status=1,directories=1,menubar=1,resizable=1,scrollbars=1');
     newWin.focus();
}

function setName(winname)
{
	window.name=winname;
}

function terms(){
				// Commented by Raghavan as the file is moved to a
				// different directory
        //remote1 = window.open('../p/a/terms.htm','terms','width=500,height=375,resizable=yes,scrollbars=yes');
        remote1 = window.open('../p/images/helpfiles/terms.htm','terms','width=500,height=375,resizable=yes,scrollbars=yes');
        remote1.focus();
}
 
function privacy(){
				// Commented by Raghavan as the file is moved to a 
				// different directory
        //remote1 = window.open('../p/a/privacy.htm','privacy','width=500,height=375,resizable=yes,scrollbars=yes');
        remote1 = window.open('../p/images/helpfiles/privacy.htm','privacy','width=500,height=375,resizable=yes,scrollbars=yes');
        remote1.focus();
}
 
function browsenotebookhelp()
{
				// Commented by Raghavan as the file is moved to a 
				// different directory
        //remote2 = window.open('../p/h/NBhelp.htm','NBhelp','width=500,height=300,resizable=yes,scrollbars=yes');
        remote2 = window.open('../p/images/helpfiles/NBhelp.htm','NBhelp','width=500,height=300,resizable=yes,scrollbars=yes');
        remote2.focus();
}

function catSel()
{
        var index = document.list.catList.selectedIndex;
        var val = document.list.catList.options[index].value;
        if(val!="default"){
        	if(val=="showall"){
        		document.list.req.value="showall";
        		document.list.keywordid.value=""
	        }
	        else if(val.indexOf("&showall")!=-1){
			document.list.req.value="showall";
			document.list.keywordid.value=val.substring(0,val.indexOf("&showall"));
		}
	        else
	        	document.list.keywordid.value= val;
	        document.list.submit();
	}	        	
}

function closePopup(){
  if(typeof popupwin != "undefined")
	popupwin.close();
}

function descpopup(){
  PopUpURL    = "../html/catdesc.html";
  PopUpLeft   =  250;
  PopUpTop    =  250;
  PopUpWidth  =  540;
  PopUpHeight =  150;

  popupwinprop='left='+PopUpLeft+',top='+PopUpTop+',width='+PopUpWidth+',height='+PopUpHeight+',scrollbars,resizable="yes"';

  popupwin=window.open(PopUpURL,'nrc',popupwinprop);
}
