function popupChat() {
        win=window.open("demo4.html", "JPilotChat",
                   "resizable=no,height=400,width=600");
}     


function send()
{
   if (document.UserInfo.NICKNAME.value == null ||
                                        document.UserInfo.NICKNAME.value == "")
   {
        window.alert("You must enter your nick name.")
        return false
   }

 var USERNICK = document.UserInfo.NICKNAME.value

 win=window.open("","IRC","resizable=no,height=380,width=570")
 win.document.write('<html><head><title>JPilot jIRC Chat</title></head>')
 win.document.write('<BODY bgColor=#4f526a topMargin=20>')

win.document.write('<applet codebase="classes" archive="jirc_nss.zip,resources.zip" code="Chat.class" width=550 height=350 MAYSCRIPT >')         

win.document.write('<param name="CABBASE" value="jirc_mss.cab,resources.cab">')

win.document.write('<param name="DirectStart" value="true">')

win.document.write('<param name="isLimitedServers" value="false">')
win.document.write('<param name="isLimitedChannels" value="false">')

win.document.write('<param name="FilterKeys" value=":) :( :D :P ;) :confused: :mad: :cool: ;( :love: :thumbup: :thumbdown: :evil: :kiss: :hello: :applause: :banghead: :bye:">')
win.document.write('<param name="FilterVals" value="smile.gif frown.gif biggrin.gif tongue.gif wink.gif confused.gif mad.gif cool.gif evil.gif love.gif thumbup.gif thumbdown.gif evil.gif kiss.gif hello.gif applause.gif banghead.gif bye.gif">')

win.document.write('<param name="HostName" value="javachatuser" >')

win.document.write('<param name="UseModeIcons" value="true">')
win.document.write('<param name="TimeStampFormat" value="hh:mm a" >')
win.document.write('<param name="AllowTimeStamp" value="true">')

win.document.write('<param name="FieldNameChannelJoined" value="just entered the chat room" >')
win.document.write('<param name="FieldNameChannelLeft" value="just left the chat room" >')
win.document.write('<param name="FieldNameChannelLeft" value="You just left the chat room" >')
win.document.write('<param name="FieldNameNickNotify" value="has changed his/her nickname to">')
win.document.write('<param name="FieldNamePrivateIgnore" value="Ignore This User">')
win.document.write('<param name="FieldNameConnecting" value="Connecting to the server, please wait ....">')
win.document.write('<param name="FieldNameConnected" value="Connected to server, trying to login, may take a minute or two, and occassionally look like nothing is happening during IDENT but please be patient... Thanks. If you repeatedly get a CONNECTION TIMED OUT error, please disconnect, then close the chat page, reopen it and start again. Also, please make sure there are no gaps in your chosen nickame! :)">')
win.document.write('<param name="FieldNameConnectionClose" value="Connection to server closed. Bye bye for now, please come back soon.">')
win.document.write('<param name="FieldNameQuitMsg" value="Bye bye">')
win.document.write('<param name="FieldNamePrivateClose" value="Close">')
win.document.write('<param name="FieldNamePrivateChatTitle" value="Private Chat with: ">')
win.document.write('<param name="WelcomeMessage" value="Welcome to Java IRC chat!">')
win.document.write('<param name="RealName" value="Your Real Name Goes Here">')
win.document.write('<param name="NickName" value="'+USERNICK+'">')
win.document.write('<param name="UserName" value="javachat">')
win.document.write('<param name="IgnoreUser" value="ignore user : ">')
win.document.write('<param name="ActivateUser" value="activate  user : ">')


win.document.write('<param name="UserCmdColor" value="red">')
win.document.write('<param name="BackgroundColor" value="46,46,70">')
win.document.write('<param name="ListTextColor" value="251,251,251">')
win.document.write('<param name="ListScreenColor" value="46,46,70">')
win.document.write('<param name="LogoBorderColor" value="169,171,192">')
win.document.write('<param name="ConfigBorderColor" value="169,171,192">')
win.document.write('<param name="LogoBgColor" value="46,46,70">')
win.document.write('<param name="TitleForegroundColor" value="251,251,251">')
win.document.write('<param name="TitleBackgroundColor" value="46,46,70">')
win.document.write('<param name="TextFontSize" value="12">')
win.document.write('<param name="TextFontName" value="Verdana">')
win.document.write('<param name="FGColor" value="169,171,192">')
win.document.write('<param name="InputTextColor" value="black">')
win.document.write('<param name="InputScreenwhiteColor" value="white">')
win.document.write('<param name="TextColor" value="255,255,255">')
win.document.write('<param name="TextScreenColor" value="black">')


win.document.write('<param name="AllowJoinSound" value="true" >')
win.document.write('<param name="AllowLeaveSound" value="true">')
win.document.write('<param name="RefreshColorCode" value="false">')
win.document.write('<param name="SoundMsg" value="Play Sound">')
win.document.write('<param name="NickNameColor" value="6">')
win.document.write('<param name="NickMaskStart" value="">')
win.document.write('<param name="NickMaskEnd" value=":">')

win.document.write('<param name="PWindowHeight" value="250">')
win.document.write('<param name="PWindowWidth" value="400">')
win.document.write('<param name="BorderSpacing" value="0">')
win.document.write('<param name="BorderVsp" value="3">')

win.document.write('<param name="IgnoreMOTD" value="true">')
win.document.write('<param name="IgnoreModeMsg" value="true">')
win.document.write('<param name="IgnoreServerMsg" value="true">')
win.document.write('<param name="IgnoreCode" value="5" >')


win.document.write('<param name="ServerPort" value="6667">')
win.document.write('<param name="ServerName1" value="irc.fef.net">')
win.document.write('<param name="ServerName2" value="vendetta.fef.net">')
win.document.write('<param name="ServerName3" value="ggn.fef.net">')
win.document.write('<param name="ServerName4" value="ggn2.fef.net">')
win.document.write('<param name="ServerName5" value="exobit.fef.net">')
win.document.write('<param name="Channel1" value="ostomyland">')

win.document.write('<param name="AllowShowURL" value="true">')
win.document.write('<param name="AllowIdentd" value="true">')
win.document.write('<param name="DisplayAbout" value="false">')
win.document.write('<param name="AllowHyperLink" value="true">')
win.document.write('<param name="AllowPrivateChatWindow" value="true">')

	win.document.close()
	return true
}
