
function setPointer(theRow, RowColor )
{

		theRow.style.backgroundColor  = RowColor;

}

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;
}