﻿//Renk Degistir
function FareUzeri(id)
{
    document.getElementById(id).bgColor = "#ff3300";
}
function FareKacti(id)
{
    document.getElementById(id).bgColor = "";
}
//Göster veya Gizle Divleri..vs... gösterir yada gizler... 
function Goster(id) {
    document.getElementById(id).style.visibility = "visible"
    document.getElementById(id).style.display = "block"
}
function Gizle(id) {
    document.getElementById(id).style.visibility = "hidden"
    document.getElementById(id).style.display = "none"
}
//Arkaplan Resimini Değiştir 
function BackgroundImage(id, ResimURL, Width, Heigth) {
    document.getElementById(id).style.background = "transparent url(" + ResimURL + ") " + Width + " " + Heigth
}
//Yeni Pencere Açtırma
var win = null;
function YeniPencere(Sayfam, SayfaIsmi, w, h, scroll) {
    LeftPosition = (screen.width) ? (screen.width - w) / 2 : 0;
    TopPosition = (screen.height) ? (screen.height - h) / 2 : 0;
    settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',resizable=no'
    win = window.open(Sayfam, SayfaIsmi, settings)
}
// Manşet Haber
function changethis(e) {
    var hotblock = document.getElementById("hotlink");
    var newblock = document.getElementById("news" + e);
    var hotphoto = document.getElementById("hotphoto");

    if (e) {
        hotblock.innerHTML = "<span>" + newblock.getAttribute("subject") + "</span>" + newblock.getAttribute("text")
        hotphoto.style.backgroundImage = "url(" + newblock.getAttribute("photo") + ")"
    }
}
function changethisblok(e) {
    var hotblock = document.getElementById("haberlink");
    var newblock = document.getElementById("haber" + e);
    var hotphoto = document.getElementById("haberphoto");

    if (e) {
        hotblock.innerHTML = "<span>" + newblock.getAttribute("subject") + newblock.getAttribute("text") + "</span>"
        hotphoto.style.backgroundImage = "url(" + newblock.getAttribute("photo") + ")"
    }
}
// Tümünü Seç
function TumunuSec(id) {
    document.getElementById(id).focus();
    document.getElementById(id).select();
}