User:MichaelBillington/ircform.js

function nickvalid { var nick = document.loginform.Nickname.value; if(nick.match(/^[A-Za-z0-9\[\]\{\}^\\\|\_\-`]{1,32}$/)) return true; alert('Please enter a valid nickname'); document.loginform.Nickname.value = nick.replace(/[^A-Za-z0-9\[\]\{\}^\\\|\_\-`]/g, ''); return false; } function setjs { if(navigator.product == 'Gecko') { document.loginform.interface.value = 'mozilla'; }else if(navigator.appName == 'Microsoft Internet Explorer' && 		document.getElementById && document.getElementById('ietest').innerHTML) { document.loginform.interface.value = 'ie'; }else if(navigator.appName == 'Konqueror') { document.loginform.interface.value = 'konqueror'; }else if(window.opera) { document.loginform.interface.value = 'opera'; } } addOnloadHook(function { 	var bodyContent = document.getElementById("wikichat"); 	if(!bodyContent) { 		return 0; 	} 	while (bodyContent.childNodes.length > 0) bodyContent.removeChild(bodyContent.lastChild); 	var outp; 	outp = "Enter a nickname to join the Wikiversity IRC channel"; 	outp = outp + ""; 	outp = outp + " "; 	outp = outp + "  "; 	outp = outp + "  "; 	outp = outp + "  "; 	outp = outp + "  "; 	outp = outp + " "; 	bodyContent.innerHTML = outp; 	//setjs; });