
function toggle(obj) {
 var e = document.getElementById(obj);
 e.style.display = (e.style.display != 'none' ? 'none' : '' );
}

function boggle(obj) {
 var e1 = document.getElementById('sen-'+obj);
 e1.style.display = (e1.style.display != 'none' ? 'none' : '' );
 var e2 = document.getElementById('res-'+obj);
 e2.style.display = (e2.style.display != 'none' ? 'none' : '' );
}

function getXmlHttpObject() {
 var xmlHttp=null;
 try {
  xmlHttp=new XMLHttpRequest();
 } catch (e) {
  try {
   xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
 return xmlHttp;
}

var xmlHttp0;
var xmlHttp1;
var xmlHttp1a;
var xmlHttp2;
var xmlHttp3;
var xmlHttp4;
var xmlHttp5;
var xmlHttp6;
var xmlHttp7;
var xmlHttp8;
var xmlHttp9;
var xmlHttp10;
var xmlHttp11;
var xmlHttp12;


function loadNav(query)
{
	xmlHttp11 = getXmlHttpObject();
	var url='/nav?q='+query;

	xmlHttp11.onreadystatechange=function() {
  	if (xmlHttp11.readyState==4) {
  		var e = document.getElementById('nav-div');
  		e.innerHTML = xmlHttp11.responseText;
			e.style.display = '';
		}
	};

	xmlHttp11.open('GET',url,true);
	xmlHttp11.send(null);
}


function loadDictionary(query)
{
	xmlHttp0 = getXmlHttpObject();
	var url='/dictionary?q='+query+'&mode=&u=&p=';

	xmlHttp0.onreadystatechange=function() {
  	if (xmlHttp0.readyState==4) {
  		document.getElementById('dictionary-div').innerHTML = xmlHttp0.responseText;
		}
  	else {
  		document.getElementById('dictionary-div').innerHTML =
				'<h4>Dictionary scan in progress...</h4>';
		}
	};

	xmlHttp0.open('GET',url,true);
	xmlHttp0.send(null);
}


function refreshTwitter(query)
{
	xmlHttp10 = getXmlHttpObject();

	xmlHttp10.onreadystatechange=function() {
		if (xmlHttp10.readyState==4) {
  		var e = document.getElementById('twitter-widget');
  		e.innerHTML = xmlHttp10.responseText;
  		var f = document.getElementById('twitter-load-div');
			resolveTinyURLs0();
			/* var q = document.getElementById('semq').value;
			if (q!='') reloadTwitterURLs(q); */
		}
 	};

	var url = '/twitter-refresh?q='+query;
	xmlHttp10.open('GET',url,true);
	xmlHttp10.send(null);
}


function loadTwitterURLs(query)
{
	var n = 0;
	xmlHttp9 = getXmlHttpObject();

	xmlHttp9.onreadystatechange=function()
	{
  	var e = document.getElementById('twitter-load-div');
		if (xmlHttp9.readyState==4) {
			document.getElementById('twitter-urls').style.display = 'none';
  		e.innerHTML = xmlHttp9.responseText;
		}
		else {
			e.innerHTML = '<h4>FactEngine processing...</h4>';
		}
		e.style.display = '';
 	};

	var q = document.getElementById('tw-search-box').value;
	document.getElementById('twitter-urls').style.display = '';
	var content = q+'^10' ;

	var n = document.getElementById("tw-url-count").innerHTML;
	var j = 0;
	var prevrank = 0;
	for (i=0; i<n; i++) {
		if (content.length > 64000) break;
		var url = document.getElementById('tw-url-'+i).innerHTML;
		var anchor = document.getElementById('tw-anchor-'+i).innerHTML;
		var rank = document.getElementById('tw-rank-'+i).innerHTML;
		var reputation = document.getElementById('tw-reputation-'+i).innerHTML;
		content += ('^'+escape(url)+'^'+escape(anchor)+'^'+j+'^'+reputation);
		if (rank!=prevrank) { j++; prevrank = rank; }
	}

	var url='/crawl?q='+query+'&content='+content;
	xmlHttp9.open('GET',url,true);
  xmlHttp9.send(null);

}


function loadTwitter0URLs()
{
	xmlHttp9 = getXmlHttpObject();

  xmlHttp9.onreadystatechange=function()
  {
    var e = document.getElementById('twitter-load-div');
    if (xmlHttp9.readyState==4) {
      e.innerHTML = xmlHttp19responseText;
    }
    else {
			e.innerHTML = '<h4>FactEngine processing...</h4>';
    }
    e.style.display = '';
  };

  var q = document.getElementById('tw-search-box').value;
	document.getElementById('twitter-urls').style.display = '';
  var content = "content="+escape(q)+"\t10\t";

	var n = document.getElementById("tw-url-count").innerHTML;
	var j = 0;
	var prevrank = 0;
	for (i=0; i<n; i++) {
		var url = document.getElementById('tw-url-'+i).innerHTML;
		var anchor = document.getElementById('tw-anchor-'+i).innerHTML;
		var rank = document.getElementById('tw-rank-'+i).innerHTML;
		var reputation = document.getElementById('tw-reputation-'+i).innerHTML;
		content += ('^'+url+'^'+anchor+'^'+j+'^'+reputation);
		if (rank!=prevrank) { j++; prevrank = rank; }
	}

  for (i=0; i<n; i++) {
    var e = document.getElementById('twitter-entry-'+i);
    if (null==e) continue;
    var s = e.innerHTML;
    content += escape('<div class="twitter-entry" id="twitter-entry-'+i+'">');
    content += escape( s );
    content += escape('</div>\n');
  }

  var url='/crawl';
  xmlHttp1.open('POST',url,true);
  xmlHttp1.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  xmlHttp1.setRequestHeader("Content-Length", content.length);
  xmlHttp1.setRequestHeader("Connection", "close");
  xmlHttp1.send(content);

}

/*
<div class="twitter-entry" id="twitter-entry-1">
<span style="display: none;" class="twitter-id">tag:search.twitter.com,2005:3161108389</span>
<span style="display: none;" class="twitter-published">2009-08-06T05:00:13Z</span>
<span style="display: none;" class="twitter-title">**ATTENTION** New to Twitter and want to grow your followers and market your products and make money with Twitter visit http://bit.ly/yWxEt</span>
<span style="display: none;" class="twitter-updated">2009-08-06T05:00:13Z</span>
<span style="display: none;" class="twitter-link-type">image/png</span>
<span style="display: none;" class="twitter-author-uri">http://twitter.com/bricisz</span>
<img class="twitter-link-url" src="http://s3.amazonaws.com/twitter_production/profile_images/250071640/me_small_normal.jpg" height="36" width="36">
<span class="twitter-author-name">bricisz (Brian Cisz)</span>
<span class="twitter-content">**ATTENTION** New to <b>Twitter</b> and want to grow your followers and market your products and make money with <b>Twitter</b> visit <a href="http://bit.ly/yWxEt">http://bit.ly/yWxEt </a> </span>
<a href="http://twitter.com/?status=@bricisz%20&amp;in_reply_to_status_id=tag:search.twitter.com,2005:3161108389&amp;in_reply_to=bricisz" class="twitter-reply" target="_blank">reply</a>
<span class="twitter-url-count">[0]</span>
</div>
*/


function reloadTwitterURLs(query)
{
	var n = 0;
	xmlHttp9 = getXmlHttpObject();

	xmlHttp9.onreadystatechange=function() {
		if (xmlHttp9.readyState==4) {
  		var e = document.getElementById('twitter-load-div');
  		e.innerHTML = xmlHttp9.responseText;
			e.style.display = '';
		}
		else {
  		var e = document.getElementById('twitter-load-div');
			e.innerHTML = '<h4>FactEngine processing...</h4>';
			e.style.display = '';
		}
 	};

	document.getElementById('twitter-urls').style.display = '';
	var content = query+'^10' ;

	var n = document.getElementById("tw-url-count").innerHTML;
	var j = 0;
	var prevrank = 0;
	for (i=0; i<n; i++) {
		var url = document.getElementById('tw-url-'+i).innerHTML;
		var anchor = document.getElementById('tw-anchor-'+i).innerHTML;
		var rank = document.getElementById('tw-rank-'+i).innerHTML;
		var reputation = document.getElementById('tw-reputation-'+i).innerHTML;
		content += ('^'+escape(url)+'^'+escape(anchor)+'^'+j+'^'+reputation);
		if (rank!=prevrank) { j++; prevrank = rank; }
	}

	var url='/crawl?q='+query+'&content='+content;
	xmlHttp9.open('GET',url,true);
  xmlHttp9.send(null);

}


function loadWidget(i, f)
{
	// fetch existing feed
	xmlHttp1 = getXmlHttpObject();
	var url='/widget-instance?f='+f;

	xmlHttp1.onreadystatechange=function() {
  	if (xmlHttp1.readyState == 4) {
  		document.getElementById('widget-load-div-' + i).innerHTML = xmlHttp1.responseText;
		}
  	else {
  		document.getElementById('widget-load-div-' + i).innerHTML =
				'<h4>Widget display in progress...</h4>';
		}
 	};

	document.getElementById('widget-load-div-' + i).innerHTML =
		'<h4>Widget display in progress...</h4>';
	xmlHttp1.open('GET',url,true);
	xmlHttp1.send(null);
}


function resolveTinyURLs0()
{
	xmlHttp12 = getXmlHttpObject();

	xmlHttp12.onreadystatechange=function() {
		if (xmlHttp12.readyState == 4) {
			document.getElementById('twitter-scan').innerHTML = xmlHttp12.responseText;
		}
	};

	var n = document.getElementById("tw-url-count").innerHTML;
	var content = n;
	for (i=0; i<n; i++) {
		var url = document.getElementById('tw-url-'+i).innerHTML;
		var anchor = document.getElementById('tw-anchor-'+i).innerHTML;
		var rank = document.getElementById('tw-rank-'+i).innerHTML;
		var reputation = document.getElementById('tw-reputation-'+i).innerHTML;
		content += ('^'+escape(url)+'^'+escape(anchor)+'^'+rank+'^'+reputation);
	}

	var url='/resolve?content='+content;
	xmlHttp12.open('GET',url,true);
	xmlHttp12.send(null);
	
}


function resolveTinyURLs()
{
	xmlHttp12 = getXmlHttpObject();

	xmlHttp12.onreadystatechange=function() {
		if (xmlHttp12.readyState == 4) {
			document.getElementById('twitter-scan').innerHTML = xmlHttp12.responseText;
		}
	};

	var n = document.getElementById("tw-url-count").innerHTML;
	var content = n;
	for (i=0; i<n; i++) {
		var url = document.getElementById('tw-url-'+i).innerHTML;
		var anchor = document.getElementById('tw-anchor-'+i).innerHTML;
		var rank = document.getElementById('tw-rank-'+i).innerHTML;
		var reputation = document.getElementById('tw-reputation-'+i).innerHTML;
		content += ('^'+url+'^'+anchor+'^'+rank+'^'+reputation);
	}

	var url='/resolve?content='+content;
	xmlHttp12.open('GET',url,true);
	xmlHttp12.send(null);
	
}


function loadWidgets0(query,opt)
{
	xmlHttp1 = getXmlHttpObject();
	var url='/widgets?w='+opt+'&q='+query;

	xmlHttp1.onreadystatechange=function() {
		if (xmlHttp1.readyState == 4) {
			document.getElementById('widget-div').innerHTML = xmlHttp1.responseText;
			resolveTinyURLs0(); 
		}
		else {
			document.getElementById('widget-div').innerHTML =
				'<h4>Widget scan in progress...</h4>';
		}
	};

	xmlHttp1.open('GET',url,true);
	xmlHttp1.send(null);
}


function loadWidgets(query,opt)
{
	xmlHttp1 = getXmlHttpObject();
	var url='/widgets?w='+opt+'&q='+query;

	xmlHttp1.onreadystatechange=function() {
		if (xmlHttp1.readyState == 4) {
			document.getElementById('widget-div').innerHTML = xmlHttp1.responseText;
			resolveTinyURLs0(); 
		}
		else {
			document.getElementById('widget-div').innerHTML =
				'<h4>Widget scan in progress...</h4>';
		}
	};

	xmlHttp1.open('GET',url,true);
	xmlHttp1.send(null);
}


function loadTransWidgets(query,opt)
{
	xmlHttp1a = getXmlHttpObject();
	var url='/trans-widgets?w='+opt+'&q='+query;

	xmlHttp1a.onreadystatechange=function() {
		if (xmlHttp1a.readyState == 4) {
			document.getElementById('trans-widget-div').innerHTML = xmlHttp1a.responseText;
		}
		else {
			document.getElementById('trans-widget-div').innerHTML =
				'<h4>Widget scan in progress...</h4>';
		}
	};

	xmlHttp1a.open('GET',url,true);
	xmlHttp1a.send(null);
}


function loadSemantics0(query)
{
	xmlHttp2 = getXmlHttpObject();
	var url='/semantics?q='+query;

	xmlHttp2.onreadystatechange=function() {
		if (xmlHttp2.readyState==4) {
			document.getElementById('semantic-div').innerHTML = xmlHttp2.responseText;

			var t = document.createElement('div');
			t.setAttribute('class','widget-header');
			t.appendChild(document.createTextNode('Related tags'));

			var s = document.createElement('div');
			s.setAttribute('class','related-tag-content');

			var f = document.getElementById('tags-div');
			f.appendChild(t);
			f.appendChild(s);

			var count;
			try {
				count = document.getElementById("plist-count").innerHTML;
			} catch (e) {
				count = 0;
			}
			for (i=0; i<10 && i<count; i++) {
				var e = document.getElementById('pl-'+i);
				if (e.innerHTML=="#end") break;

				var v = document.createElement('a');
				v.setAttribute('href','/factery?q='+e.innerHTML);
				v.setAttribute('target','_blank');
				v.appendChild(document.createTextNode(e.innerHTML)); 

				var u = document.createElement('div');
				u.setAttribute('class','related-tag');
				u.appendChild(v);

				s.appendChild(u);
			}
			f.style.display='';
		}
		else {
			document.getElementById('semantic-div').innerHTML =
				'<h4>FactEngine processing...</h4>';
		}
	};

	xmlHttp2.open('GET',url,true);
	xmlHttp2.send(null);
}


/*
function displayUrl(url)
{
	document.getElementById('semantic-div').innerHTML =
		'<div style="float:center;font-size:14pt">'+url+'</div>';
}


function loadSemantics1(query,responseText)
{
	var xmlHttp = getXmlHttpObject();
	var url='/semantics?m=semantics&q='+query;
	var urllist = responseText.split("|");
	var url_counter = 0;
	var timeout_id;

	xmlHttp.onreadystatechange=function() {
		if (xmlHttp.readyState==4 && xmlHttp.status==200) {
			window.clearTimeout(timeout_id);
			document.getElementById('semantic-div').innerHTML = xmlHttp.responseText;
		}
		else {
			timeout_id=window.setTimeout("displayUrl('"+urllist[url_counter]+"')", 500);
		}
	};

	xmlHttp.open('GET',url,true);
	xmlHttp.send(null);
}

*/


function loadSemantics(query)
{
	xmlHttp2 = getXmlHttpObject();
	var url='/semantics?q='+query;

	xmlHttp2.onreadystatechange=function() {
		if (xmlHttp2.readyState==4) {
			document.getElementById('semantic-div').innerHTML = xmlHttp2.responseText;
		}
		else {
			document.getElementById('semantic-div').innerHTML =
				'<h4>FactEngine processing...</h4>';
		}
	};

	xmlHttp2.open('GET',url,true);
	xmlHttp2.send(null);
}


function loadImages(query)
{
	xmlHttp3 = getXmlHttpObject();
	var url='/image-request?q='+query;

	xmlHttp3.onreadystatechange=function() {
		if (xmlHttp3.readyState==4 && xmlHttp3.status==200) {
			document.getElementById('image-div').innerHTML = xmlHttp3.responseText; }
		else {
			document.getElementById('image-div').innerHTML =
				'<h4>Image scan in progress...</h4>'; }
		};

	xmlHttp3.open('GET',url,true);
	xmlHttp3.send(null);
}


function showDialog(cell_id,title)
{
	var dialog = document.getElementById('dialog-'+cell_id);
	if (dialog.style.display != 'none') {
		dialog.style.display = 'none';
		return;
	}
	dialog.style.display = '';
	var dialogtitle = document.getElementById('dialog-title-'+cell_id);
	dialogtitle.innerHTML = title;
}


function showDialogGeneral(cell_id,title,user,passwd)
{
	var dialog = document.getElementById('dialog-'+cell_id);
	if (dialog.style.display != 'none') {
		dialog.style.display = 'none';
		return;
	}
	dialog.style.display = '';
	if (user.length==0 || passwd.length==0) {
		var changeButton = document.getElementById('change-login-'+cell_id);
		var loginForm = document.getElementById('login-content-'+cell_id);
		changeButton.style.display = 'none';
		loginForm.style.display = '';
	}
	document.getElementById('tw-uname-'+cell_id).value = user;
	document.getElementById('tw-passwd-'+cell_id).value = passwd;
	var dialogtitle = document.getElementById('dialog-title-'+cell_id);
	dialogtitle.innerHTML = title;
}


function hideDialog(cell_id)
{
	var dialog = document.getElementById('dialog-'+cell_id);
	var dialog_ack = document.getElementById('dialog-ack-'+cell_id);
	dialog.style.display = 'none';
	dialog_ack.style.display = 'none';
}


function setPref(opt,cell_id)
{
	document.getElementById('opt').value = opt;
	var dialog_ack = document.getElementById('dialog-ack-'+cell_id);
	dialog_ack.style.display = '';
}


function twitterLoginSubmit(cell_id,content)
{
	var content = document.getElementById('textarea-content-'+cell_id).innerHTML;
	var tinyurl = document.getElementById('tinyurl-'+cell_id).value;
	var uname = document.getElementById('tw-uname-'+cell_id).value;
	var passwd = document.getElementById('tw-passwd-'+cell_id).value;
	xmlHttp4 = getXmlHttpObject();
	var url='/twitter-submit.php';
	url=url+'?m=twitter-submit&q='+content+'&t='+tinyurl+'&p='+passwd+'&u='+uname;

	xmlHttp4.onreadystatechange=function() {
		if (xmlHttp4.readyState==4 && xmlHttp4.status==200) {
			document.getElementById('dialog-ack-'+cell_id).style.display = '';
		}
	};

	xmlHttp4.open('GET',url,true);
	xmlHttp4.send(null);
}


function pageRatingSubmit(cell_id,query)
{
	var r = 0;
	var s = 0;
	var o = 0;
	if (document.getElementById(cell_id+'-u1').checked) r = 1;
	else if (document.getElementById(cell_id+'-u2').checked) r = 2;
	else if (document.getElementById(cell_id+'-u3').checked) r = 3;
	if (document.getElementById(cell_id+'-c1').checked) s = 1;
	else if (document.getElementById(cell_id+'-c2').checked) s = 2;
	else if (document.getElementById(cell_id+'-c3').checked) s = 3;
	if (document.getElementById(cell_id+'-r1').checked) o = 1;
	else if (document.getElementById(cell_id+'-r2').checked) o = 2;
	else if (document.getElementById(cell_id+'-r3').checked) o = 3;

	xmlHttp5 = getXmlHttpObject();
	var url='/page-rating.php';
	url=url+'?q='+query+'&r='+r+'&s='+s+'&o='+o;

	xmlHttp5.onreadystatechange=function() {
		if (xmlHttp5.readyState==4 && xmlHttp5.status==200) {
			document.getElementById('dialog-ack-'+cell_id).style.display = '';
		}
	};

	xmlHttp5.open('GET',url,true);
	xmlHttp5.send(null);
}


function ffSubmitLike(cell_id)
{
	var entry = document.getElementById(cell_id+'-like-entry').value;
	xmlHttp8 = getXmlHttpObject();
	var url='/ff-like?entry='+entry;

	xmlHttp8.onreadystatechange = function() {
		if (xmlHttp8.readyState==4 && xmlHttp8.status==200) {
      document.getElementById('dialog-ack-like-'+cell_id).style.display = '';
			document.getElementById('like-span-'+cell_id).style.display = '';
		}
	}

	xmlHttp8.open("GET",url,true);
	xmlHttp8.send(null);
}


function ffSubmitComment(cell_id)
{
	var entry = document.getElementById(cell_id+'-entry').value;
	var body = document.getElementById(cell_id+'-body').value;
	xmlHttp7 = getXmlHttpObject();
	var url='/ff-comment?entry='+entry+'&body='+body;

	//Send the proper header information along with the request
	//xmlHttp7.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	//xmlHttp7.setRequestHeader("Content-length",params.length);
	//xmlHttp7.setRequestHeader("Connection","close");

	xmlHttp7.onreadystatechange = function() {
		if (xmlHttp7.readyState==4 && xmlHttp7.status==200) {
 //     document.getElementById('dialog-ack-'+cell_id).style.display = '';

			var nickname = readCookie('ff-nickname');
			var v0 = document.createElement('img');
			v0.setAttribute('src','http://factery.net/images/speech_bubble.gif');
			var v1 = document.createElement('span');
			v1.setAttribute('style','margin-left:6px;');
			v1.appendChild( document.createTextNode(body) );
			var v2 = document.createTextNode('-'); 
			var v3 = document.createElement('a');
			v3.setAttribute('href','http://friendfeed.com/'+nickname);
			v3.setAttribute('target','_blank');
			v3.appendChild(document.createTextNode(nickname));
			var v4 = document.createElement('td');
			v4.setAttribute('style','margin-left:6px;vertical-align:top;font-size:80%;');
			v4.appendChild(v0);
			v4.appendChild(v1);
			v4.appendChild(v2);
			v4.appendChild(v3);
			var v5 = document.createElement('tr');
			v5.appendChild(v4);
			var v6 = document.createElement('tbody');
			v6.appendChild(v5);
			var v7 = document.createElement('table');
			v7.appendChild(v6);
			var v8 = document.createElement('td');
			v8.setAttribute('vertical-align','top');
			v8.setAttribute('width','40%');
			v8.appendChild(v7);
			var v9 = document.createElement('tr');
			v9.appendChild(v8);

			var v10 = document.getElementById('cmnt-table-'+cell_id);
			v10.appendChild(v9);
			var v11 = document.getElementById('cmnt-'+cell_id);
			v11.style.display = '';
			var v12 = document.getElementById(cell_id);
			v12.style.display = 'none';

		}
	}

	xmlHttp7.open("GET",url,true);
	xmlHttp7.send(null);
}

/*

<tr><td vertical-align="top" width="40%">
<table><tbody><tr>
<td style="margin-left: 6px; vertical-align: top; font-size: 80%;">
<img src="http://factery.net/images/speech_bubble.gif"/>
<span style="margin-left: 6px;"> Yikes.  The N. Korean government seems to have lost its collective mind.</span>
 - 
<a href="http://friendfeed.com/pcp071098" target="_blank">Paul Pedersen</a>
</td>
</tr></tbody></table>
</td></tr>

var nickname = readCookie('ff-nickname');
var v0 = document.createElement('img');
v0.addAttribute('src','http://factery.net/images/speech_bubble.gif');
var v1 = document.createElement('span');
v1.addAttribute('style','margin-left:6px;');
v1.appendChild( document.createTextNode(body) );
var v2 = document.createTextNode('-'); 
var v3 = document.createElement('a');
v3.setAttribute('href','http://friendfeed.com/'+nickname);
v3.setAttribute('target','_blank');
v3.appendChild(document.createTextNode(nickname);
var v4 = document.createElement('td');
v4.addAttribute('style','margin-left:6px;vertical-align:top;font-size:80%;');
v4.appendChild(v0);
v4.appendChild(v1);
v4.appendChild(v2);
v4.appendChild(v3);
var v5 = document.createElement('tr');
v5.appendChild(v4);
var v6 = document.createElement('tbody');
v6.appendChild(v5);
var v7 = document.createElement('table');
v7.appendChild(v6);
var v8 = document.createElement('td');
v8.setAttribute('vertical-align','top');
v8.setAttribute('width','40%');
v8.appendChild(v7);
var v9 = document.createElement('tr');
v9.appendChild(v8);

var v10 = document.getElementById('tbody-'+cell_id);
v10.appendChild(v9);

*/



function readCookie(cookieName)
{
	var theCookie=""+document.cookie;
	var ind=theCookie.indexOf(cookieName);
	if (ind==-1 || cookieName=="") return ""; 
	var ind1=theCookie.indexOf(';',ind);
	if (ind1==-1) ind1=theCookie.length; 
	return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}


function changeLogin(cell_id)
{
	var loginForm = document.getElementById('login-content-'+cell_id);
	if (loginForm.style.display != 'none') {
		loginForm.style.display = 'none';
	}
	else {
		document.getElementById('tw-uname-'+cell_id).value = '';
		document.getElementById('tw-passwd-'+cell_id).value = '';
		loginForm.style.display = '';
	}
}


function deleteChannel(name)
{
	xmlHttp6 = getXmlHttpObject();
	var url='/remove?n='+name;
	xmlHttp6.onreadystatechange=function() {
		if (xmlHttp6.readyState == 4) {
			document.getElementById('channel-del-ack').style.display = '';
		}
	};
	xmlHttp6.open('GET',url,true);
	xmlHttp6.send(null);
}


