<!--
away = 'no';
if (document.images) {
	away_1 = new Image
	away_2 = new Image
	away_1.src = 'setaway.gif'
	away_2.src = 'setback.gif'
}
function setmsg (type) {
	msg = prompt("Inserisci il tuo "+ type +" messaggio qui:", "");
	if (msg != null) { return msg; }
	else { return false; }
}
function jpilot(type,action) {
	if (type == 'memoserv') {
		if (action == 'send') {
			to = prompt('A chi devo inviarlo?','');
			if (to != null) {
				msg = prompt('Il tuo messaggio per '+to+' ?','');
				if (msg != null) {
	
				 		document.jchat.processJInput('/msg memoserv send '+to+' '+msg ); 
				}			
			}
		}	
	
		if (action == 'del') {
			nickname = prompt('Inserisci lo pseudo da cancellare','');
			if (nickname != null) {
				document.jchat.processJInput('/msg chanserv access #%$C del '+nickname ); 
			}
		}
	}

	if (type == 'join') { 
		if (document.jform.channels.indexOf != '0') {
			if (document.jform.channels.options[document.jform.channels.selectedIndex].value != 'other') {
			document.jchat.processJInput('/join '+ document.jform.channels.options[document.jform.channels.selectedIndex].value);
			return true;
			}
			else {
				chan = prompt('Inserisci il canale','#italia');
				if (chan != null) {
					if (chan.indexOf('#') != -1 ) { chan = '/join '+chan; }
						else { chan = '/join #'+chan; }
				 		document.jchat.processJInput(chan); 
				 }
			}
		}
		document.jform.channels.selectedIndex = 0;
	}

	if (type == 'away') {
		if (away == 'yes') { action = 'back' }
		if (away == 'no') { action = 'away' }
		if (action == 'away') {
			awaymsg = setmsg('away');
			if (awaymsg != false) {
				document.jchat.processJInput('/away ' + awaymsg);
				document.jchat.processJInput('/me si assenta \('+awaymsg+'\).');
				away = 'yes';
				document.away.src=away_2.src
			}
		}
			else {
				document.jchat.processJInput('/away');
				document.jchat.processJInput('/me è tornato \('+awaymsg+'\).');
				away = 'no';
				document.away.src=away_1.src
			}
		}

     if (action == 'cambia nick') {
			changenick = prompt('Inserisci nick','');
			document.jchat.processJInput('/nick '+ changenick);
		}
	

}
-->