﻿$(document).ready(function(){$('#round').corner('8px');$('#msg').corner('8px');$.get('chatlog.asp', function(data) {$('#text').append(data);$("#text").animate({ scrollTop: $("#text").prop("scrollHeight") }, 1000);});});
function no_logo() {$('#logo').html('<iframe src="http://caba.dk/jquery.asp.chat.system/nag.about.asp" width="100%" height="100%" frameborder="0" border="0"></iframe>');$( "#dialog:ui-dialog" ).dialog( "destroy" );$( "#logo" ).dialog({height: 350,width: 550,modal: true});};
function log() {$('#log').html('<iframe src="history.asp" width="100%" height="100%" frameborder="0" border="0"></iframe>');$( "#dialog:ui-dialog" ).dialog( "destroy" );$( "#log" ).dialog({height: 350,width: 550,modal: true});};
function insertSmiley(smiley) { var currentText = document.getElementById("text2"); var smileyWithPadding = " " + smiley + " "; currentText.value += smileyWithPadding;}     
var auto_refresh1 = setInterval(function(){$.get('chatlog.asp', function(data) {$('#text').append(data);$("#text").animate({ scrollTop: $("#text").prop("scrollHeight") }, 4000);});}, 500);
function start() {$('#text').load('chatlog.asp');};
function pri(user,id) {$('#private').html('<span class="ui-state-error-text"><strong>Chatting in private mode with '+user+'</strong> (<span style="font-family:arial;font-size:12px;cursor:pointer;" onclick=javascript:top.chat.save.location.href="cookie.asp">go public</span> | <span style="font-family:arial;font-size:12px;cursor:pointer;" onclick=javascript:pop("'+user+'","'+id+'");>window mode</span>)</span>');};
function pub() {$('#private').html('<strong>Chatting in public mode <italic>(<span class="ui-state-error-text">no privacy</span>)</italic></strong>');};
function flags(f,u,l) {$('#where').html('<img src="flags/'+f+'.png" width="11" height="9"/> '+u+' is chatting from '+l+'');};
function no_flags() {$('#where').html('');};
var auto_refresh2 = setInterval(function(){{$('#chatters').load('chatters.asp');};}, 5000);
function pop(user,id) {$('#popup').attr('title', 'Private chat with '+user+'').html('<iframe src="private.asp?id='+id+'" width="100%" height="100%" frameborder="0" border="0"></iframe>');$( "#dialog:ui-dialog" ).dialog( "destroy" );$( "#popup" ).dialog({height: 350,width: 550,modal: true});};
function unload(){save.location.href="cookie.asp";};

