<!--


function add_emotions(emot){

    var emo = emot.replace("%27","'")        
        

  
    // needs iframe work...  FF not working
    if(document.getElementById('wpTextbox1___Frame')){
       
            var iframeEl = document.getElementById('wpTextbox1___Frame');
           // alert(iframeEl);
            if (document.all) { //IS IE 4 or 5 (or 6 beta)
               // alert("IS IE 4 or 5 (or 6 beta)");
                var myField = iframeEl.contentWindow.document.getElementById('xEditingArea');
            } else {
                var myField = iframeEl.contentDocument.getElementsByTagName('xEditingArea');
               // var myField = xxx.removeChild;
            }
            

        if ( iframeEl.contentDocument ) { // DOM
            
           // var myField = iframeEl.contentDocument.getElementById('xEditingArea');
        } else if ( iframeEl.contentWindow ) { // IE win
          //  var myField = iframeEl.contentWindow.document.getElementById('xEditingArea');
        }
        
       
    } else {
      //  alert("no frame");
        var myField = document.getElementById("wpTextbox1");
    }
    

     //IE support
    if (document.selection && document.selection.createRange) {
        //alert("IE");
        myField.focus();
        sel = document.selection.createRange();
        sel.text = emo;
    }
    //MOZILLA/NETSCAPE support
    else if (myField.selectionStart || myField.selectionStart == '0') {
    //alert("MOZILLA");
            var startPos = myField.selectionStart;
            var endPos = myField.selectionEnd;
                myField.value = myField.value.substring(0, startPos)
                + emo
                + myField.value.substring(endPos, myField.value.length);
                myField.focus() ; 
                myField.selectionStart = (emo.length + startPos);
                myField.selectionEnd = (emo.length + startPos); 
        } else {
            myField.value = emo;
    }



   /* insertTags(emo, '', ''); */

}


function check_NewThread() {

    if (document.editform.t_title.value == "") {
        alert("Need Thread Title");
        document.editform.t_title.focus();
    return false;
    }
    
    if (document.editform.xEditingArea.value == "") { 
        if (document.editform.wpTextbox1.value == "") {
            alert("Need text in Post box");
            document.editform.wpTextbox1.focus();
           return false;
        }
        
    }

    return true;
}

function check_quickPost() {

    if (document.editform.wpTextbox1.value == "") {
        alert("Need text in Post box");
        document.editform.wpTextbox1.focus();
      return false;
    }

    return true;
}

function msgbox(txt) {

    if(confirm(txt)) {
        return true;
    }
    return false;
}


function msgcheck(todo,txt) {

	if(confirm(txt)) {
		SideBar_RedirectUrl = todo;
		setTimeout( "window.location.href = SideBar_RedirectUrl", 0 );
		return true;
	}
	return false;
}

function delete_form_check(txt) {
    
    if(confirm(txt)) {
        return true;
    }
    return false;
}


function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}



/* 
Used for the drop down menus... 
Sorry, do not have the time right now to make up my own.
Snagged this from Online and made a few edit to make it work with the forum.

Copyright 2006-2007 javascript-array.com
*/
var timeout    = 500;
var closetimer    = 0;
var ddmenuitem    = 0;

// open hidden layer
function mopen(id)
{    
    // cancel close timer
    mcancelclosetime();

    // close old layer
    if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

    // get new layer and show it
    ddmenuitem = document.getElementById(id);
    ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
    if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
    closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
    if(closetimer)
    {
        window.clearTimeout(closetimer);
        closetimer = null;
    }
}

// close layer when click-out
document.onclick = mclose; 
// END - Copyright 2006-2007 javascript-array.com























document.onclick = hidall_loops;

var isIE = document.all?true:false;
// document.onclick = LoopDoc;
function LoopDoc(){

    var doc = document.getElementsByTagName('body');
    
    for (var i = 0; i < doc.length; i++){
       doc[i].onclick= hidall_loops;
    }

}

function hidall_loops() {

    var names = ["memcp","options_menu"];
    
    if (state == 'none' ) return true;
    state = 'none';
    
    var layer_ref;
        
    for ( var i in names ) {
       layer_ref = names[i];
        hidall(layer_ref)
    }
    
    for (var i = 1; i < 100; i++){
       mem = "mem" + i;
       hidall(mem)
    }
    
  return true;
}


function hidall(layer_ref) {
state = 'none';
        
        if (document.all && document.getElementById(layer_ref)) { //IS IE 4 or 5 (or 6 beta)
               eval( "document.all." + layer_ref + ".style.display = state");
        }
        
        if (document.layers) { //IS NETSCAPE 4 or below
            document.layers[layer_ref].display = state;
        }
        
        if (document.getElementById && !document.all) {
            hza = document.getElementById(layer_ref);
            hza.style.display = state;
        }
        

  return true;
}





var state = 'none';
function showhide(layer_ref, find_left) {

    var left = 0;
    var obj = document.getElementById(find_left);
    
    if(obj == null){
       left = 16 ;
    } else {
        left = parseInt(obj.offsetLeft) ;
    }
    
    left = left - 16;
    
    
    
    
    if (state == 'block' ) {
        state = 'none';
    } else {
        state = 'block';
    }
    
    if (document.all) { //IS IE 4 or 5 (or 6 beta)
        eval( "document.all." + layer_ref + ".style.display = state");
        document.getElementById(layer_ref).style.left = left + "px";
        document.getElementById(layer_ref).style.top = "0px";
    }
    
    if (document.layers) { //IS NETSCAPE 4 or below
        document.layers[layer_ref].display = state;
        document.layers[layer_ref].left = left + "px";
        document.layers[layer_ref].top = "0px";
    }
    
    if (document.getElementById &&!document.all) {
        hza = document.getElementById(layer_ref);
        hza.style.display = state;
        hza.style.left = left + "px";
        hza.style.top = "0px";
    }
} 




function showhide_fixed(layer_ref) {

    if (state == 'block' ) {
        state = 'none';
    } else {
        state = 'block';
    }
    
    if (document.all) { //IS IE 4 or 5 (or 6 beta)
        eval( "document.all." + layer_ref + ".style.display = state");
    }
    
    if (document.layers) { //IS NETSCAPE 4 or below
        document.layers[layer_ref].display = state;
    }
    
    if (document.getElementById &&!document.all) {
        hza = document.getElementById(layer_ref);
        hza.style.display = state;
    }
} 







// -->