﻿// <![CDATA[ 
function externallinks()
{ 
 if(!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) 
 { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
   {
     anchor.target = "_blank"; 
   }
 } 
} 
window.onload = externallinks;


/*下拉菜单*/
function ShowFloatDiv(selfid,aa)
{
  
 if( selfid != null )
 { 
 	selfid.style.position = 'relative';
  document.getElementById(aa).style.top = CountPx(selfid.offsetTop,23);
  document.getElementById(aa).style.left = CountPx(selfid.offsetLeft,-1);
  }
  
  
 document.getElementById(aa).style.display = 'block';

 
}
function HiddenFloatDiv(aa)
{
 	document.getElementById(aa).style.display = 'none';

}
function CountPx(PxA,PxB)
{
 	return (parseInt(PxA.toString().replace('px','')) + parseInt(PxB.toString().replace('px',''))).toString() + 'px';
}



function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}

var http = createRequestObject();

function ceowenajax(cid) {
    http.open('get','/user/message/updatestate?id='+cid);
    http.send(null);
}

// ]]>