function MenuCurrent(strMenuID){
	try{ document.getElementById(strMenuID).className = "Current"; }catch(e){}
}

function getBytesCount(str)
{
  var bytesCount = 0;
  if (str != null)
  {
    for (var i = 0; i < str.length; i++)
    {
      var c = str.charAt(i);
      if (/^[\u0000-\u00ff]$/.test(c))
      {
        bytesCount += 1;
      }
      else
      {
        bytesCount += 3;
      }
    }
  }
  return bytesCount;
}

function divHeight(){
	var height1 = document.getElementById("left").scrollHeight;
	var height2 = document.getElementById("right").scrollHeight;
	if(height1>=height2){
		document.getElementById("right").style.height = height1 + "px";
	}else{
		document.getElementById("left").style.height = height2 + "px";
	}
}

function addLoadEvent(func){
	var oldonload = window.onload;
	if(typeof window.onload != 'function'){
		window.onload = func;
	}else{
		window.onload = function(){
			oldonload();
			func();
		}
 	}
}

//addLoadEvent(divHeight);

