﻿var currentMail = "Kapali";
var cacheTime = new Date().getTime();
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
$(document).ready(function() {
    if ((version >= 5.5) && (document.body.filters)) {
        $.get("/newsfiles/yayinAkisi.aspx?dt=" + cacheTime, function(_Str) { $('#yayinAkisDiv').html(_Str); })
    }
    else {
        $.get("/newsfiles/yayinAkisiFire.aspx?dt=" + cacheTime, function(_Str) { $('#yayinAkisDiv').html(_Str); })
    }
});

function MailAc() { if (currentMail == "Kapali") { $('#mailDiv').show("slow"); currentMail = "Acik"; } else { $('#mailDiv').hide("slow"); currentMail = "Kapali"; } }

function MailYolla(haberId, haberType) {
    $('#mailSonuc').html("Lütfen bekleyiniz...");
    var mailAdres = document.getElementById('ctl00$ortayer$txtMail').value;
    if (mailAdres != "") $.get("/YabanTV/MailGonder.aspx?id=" + haberId + "&mail=" + mailAdres + "&type=" + haberType, function(_Str) { $('#mailSonuc').html(_Str); });
    else $('#mailSonuc').html("Mail alanı boş");
}
function Open(mypage, myname, w, h, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height=' + h + ',width=' + w + ',top=' + wint + ',left=' + winl + ',scrollbars=' + scroll + ',resizable=no'
    win = window.open(mypage, myname, winprops)
}
function HavaGetir(sehir) {
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])

    if ((version >= 5.5) && (document.body.filters)) {
        $.get("/hava/havagetir.aspx?type=ie&sehir=" + sehir + "&dt=" + cacheTime, function(_Str) { $('#havaDiv2').html(_Str); });
    }
    else {
        $.get("/hava/havagetir.aspx?type=fire&sehir=" + sehir + "&dt=" + cacheTime, function(_Str) { $('#havaDiv2').html(_Str); });
    }
}
