// $Revision: #6 $
function launchHelp(helpurl,startgroup,id) {
	HelpWin = window.open(helpurl, 'HelpWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=500,height=600');
	if( ! isIE4() ) {
		if (HelpWin.focus) {
			HelpWin.focus();
		}
	}
	if (HelpWin.focus!=null  &&  !isIE4() )
	{
		HelpWin.focus();
	}

	if (HelpWin.opener == null) 
	{
		HelpWin.opener = window;
	}
	HelpWin.opener.name = "LycosDna";
	
	return false;
}

function isIE4() {
	return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}

function sb(w) {
	(w != "") ?	window.status=w : window.status='';
	return true;
}

function SwitchSearch(link,value){
	document.getElementById('searchLinkWeb').className = 'search-link';
	document.getElementById('searchLinkRetriever').className = 'search-link';
	link.className = 'search-link-active';
	document.getElementById('rbsearch').value = value;
}


/* Create a new XMLHttpRequest object to talk to the Web server */
var xmlHttp = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
 try {
 xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
 try {
 xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } catch (e2) {
 xmlHttp = false;
 }
 }
 @end @*/

if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
 xmlHttp = new XMLHttpRequest();
}
 function callServer(url) {
 var request_sent;
 // Open a connection to the server
 if(typeof ActiveXObject != 'undefined') {
 try {xmlHhttp = new ActiveXObject("Msxml2.XMLHTTP");}
 catch (e) {
 try {xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}
 catch (E) {xmlHttp = false;}
 }
 } else if (XMLHttpRequest) {
 try {xmlHttp = new XMLHttpRequest();}
 catch (e) {xmlHttp = false;}
 }

 xmlHttp.open("GET", url, true);
 // Setup a function for the server to run when it's done
 xmlHttp.onreadystatechange = udpateRecentTopics;
 // Send the request
 request_sent = xmlHttp.send(null);
}

function udpateRecentTopics() {
 var availMessage = document.getElementById("recent-topics-box");
 if( availMessage != null ) {
 availMessage.innerHTML = "checking ...";
 if (xmlHttp.readyState == 4) {
 var response = xmlHttp.responseText;
 availMessage.innerHTML = response;
 }
 }
}


