function FrmResize(Alan)
{
	// Find the innerWidth and innerHeight of the window //
	if(parseInt(navigator.appVersion)>3)
	{
	 var winW = window.innerWidth - 17;
	 var winH = eval(document.body.scrollHeight);// - 1251;//496;
	 
	// var winH = 1450; // window.innerHeight - 17;
	 if (navigator.appName.indexOf("Microsoft")!=-1)
	 {
	  winW = document.body.offsetWidth - 21;
	  winH =  document.body.scrollHeight;
	  }
	 }
	 
	///////////////////////////////////////////////////////
	
	// Set the width and height of div_1 to match the windows innerWidth and innerHeight //
	document.getElementById(Alan).style.width = winW + "px";
	document.getElementById(Alan).style.height = winH + "px";
	
	///////////////////////////////////////////////////////////////////////////////////////
	
	// Find the width of div_2 and center it in the window //
	//var w = document.getElementById("dvFullScreenForum").style.width.length - 2;
	//document.getElementById("dvFullScreenForum").style.left = (winW - document.getElementById("dvFullScreenForum").style.width.substr(0,w))/2 + "px";
	////////////////////////////////////////////////////////	
}

function EncodeUTF8(sString) 
{
    sString = sString.replace(/\r\n/g,"\n");
    var sUTFString = "";

    for (var i = 0; i < sString.length; i++) 
    {  
        var c = sString.charCodeAt(i);  
        if (c < 128) 
            sUTFString += String.fromCharCode(c);
        else if((c > 127) && (c < 2048)) 
        {  
            sUTFString += String.fromCharCode((c >> 6) | 192);  
            sUTFString += String.fromCharCode((c & 63) | 128);  
        }  
        else 
        {  
            sUTFString += String.fromCharCode((c >> 12) | 224);  
            sUTFString += String.fromCharCode(((c >> 6) & 63) | 128);  
            sUTFString += String.fromCharCode((c & 63) | 128);  
        }  
    }
    return escape(sUTFString);  
}

function DecodeUTF8(sUTFString) 
{
    sUTFString = unescape(sUTFString);
    
    var sString = "";  
    var i = 0;  
    var c = c1 = c2 = 0;  

    while ( i < sUTFString.length ) 
    {  
        c = sUTFString.charCodeAt(i);  
        if (c < 128) 
        {  
            sString += String.fromCharCode(c);  
            i++;  
        }  
        else if((c > 191) && (c < 224)) 
        {  
            c2 = sUTFString.charCodeAt(i+1);  
            sString += String.fromCharCode(((c & 31) << 6) | (c2 & 63));  
            i += 2;  
        }  
        else 
        {  
            c2 = sUTFString.charCodeAt(i+1);  
            c3 = sUTFString.charCodeAt(i+2);  
            sString += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));  
            i += 3;  
        }  
    }  
    return sString;
}

