<!--
function showPr(obj, objName) 
{
  var result = "The properties for the " + objName + " object:" + "\n";  
  for (var i in obj) {result += i + " = " + obj[i] + "\n";}  
  return result;
}

function gebi(id)
{
	var elm=document.getElementById(id);
	if(elm!=null && elm!='undefined')return elm;
	return false;
}

function tr_over(tr)
{
	tr.style.background="#FAEBD7";
}
function tr_out(tr)
{
	tr.style.background="";
}
function showProperties(obj) 
{
  var result = "The properties for the s object:" + "\n";  
  for (var i in obj) {result += i + " = " + obj[i] + "\n";}  
  return result;
}

function AddSmile(name, textarea_id)
{
    var text = ' :' + name + ': ';
    if(1==1)
    {
      var obj = document.getElementById(textarea_id);
    	if (obj && obj.selectionStart+1 && obj.selectionEnd+1) // если мозилла
    	{
    		var pos = obj.selectionStart;
    		obj.value=obj.value.substring(0,obj.selectionStart)+text+obj.value.substring(obj.selectionEnd,obj.value.length);
    		obj.selectionStart = pos + text.length;
    		obj.selectionEnd = pos + text.length;
    	}
    	else
    	if(1==1) // если микрософт экплорер
    	{
    		obj.focus();
    		var SelectedText = document.selection.createRange();
    		SelectedText.text = text;
    	}
    	else // если не оба
    	if (obj)obj.value+=text;

      obj.focus();
    }
    else
    {
    /*    
        var obj = document.getElementById(textarea_id+'_frame');        
        iframeFocus(textarea_id+'_frame');
        if(navigator.userAgent.toLowerCase().indexOf("msie") != -1){            
            var range = obj.contentWindow.document.selection.createRange();
            range.text = text;            
        }
        else{
            if(window.opera && obj.contentWindow.document.body.innerHTML == ''){
                text = '[ '+name+' ]';
            }            
            obj.contentWindow.document.execCommand('InsertHTML', false, text);            
        }   
        iframeFocus(textarea_id+'_frame');*/
    }
    
}
function ShowAllSmilies(show)
{
	var spn=gebi('s_hideSmilies');
	var sh=gebi('a_smileShowAll');
	var hd=gebi('a_smileHideAll');
	if(spn!=false && sh!=false && hd!=false)	
	if(show==1)
	{
		spn.style.display='';
		sh.style.display='none';
		hd.style.display='';
	}
	else
	{
		spn.style.display='none';
		sh.style.display='';
		hd.style.display='none';
	}
}
function ShowHideElm(id, sh)
{	
	var elm=gebi(id)	
	if(elm)
	{
		if(sh==null || sh=='undefined'){if(elm.style.display=='')elm.style.display='none';else elm.style.display='';}
		else
		if(sh==1)elm.style.display='';else elm.style.display='none';
	}
}

function el_fill(el, unfill){
	var color='#F6EAF5';
	if(unfill!=null && unfill==1) color='#FFFFFF';
	el.style.background=color;
}

//-->
