<!--
#########################################################
# #
# SHOUTBOX AJAX ONLY LOGGED IN ADDON FINAL #
# #
# CREATED AND OPTIMIZED #
# FOR WEBSPELL 4.X #
# #
# VERSION 2.2 - September.2010 #
# #
# LICENSED UNDER GNU GPL #
# (for more inforamtion visit
www.gnu.org) #
# #
# MODIFIED CODE BY #
# Alex K. alias Nebelparder #
# #
# CONTACT: alex.k1993@yahoo.de #
# #
#########################################################
-->
<script language="JavaScript" type="text/javascript">
<!--
function chkFormularShoutBox() {
if(document.getElementById('shoutbox_name').value == ""){
alert('%enter_name%');
document.getElementById('shoutbox_name').focus();
return false;
}
if(document.getElementById('shoutbox_message').value == "" || document.getElementById('shoutbox_message').value == "Message"){
alert('%enter_message%');
document.getElementById('shoutbox_message').focus();
return false;
}
return true;
}
-->
</script>
<script language="JavaScript" type="text/javascript">
<!--
var xmlhttp;
function stateChanged()
{
if (xmlhttp.readyState==4)
{
var show= xmlhttp.responseText.split("||<img");
document.getElementById("shoutbox").innerHTML=show[0];
/* Auto scroll to bottom */
var objDiv = document.getElementById("shoutbox");
objDiv.scrollTop = objDiv.scrollHeight;
}
}
function shout()
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
var name = document.getElementById('shoutbox_name').value;
var message = document.getElementById('shoutbox_message').value;
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",'shout1.php?name='+name+'&message='+message,true);
xmlhttp.send(null);
document.getElementById('shoutbox_name').value="$name";
document.getElementById('shoutbox_message').value="Message";
}
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
return new XMLHttpRequest();
}
if (window.ActiveXObject)
{
// code for IE6, IE5
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}
-->
</script>
<script language="JavaScript" type="text/javascript">
window.onload=function()
{
var shoutbox = document.getElementById('shoutbox');
shoutbox.scrollTop = shoutbox.scrollHeight;
}
</script>
<script language="JavaScript" type="text/javascript">
<!--
fetch('shoutbox_content.php', 'shoutbox', 'replace', 'time', $refresh);
-->
</script>
<div id="shoutbox" style="width: 99.5%; height:102px; overflow: auto; text-align: left; border:1px solid #666666"></div><br />
<input type="hidden" id="shoutbox_name" name="name" size="24" maxlength="255" style="margin: 2px;" $name_settings />
<form method="post" action="index.php?site=shoutbox#" onsubmit="if(chkFormularShoutBox())+shout();return false;">
<input type="text" id="shoutbox_message" name="message" size="134" maxlength="255" style="margin: 2px;" value="Message" onfocus="this.value=''" />
<input type="submit" style="display:none;" onsubmit="if(chkFormularShoutBox())+shout();return false;"/><a href="javascript:;"onclick="javascript:if(chkFormularShoutBox())+shout();" tabindex="0">%shout%</a> • <a href="index.php?site=shoutbox_content&action=showall">%all_messages%</a> • <a href="index.php?site=shoutbox#" onclick="javascript:MM_openBrWindow('smileys.php','Smileys','scrollbars=yes,width=340,height=500')">Smilies</a>
</form>