
<animation
  name="Chat" 
  app_id="chatty" 
  top="100" 
  left="100" 
  height="300" 
  width="220" 
  background=" " 
  maximize="2" 
  resizable="2" 
  modal="0" 
  data="2"
  icon="http://www.widgetplus.com/generic/chat.png">
<title>Ajax interactive demo</title>
<style>
<!--
#comments div{font-size:12px;font-family:verdana;}
#comments span{font-size:12px;font-family:verdana;font-weight:bold;color:silver;}
-->
</style>
<script>
<![CDATA[

function init_chatty()
{
if(document.getElementById('comments'))
{
setTimeout("try{if(document.getElementById('comments')){init_chatty()}}catch(er){}",7000);
loadtarget("","http://www.widgetplus.com/remotewidget.asp","","comments","chatty",2);
}
}

var chatty_do={

post_comment:function(num)
{
if(num==13)
{

try
{
loadtarget("","","appendToTop(comments, '"+xin.login+": "+document.getElementById("comment").value.replace(/\'|\"/g,"")+"',10)","comments","chatty",2);
}
catch(er){}

document.getElementById("comment").value="";
}
}
}

]]>
</script>

<div id="chatty">

<div id="comments" style="background-color:gray;color:white;text-align:left;border:gray 1px solid;margin:0px;margin-left:auto;margin-right:auto;padding:2px;height:190px;width:220px;overflow:hidden">
</div>
<input 
 onkeydown="chatty_do.post_comment(event.keyCode)" 
 style="margin-top:2px;margin-left:auto;margin-right:auto;background-color:gray;color:white;width:220px;display:block;border:gray 1px solid" 
type="text" id="comment" value="" />
<button class="ibut" style="margin-top:3px"
  onclick="javascript:chatty_do.post_comment(13)">Comment</button>

</div>


</animation>
