﻿function InitXmlHttp() {
    try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
        try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (E) {
            xmlhttp = false;
        }
    }
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        xmlhttp = new XMLHttpRequest();
    }
    xmlhttp.onreadystatechange = XMLHttpRequestCompleted;
}

function InvokeASHX(lang, country, cities, back, fore, size, type) {
    InitXmlHttp();
    xmlhttp.onreadystatechange = XMLHttpRequestCompleted;
    if (type == "Hor") {
        xmlhttp.open("GET", "" + "http://diyanet8.diyanet.gov.tr/turkish/namazapi/Getir.ashx?Country=" + country + "&Cities=" + cities + "&BackColor=" + back + "&ForeColor=" + fore + "&Lang=" + lang + "&FontSize=" + size, true);
    } else if (type == "Ver") {
        xmlhttp.open("GET", "" + "http://diyanet8.diyanet.gov.tr/turkish/namazapi/Getir2.ashx?Country=" + country + "&Cities=" + cities + "&BackColor=" + back + "&ForeColor=" + fore + "&Lang=" + lang + "&FontSize=" + size, true);
    }
    xmlhttp.send(null);
}
function getir() {
    return html;
}
