﻿var HfHaberIDvalue;

$(document).ready(function() {
    $("dd:not(:first)").hide(500);
    $("dt img").click(function() {
        $("dd:visible").slideUp("slow");
        $(this).parent().next().slideDown("slow");
        return false;

    });


});


window.onload = function() {
    cok(document.getElementById("IlgiliHaber"));
    YorumGetir("5-1");
    YorumControl();



}
function YorumGetir(prm) {
//    $("#YorumDiv").hide(1500);
 HtmlGetirJQ(document.getElementById('YorumDiv'), "HID=" + HfHaberIDvalue + "&Sayfalama=" + prm);

}


function PopupAc(sy) {
    var Sayfa = 'Yorum/?S=' + sy;
    var digerParametreler
    switch (sy) {
        case 1:
            digerParametreler = 'width=462,height=300,scrollbars=yes,algin=center';
            break;
        default:
            digerParametreler = 'width=462,height=450,scrollbars=yes,algin=center';
            break;
    }
    window.open(Sayfa, '', digerParametreler);
}

function YorumYaz() {
    var Sayfa = 'Yorum/?T=1&ID=' + HfHaberIDvalue;
    var digerParametreler = 'width=462,height=450,scrollbars=yes,algin=center';
    window.open(Sayfa, '', digerParametreler);

}

function YorumControl() {
//    $("#YorumYap").animate({ opacity: 0.1 }, 1);
//    $("#YorumYap").hide(500);
 HtmlGetirJQJS(document.getElementById("YorumYap"), "YorumControl=");
}

function YorumLogin() {
//    $("#YorumYap").animate({ opacity: 0.1 }, 1);
//    $("#YorumYap").hide(1000);
    HtmlGetirJQJS(document.getElementById('YorumYap'), 'YorumLogin=');
}


function YorumGiris() {

    var Eposta = document.getElementById('TxtLoginEposta').value;
    var Sifre = document.getElementById('TxtLoginSifre').value;
    if ((Eposta == '' || Eposta == 'E Posta') && (Sifre == '' || Sifre == 'Sifre'))
        alert("Lütfen Eposta ve Şifrenizi giriniz!");
    else {
//        $("#YorumYap").animate({ opacity: 0.1 }, 1);
//        $("#YorumYap").hide(1000);
        HtmlGetirJQJS(document.getElementById('YorumYap'), 'Eposta=' + document.getElementById('TxtLoginEposta').value + '&Sifre=' + document.getElementById('TxtLoginSifre').value);
    }
}

function YorumGonder() {
    if (document.getElementById('TxtUyeYorumText').value == '') {
        alert('Yorum metni boş bırakılamaz!');
    }
    else {
//        $("#YorumYap").animate({ opacity: 0.1 }, 1);
//        $("#YorumYap").hide(1000);
        HtmlGetirPOST(document.getElementById('YorumYap'), HfHaberIDvalue, document.getElementById('TxtUyeYorumText').value);
    }


}

function YorumCikis() {
//    $("#YorumYap").animate({ opacity: 0.1 }, 1);
//    $("#YorumYap").hide(1000);
    HtmlGetirJQJS(document.getElementById('YorumYap'), 'YorumCikis=');

}
function cok(kimCok) {

    document.getElementById("IlgiliHaber").src = "Foto/SabitResimler/IlgiliHaber_1.jpg";
    document.getElementById("IlgiliRoportaj").src = "Foto/SabitResimler/IlgiliRoportaj_1.jpg";
    document.getElementById("IlgiliDosya").src = "Foto/SabitResimler/IlgiliDosya_1.jpg";
    document.getElementById("IlgiliMakale").src = "Foto/SabitResimler/IlgiliMakale_1.jpg";
    switch (kimCok.id) {
        case "IlgiliHaber":
            kimCok.src = "Foto/SabitResimler/IlgiliHaber_2.jpg";
            HtmlGetirJQ(document.getElementById("IlgiliDiv"), "HID=" + HfHaberIDvalue + "&IlgiliHaber=");
            break;
        case "IlgiliRoportaj":
            kimCok.src = "Foto/SabitResimler/IlgiliRoportaj_2.jpg";
            HtmlGetirJQ(document.getElementById("IlgiliDiv"), "HID=" + HfHaberIDvalue + "&IlgiliRoportaj=");
            break;
        case "IlgiliDosya":
            kimCok.src = "Foto/SabitResimler/IlgiliDosya_2.jpg";
            HtmlGetirJQ(document.getElementById("IlgiliDiv"), "HID=" + HfHaberIDvalue + "&IlgiliDosya=");
            break;
        case "IlgiliMakale":
            kimCok.src = "Foto/SabitResimler/IlgiliMakale_2.jpg";
            HtmlGetirJQ(document.getElementById("IlgiliDiv"), "HID=" + HfHaberIDvalue + "&IlgiliMakale=");
            break;
    }


}           
