var tokenID;
var tokenElement;
var xmlhttpToken;

function loadXMLTokens(url)
{
xmlhttpToken=null
// code for Mozilla, etc.
if (window.XMLHttpRequest)
  {
  xmlhttpToken=new XMLHttpRequest()
  }
// code for IE
else if (window.ActiveXObject)
  {
  xmlhttpToken=new ActiveXObject("Microsoft.XMLHTTP")
  }
  
if (xmlhttpToken!=null)
  {
   try
   {
	xmlhttpToken.open("POST",url,false);
    xmlhttpToken.setRequestHeader("Content-length", 0);
	xmlhttpToken.send("");
   }
   catch(err){return;}
   tokenElement.innerHTML = xmlhttpToken.responseText;  
  }
else
  {
   alert("Your browser does not support XMLHTTP.")
  }
}

function TokenVal(myElement)
{
    tokenID = myElement.id;
    tokenElement = myElement;
    loadXMLTokens(WebServicePath + "GetToken.aspx?tokenid=" + tokenID);
}