\
";
+
+ // Set the title
+ document.title = profiles[id].username+"@"+profiles[id].hostname+port_display(id);
+}
+
+function add_chat_menu()
+{
+ // Set the html data
+ document.getElementById("chat-area").innerHTML = "\
+
\
+
\
+
Name
\
+
\
+ \
+
\
+ ";
+}
+
+function add_chat()
+{
+ // Send the data to the server
+ socket_write(
+ connections[active_profile].client,
+ connections[active_profile].encryption,
+ {
+ mode: "new_chat",
+ name: document.getElementById('add-chat-name').value
+ }
+ );
}
function profiles_reload()
@@ -144,19 +191,11 @@ function profiles_reload()
// Create a list item
var profile = document.createElement("li");
- // Should the port be displayed
- var port_display = "";
- // Is the port not the default port
- if(profiles[i].port != PORT_DEFAULT)
- {
- // Set the port display varible
- port_display = ":"+profiles[i].port.toString();
- }
// Set the html for the list item
profile.innerHTML = ""+profiles[i].username+"@"+profiles[i].hostname+port_display+"";
+ i+")'>"+profiles[i].username+"@"+profiles[i].hostname+port_display(i)+"";
// Add the profile to the menu
chat_menu.appendChild(profile);
@@ -167,6 +206,7 @@ function profiles_reload()
function switch_new_profile()
{
// Set the html
+ document.title = "New Profile";
document.getElementById("chat-main").innerHTML = "\