<!--
//trim spaces with regular expression
String.prototype.trim = function()
{
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
//Count string byte number, return integer
String.prototype.ByteCount = function()
{
//	txt = this.replace(/(<.*?>)/ig,"");
	txt = this.replace(/([\u0391-\uFFE5])/ig, "11");
	var count = txt.length;
	return count;
}
//¶¨ÒåxmlHttpÊµÀý
var xmlHttp = false;
try{
  if( window.ActiveXObject ){
  for( var i = 5; i; i-- ){
  try{
  if( i == 2 ){
  xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" ); }
  else{
  xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP." + i + ".0" );
  xmlHttp.setRequestHeader("Content-Type","text/xml");
  xmlHttp.setRequestHeader("Charset","gbk"); }
  break;}
  catch(e){
  xmlHttp = false; } } }
  else if( window.XMLHttpRequest )
  { xmlHttp = new XMLHttpRequest();
  //if (xmlHttp.overrideMimeType)
  //{ xmlHttp.overrideMimeType('text/xml'); }
  } }
  catch(e){ xmlHttp = false; }
  function $(str){
  return document.getElementById(str);
  }
//-->
