how to display javascript in amp

function showHint()

{

//alert(“This is the first.”);

var xmlhttp;

if (window.XMLHttpRequest)

{// code for IE7+, Firefox, Chrome, Opera, Safari

xmlhttp=new XMLHttpRequest();

}

else

{// code for IE6, IE5

xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);

}

xmlhttp.onreadystatechange=function()

{

if (xmlhttp.readyState==4 && xmlhttp.status==200)

{

document.getElementById(“txtHint”).innerHTML=xmlhttp.responseText;

}

}

var theSecondDate=new Date();

var d=theSecondDate.getUTCDate();

var a=theSecondDate.getUTCMonth()+1;

var y=theSecondDate.getFullYear();

xmlhttp.open(“GET”,“dailyhoroscopetoday.php?sign=Aries&hday=”+d+"&hmonth="+a+"&hyear="+y,true);

xmlhttp.send();

}

Please help me to convert the javascript function into Accelerated mobile page(Amp) javascript,

I am new learner to Amp language.