﻿function disableEnterKey(e) {
    var key;
    if (window.event)
        key = window.event.keyCode; //IE
    else
        key = e.which; //firefox      

    return (key != 13);
}


function GoogleAramaYap(txtMetin) {
    var link = "http://www.google.com/custom?hl=tr&client=google-coop&cof=FORID%3A13%3BAH%3Aleft%3BCX%3AHaberoku%3BL%3Ahttp%3A%2F%2Fwww.google.com%2Fintl%2Ftr%2Fimages%2Flogos%2Fcustom_search_logo_sm.gif%3BLH%3A30%3BLP%3A1%3BKMBOC%3A%23336699%3B&adkw=AELymgW3gAeoisgzWqbVaCJKKL1dp_BQcwN9ZjWLIFUn81Vr9b4zBt64myZQ0xO3bF_Vs5pNIBaPRvwX1m_XG2NCH3RK6DPMem58zR5q78YQmucZ3N-FV40&boostcse=0&q=[Keyword]&btnG=Ara&cx=001951524831032294021%3Afjqj5heihju";
    var keyword = document.getElementById(txtMetin).value;
    this.location.href = link.replace('[Keyword]', keyword);
}   

(function($) {
    $.fn.blink = function(options) {
        var defaults = { delay: 1000 };
        var options = $.extend(defaults, options);

        return this.each(function() {
            var obj = $(this);
            setInterval(function() {
                if ($(obj).css("visibility") == "visible") {
                    $(obj).css('visibility', 'hidden');
                }
                else {
                    $(obj).css('visibility', 'visible');
                }
            }, options.delay);
        });
    }
} (jQuery))


$(document).ready(function() {
    $('.blink').blink();
});

function PageLoading() { 
    $("div#slider1,div#slider2,div#slider3,div#slider4").slideView({ easeTime: 0 });
    $("div#bslider,div#bslider2,div#bslider3,div#bslider4,div#bslider5,div#bslider6").slideView({ easeTime: 0 });
    $("#stripTransmitter0").append("<span class='pagination-t'>Güncel: </span>");
    $("#stripTransmitter1").append("<span class='pagination-t'>Ekonomi: </span>");
    $("#stripTransmitter2").append("<span class='pagination-t'>Spor: </span>");
    $("#stripTransmitter3").append("<span class='pagination-t'>Magazin: </span>");
    vtip();
}

function TabDegistir(kategori) {

    document.getElementById("ctl00_ContentPlaceHolder1_lbGuncel").className = "item1";
    document.getElementById("ctl00_ContentPlaceHolder1_lbEkonomi").className = "item2";
    document.getElementById("ctl00_ContentPlaceHolder1_lbSpor").className = "item3";
    document.getElementById("ctl00_ContentPlaceHolder1_lbMagazin").className = "item4";

    if (kategori == 1) {
        document.getElementById("ctl00_ContentPlaceHolder1_lbGuncel").className = "item1Selected";
    }
    else if (kategori == 2) {

        document.getElementById("ctl00_ContentPlaceHolder1_lbEkonomi").className = "item2Selected";
    }
    else if (kategori == 3) {

        document.getElementById("ctl00_ContentPlaceHolder1_lbSpor").className = "item3Selected";
    }
    else if (kategori == 4) {

        document.getElementById("ctl00_ContentPlaceHolder1_lbMagazin").className = "item4Selected";
    }
}


function create_iframe() {
    var height = window.innerHeight; //Firefox

    if (!height) {
        height = document.documentElement.clientHeight; //IE  
    }

    var newHeight = height - 200;
    var my_iframe = document.getElementById('ctl00_ContentPlaceHolder1_frmHaberDetay');
    my_iframe.height = newHeight;

}

function paylasPanelAc() {
    document.getElementById("paylasPopup").style.display = 'block';
}
function paylasPanelKapat() {
    document.getElementById("paylasPopup").style.display = 'none';
}



/* SHARE URL */
var ShareUrl = {
    facebook: function() {
        window.open('http://www.facebook.com/sharer.php?title=' + encodeURIComponent(document.title) + '&u=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    google: function() {
        window.open('http://www.google.com/bookmarks/mark?op=edit&title=' + encodeURIComponent(document.title) + '&bkmk=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    yahoo: function() {
        window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t=' + encodeURIComponent(document.title) + '&u=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    myspace: function() {
        window.open('http://www.myspace.com/index.cfm?fuseaction=postto&t=' + encodeURIComponent(document.title) + '&u=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    friendFeed: function() {
        window.open('http://friendfeed.com/share/bookmarklet/frame?title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    mixx: function() {
        window.open('http://www.mixx.com/submit/story?title=' + encodeURIComponent(document.title) + '&page_url=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    digg: function() {
        window.open('http://digg.com/submit?title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    stumpleUpon: function() {
        window.open('http://www.stumbleupon.com/submit?title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    delicious: function() {
        window.open('http://del.icio.us/post?title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    reddit: function() {
        window.open('http://reddit.com/submit?title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    twitter: function() {
        window.open('http://twshot.com/share.aspx?title=' + encodeURIComponent(document.title) + '&url=' + encodeURIComponent(document.location), '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    }
}

var ShareUrl2 = {
    facebook: function(location) {
        window.open('http://www.facebook.com/sharer.php?title=' + encodeURIComponent(document.title) + '&u=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    google: function(location) {
        window.open('http://www.google.com/bookmarks/mark?op=edit&title=' + encodeURIComponent(document.title) + '&bkmk=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    yahoo: function(location) {
        window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t=' + encodeURIComponent(document.title) + '&u=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    myspace: function(location) {
        window.open('http://www.myspace.com/index.cfm?fuseaction=postto&t=' + encodeURIComponent(document.title) + '&u=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    friendFeed: function(location) { 
        window.open('http://friendfeed.com/share/bookmarklet/frame?title=' + encodeURIComponent(document.title) + '&url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    mixx: function(location) {
        window.open('http://www.mixx.com/submit/story?title=' + encodeURIComponent(document.title) + '&page_url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    digg: function(location) {
        window.open('http://digg.com/submit?title=' + encodeURIComponent(document.title) + '&url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    stumpleUpon: function(location) {
        window.open('http://www.stumbleupon.com/submit?title=' + encodeURIComponent(document.title) + '&url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    delicious: function(location) {
        window.open('http://del.icio.us/post?title=' + encodeURIComponent(document.title) + '&url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    reddit: function(location) {
        window.open('http://reddit.com/submit?title=' + encodeURIComponent(document.title) + '&url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    twitter: function(location) {
        window.open('http://twshot.com/share.aspx?title=' + encodeURIComponent(document.title) + '&url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    }
}
var ShareUrl3 = {
    facebook: function(title, location) {
        window.open('http://www.facebook.com/sharer.php?title=' + title + '&u=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    digg: function(title, location) {
        window.open('http://digg.com/submit?title=' + title + '&url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    },
    twitter: function(title, location) {
        window.open('http://twshot.com/share.aspx?title=' + title + '&url=' + location, '', 'height=650,width=910,titlebar=no,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=1');
    }
}
 
