if (window.kwValidate == undefined) {
window.kwOnLoad = window.onload;
window.kwValList = Array();
window.kwValIndex = 0;
window.kwValidate = function () {
if (window.kwOnLoad != null) {
try {
window.kwOnLoad();
}
catch (err) { }
}
for (ii = 0; ii < window.kwValIndex; ii=ii+1) {
fname = window.kwValList[ii]
fname();
}
}
window.kwAddValidator = function (fname) {
window.kwValList[window.kwValIndex] = fname;
window.kwValIndex = window.kwValIndex + 1;
}
window.onload = window.kwValidate
}
window.kwAddValidator (createBadge);
if (document.createStyleSheet) {
document.createStyleSheet("https://www.kiwiwise.co.nz/css/widget.css");
}
else {
var stylesImport = "@import url('https://www.kiwiwise.co.nz/css/widget.css');";
var newSS=document.createElement('link');
newSS.rel='stylesheet';
newSS.href='data:text/css,'+escape(stylesImport);
if (document.getElementsByTagName("head")[0]) {
document.getElementsByTagName("head")[0].appendChild(newSS);
}
else {
document.write('');
}
}
function createBadge() {
var container = document.getElementById('KWactivity210');
if (container == null) {
var scriptTags = document.getElementsByTagName("script");
for (var i=0; i= 0) {
var msgElem = document.createElement('div');
if (msgElem != null && msgElem != 'undefined') {
msgElem.style.margin='8px';
msgElem.style.color='red';
msgElem.innerHTML="Please check the KiwiWise code and install again.";
var parentElem = scriptTags[i].parentNode;
if (parentElem != null && parentElem != 'undefined') {
parentElem.appendChild(msgElem);
}
break;
}
}
}
return;
}
var validityRegEx = new RegExp('https?://([^/]+\.|)kiwiwise\.(com|co.nz)/.*');
var kwServerName = 'kiwiwise';
var valid = true;
var linksNum = 0;
var links = container.getElementsByTagName("a");
for (var i=0; i';
container.innerHTML = tmpStr;
} else {
container.innerHTML = '';
}
}