var e = document.getElementById(“co2-widget”);
e.style.marginBottom=”12px”;
e.outerHTML=”

“+

“+

Loading…

“+

“+
“+

“;

var a = document.getElementById(“co2widgetlink”);
function co2widgetclick (){var c= document.getElementById(“co2widgetcode”); if (c.style.display==’none’) c.style.display=”block”; else c.style.display=”none”;}

var xmlHttp = null;
try {
// Mozilla, Opera, Safari sowie Internet Explorer (ab v7)
xmlHttp = new XMLHttpRequest();
} catch(e) {
try {
// MS Internet Explorer (ab v6)
xmlHttp = new ActiveXObject(“Microsoft.XMLHTTP”);
} catch(e) {
try {
// MS Internet Explorer (ab v5)
xmlHttp = new ActiveXObject(“Msxml2.XMLHTTP”);
} catch(e) {
xmlHttp = null;
}
}
}
if (xmlHttp) {
xmlHttp.open(‘GET’, ‘http://ghgaccounting.ca/co2level.php?callback=co2values’, true);
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
eval(xmlHttp.responseText);
}
};
xmlHttp.send(null);
}

function co2values (obj)
{
document.getElementById(“co2widgettime”).innerHTML=obj.title;
document.getElementById(“co2widgetvalue”).innerHTML=obj.value;
document.getElementById(“co2widgetunit”).innerHTML=obj.unit;
}