﻿String.prototype.startsWith = function(str) 
{
    return (this.match("^" + str) == str)
}

String.prototype.endsWith = function(str) 
{
return (this.match(str + "$") == str)
}

function Hello(Appid) {
    var t = new Array();
    t = document.getElementsByTagName('div');
    if (t.length > 0) {
        for (var i = 0; i < t.length; i++) {
            var cName = t[i].className;
            if (cName == null) {
                cName = t[i].getAttribute('class');
            }
            if (cName == null) {
                cName = t[i].getAttribute('className');
            }
            if (cName == 'IncAdv10') {
                var w = t[i].width;
                var h = t[i].height;
                var abc;
                abc = document.createElement('div');
                abc.id = 'IncAdv000' + i;
                abc.innerHTML = '.';
                var g;
                g = document.createElement('script');
                g.charset = 'UTF-8';
                g.type = 'text/javascript';
                g.onload = 'scriptLoaded';
                g.src = 'http://aimofisdn.net/AdEngine/Content.ashx?Tom=' + Appid + '&Jerry=000' + i;
                abc.appendChild(g);
                t[i].appendChild(abc);
            }
        }
    }
}

function IndianHello(Appid) {
    var t = new Array();
    t = document.getElementsByTagName('div');
    if (t.length > 0) {
        for (var i = 0; i < t.length; i++) {
            document.write(t[i].getAttribute('class') + "<BR>");
            if (t[i].getAttribute('class') == 'IncAdv10') {
                var w = t[i].width;
                var h = t[i].height;
                var abc;
                abc = document.createElement('div');
                abc.id = 'IncAdv000' + i;
                abc.innerHTML = 'Wow';
                var g;
                g = document.createElement('script');
                g.charset = 'UTF-8';
                g.type = 'text/javascript';
                g.onload = 'scriptLoaded';
                g.src = 'http://aimofisdn.net/AdEngine/Content.ashx?Tom=' + Appid  + '&Jerry=000' + i;
                abc.appendChild(g);
                t[i].appendChild(abc);
            }
        }
    }
}