﻿function onUpdating(){

    if (parseInt(navigator.appVersion)>3) {
     if (navigator.appName=="Netscape") {
      winW = window.innerWidth;
      winH = window.innerHeight;
     }
     if (navigator.appName.indexOf("Microsoft")!=-1) {
      winW = document.body.offsetWidth;
      winH = document.body.offsetHeight;
     }
    }
    
    
    var updateProgressDiv = $get('updateProgressDiv'); 
    updateProgressDiv.style.left = winW / 2;
    updateProgressDiv.style.top = (f_scrollTop()) + 250 ;
    updateProgressDiv.width = 15;
    
    updateProgressDiv.style.visibility = 'visible';

    
}

function onUpdated() {
    var updateProgressDiv = $get('updateProgressDiv'); 
    updateProgressDiv.style.visibility = 'hidden';
}

function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}


function Yukleniyor(){
    document.getElementById('EserPanel').style.visibility = 'hidden';
    document.getElementById('BeklemePanel').style.visibility = 'visible';
    document.getElementById('BeklemeFrame').src = '../Resim/yukleniyor.gif';
    
    document.onmousedown=right;
    document.onmouseup=right;
    if (document.layers) window.captureEvents(Event.MOUSEDOWN);
    if (document.layers) window.captureEvents(Event.MOUSEUP);
    window.onmousedown=right;
    window.onmouseup=right;
    
}

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2 || e.which == 1))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 1 || event.button == 2 || event.button == 3)) {
alert("Lütfen Esernuz yüklenene kadar bekleyin.\r\n Aksi takdirde Esernuzun yüklenmesi yarıda kalacağından yayınlanması mümkün olmayacaktır.");
return false;
}
return true;
}

