akif.yesilkaya1gmail.com / sehirlerSaatFarkları

function sehirlerSaatFarkları(city_name)
{
    var sehir_farklar = {};
    jQuery.ajax({
        url: location.protocol+'//'+location.hostname+'/World/Popmundo.aspx/Help/TimeZone/',
        type: 'get',
        dataType: 'html',
        async: false,
        success: function(responseText) {
            var text = responseText;
            text = text.substring(text.indexOf('</thead>')+8,text.indexOf('</table>'));
            var hours = text.indexOf(city_name);
            hours = text.indexOf('"sortkey">',hours)+10;
            hours = parseInt(text.substring(hours,text.indexOf('<',hours)));
            while(true)
            {
                var b1 = text.indexOf('/City/')+6;
                if(b1!==5)
                {
                    var b2 = text.indexOf('">',b1);
                    var sehir_id = text.substring(b1,b2);
                    b1 = text.indexOf('<',b2);
                    var sehir_ismi = text.substring(b2+2,b1);
                    b1 = text.indexOf('"sortkey">',b1)+10;
                    b2 = text.indexOf('<',b1);
                    sehir_farklar[sehir_id] = hours-parseInt(text.substring(b1,b2));
                    text = text.substring(b2);
                }
                else
                {
                    break;
                }
            }
        }
    });
    return sehir_farklar;
}