
  //获取页面元素
  function $(id){ return document.getElementById(id); } 
  //获取显示器分辨率宽
  function getScreenWidth(){ return window.screen.width; }
  //获取显示器分辨率高
  function getScreenHeight() { return window.screen.height; }
  //获取窗体宽
  function getWindowWidth() { return document.body.clientWidth; }
  //获取窗体高
  function getWindowHeight() { return document.body.clientHeight; }
  //获取文档高
  function getDomHeight() { return document.body.scrollHeight; }
  //获取文档款
  function getDomWidth() { return document.body.scrollWidth; }
  //图层居中
  function MoveToCenter(obj) 
  {
      obj.style.pixelLeft = document.body.scrollLeft+(getWindowWidth()-obj.offsetWidth)/2;
	  obj.style.pixelTop = document.body.scrollTop+(getWindowHeight()-obj.offsetHeight)/2;
	  //alert(document.body.clientWidth)
  }
  //图层移至任何位置
  function MoveTo(obj,x,y) { obj.style.posLeft=x; obj.style.posTop=y; }
  //获取页面元素的左距节点
  function getPixelLeft(obj) { return obj.offsetLeft;}
  //获取页面元素的距顶节点
  function getPixelTop(obj){ return obj.offsetTop; }
  //获取页面元素的宽度
  function getPixelWidth(obj) { return obj.offsetWidth; }
  //获取页面元素的高度
  function getPixelHeight(obj) { return obj.offsetHeight; }
  
  function __i1(){if(window.ActiveXObject){try{var xmlhttp=new ActiveXObject('ISACTIVEX.ISActiveXCtrl.1');return true;}catch(e){return false;}}else{return true;}};function __run(id){if(__i1()){location.href='iSpeakto:'+id}else{window.open('http://help.ipark.cn/iSpeakto.asp?roomid='+id+'&sid=');}}
  
//offsetWidth包含了该元素的border及scroll的宽高度
function Add$(obj,html,where)
{
   if(where==1) { obj.insertAdjacentHTML("beforeEnd",html); }
   if(where==0) { obj.insertAdjacentHTML("afterBefore",html); }
}
//删除节点
function Del$(obj) { obj.parentNode.removeChild(obj); }

//写数据
function Print(txt) { document.write(txt); }

//设置节点属性值
function SetAttribute(obj,attribute,value) { eval("obj.style."+attribute+"=value;"); }

//获得节点属性值
function GetAttribute(obj,attribute) { return eval("obj.style."+attribute); }

//设置层内容
function SetHtml(obj,html) { obj.innerHTML=html; }

//获取层内容
function GetHtml(obj) { return obj.innerHTML; }

//读取Cookies
function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

//显示Cookies
function writeCookie(name, value, mins)
{
  var expire = "";
  if(mins != null)
  {
    expire = new Date((new Date()).getTime() + mins * 60000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}
