function rewidth() {
if (document.body.clientWidth<=1004) document.getElementById('all_page').style.width = '968px';
       else document.getElementById('all_page').style.width = '';
   return false;

}

function confirmMsg(msg)
{
	return confirm(msg);
}

function UtilBeginScript()
{
    return String.fromCharCode(60, 115, 99, 114, 105, 112, 116, 62);
}

function UtilEndScript()
{
    return String.fromCharCode(60, 47, 115, 99, 114, 105, 112, 116, 62);
}

function UtilScript()
{
	return String.fromCharCode(115, 99, 114, 105, 112, 116);
}

function GetXMLHttpRequest()
{
    var object = null;

    if (window.XMLHttpRequest)
    {
        object = new XMLHttpRequest();
	if(object.overrideMimeType)
		object.overrideMimeType("text/html; charset=windows-1251");
    }
    else if (window.ActiveXObject)
    {
        try
        {
            object = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e)
        {
        }

        if (object == null)
        {
            try
            {
                object = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(e)
            {
            }
        }
    }

    return object;
}

function setCookie( name, value, expires, path, domain, secure ) {
	var today = new Date();
	today.setTime( today.getTime() );
	if ( expires ) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );
	document.cookie = name+'='+escape( value ) +
		( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + //expires.toGMTString()
		( ( path ) ? ';path=' + path : '' ) +
		( ( domain ) ? ';domain=' + domain : '' ) +
		( ( secure ) ? ';secure' : '' );
}

function rb(o, l) {
	var img = new Image();
	img.src = 'http://rb2.pochta.ru/count/' + l + '/';
}

function session_id() {
	var sid = window.location.href, pos;

	if((pos = sid.indexOf('id=')) && pos >= 0) {
		sid = sid.substring(pos + 3);

		if((pos = sid.indexOf('&')) && pos >= 0) {
			sid = sid.substring(0, pos);
		}

		return sid;
	}
}
function transparent(im)
   {
   if (!im.transparented && (/\.png/.test(im.src)))
      {
      im.transparented = 1;
      var picture = im.src;
      var w = im.width;
      var h = im.height;
      im.src = "/skins/chatopen_ru/img/blank.gif";
      im.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod='image', src='" + picture + "');";
      im.width = w;
      im.height = h;
      }
   return "transparent";
   }

