// Pencere
window.name = "derkenar";
window.status = " D E R K E N A R  -  R e s i m l i   H a y a t   A n s i k l o p e d i s i ";

// Frame engelleyici
if (top.location != location) {
top.location.href = document.location.href;
}

// Host sabitleyici
if (window.location.host != "localhost") {
if (window.location.host != "www.derkenar.com") {
//top.location.href = "http://www.derkenar.com" + window.location.pathname;
}
}

// Bölüm Bul
var path = window.location.pathname;
var bolum = path.split('/')[1]
var sayfa = path.split('/')[2]
if (bolum == "") {bolum = "anasayfa"};
if (bolum == "necdetsen" || bolum == "aliturkan") {bolum = "yazar"};

// STYLESHEET
document.write('<style type="text\/css">');
// menu
document.write('#menu #'+bolum+', #menu #'+bolum+':hover { font-size: 12pt; font-weight: bold; color: #ce675e !important; background: url(/img/ekran/saribant.png) repeat-x bottom center; background-color: #ffb52c !important; padding: 30px 8px 4px !important; border: 1px solid #dc6c6a  !important; position: relative; top: 6px; -moz-border-radius-bottomright: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-radius: 6px; } '); 
document.write('#menu a:hover { -moz-border-radius-bottomright: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-radius: 6px; } '); 
document.write('<\/style>');

// Font Boyutu
function buyuk() {
document.getElementById("icerik").style.fontSize="130%";
return false; 
}
function normal() {
document.getElementById("icerik").style.fontSize="";
return false; 
}

// Form alanı içine yazıldıkça büyüyor
function Uzat() { 
var metin = document.yazar_formu.Metin
var uzunluk = metin.value.length
if (Math.round(uzunluk/40) > 2) {
metin.style.height = Math.round(uzunluk/2)+"px"; 
}
metin.style.font = "bold 12pt Arial";	// font boyutu
return false;
}

// Aç Kapa
function AcKapa(Link) {
if (document.getElementById(Link).style.display == 'none') {
document.getElementById(Link).style.display = ''; 
return false; 
}
else {
document.getElementById(Link).style.display = 'none';
return false; 
}
}

// Copy/Paste engelleyici
function say() {
setTimeout("tazele()",900);
}
function tazele() {
var icerik = document.getElementById('icerik')
icerik.innerHTML = icerik.innerHTML;
}
document.onmouseup = say

// Resim Koruma
function mhfz() {
var imge = document.getElementById('imge')
if (imge != null) {
var imgew = imge.width
var imgeh = imge.height
var mhfz = document.getElementById('mhfz')
mhfz.innerHTML = '<div id="mhf" style="width:'+imgew+'px; height:'+imgeh+'px"><\/div>'; 
}
return false; 
} 
window.onload = mhfz

// ERROR STOPER
function stopError() {
return true;
}
//window.onerror = stopError;
