<html><head>
<meta charset="utf-8">

<script type="text/javascript">
  document.onreadystatechange = function () {
   if (document.readyState == "complete") {
    getDataParam();
   }
  }

function getDataParam() {
  var vals = new Array();
  vals = location.search.substr(1).split("&");
  for (var i in vals) { vals[i] = vals[i].replace(/\+/g, " ").split("=");  }

  //look for the parameter named 'data'
  var found = false;
  for (var i in vals) {
    if (vals[i][0].toLowerCase() == "data") {
      parseDataValue(vals[i][1]);
      found = true;
      break;
    }
  }
}
  

function parseDataValue(datavalue) {
  if (datavalue != "") {
    var vals = new Array();
    vals = decodeURIComponent(datavalue).split("&");
    
    var sText = vals[0];
    var sColor = vals[1];
    var sTypeIcon = vals[2];
    var sIcon = vals[3];
    
    if (sColor=="contact") {sColor="005088"}
    else if (sColor=="account") {sColor="794300"}
    else if (sColor=="opportunity") {sColor="3E7239"}
    else if (sColor=="relationship") {sColor="FFAA00"}
    else if (sColor=="case") {sColor="7A278F"}

    
    // Initialisation de l'image
    document.getElementById("icobox").style.backgroundColor = "#"+sColor;
    document.getElementById("icoline").style.borderBottom="2px solid " + "#"+sColor;
    document.getElementById("icotext").style.color = "#"+sColor;
    document.getElementById("icotext").innerText = sText;
    
    var imgpath = "http://amecrm.azurewebsites.net/AME_UI/";
    
    if (sTypeIcon=="sf") {
      document.getElementById("icoimg").style.marginTop = "-3px";
      document.getElementById("icoimg").style.marginLeft = "-1px";
      imgpath = "https://www.syncfusion.com/Content/en-US/Downloads/Images/MetroStudio/GraphicsPackage/IconPackage/";
    }
    else if (sTypeIcon=="wr") {imgpath="./"}
    else if (sTypeIcon=="az") {imgpath="http://amecrm.azurewebsites.net/AME_UI/"}

    document.getElementById("icoimg").src = imgpath+sIcon;

  }
}
 </script>


<meta></head>
<body style="margin: 0px;">
<div id="icobox" style="margin: 0px; width: 46px; height: 42px;">
    <img id="icoimg" style="margin-top: 5px; margin-left: 7px;" src="">
</div>
<div id="icoline" style="margin: 0px; left: 46px; top: 0px; width: 100%; height: 40px; position: absolute;">
    <div id="icotext" style="font-family: Segoe UI; font-size: 18px; margin-top: 8px; margin-left: 14px;"></div>
</div>


</body></html>