<!--
var nameb = navigator.appName;

/*

 if (nameb != "Microsoft Internet Explorer"){
document.location.href="blok.php?h=1";	
}
*/
try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
if (navigator.cookieEnabled == 0) {
 alert("Lütfen çerez(cookie) lere izin veriniz!");
}
function blockError(){return true;} 
window.onerror = blockError;

//hidestatus
function hidestatus(){
window.status="USIUD";
return true;
}
document.onmouseover=hidestatus;
document.onmouseout=hidestatus;

document.write('<link rel=\"stylesheet\" href=\"tema/t1/css/e_css_main.php?brws='+nameb+'&e_w='+screen.width+'\" type=\"text/css\"/>');
document.write('<link rel=\"stylesheet\" href=\"tema/t1/css/e_css_text.php?e_w='+screen.width+'\" type=\"text/css\"/>');

function kptcik(t){
	if(t==0 || t==2){var onay = confirm("Kapatmak istediğinize emin misiniz?");
	}else{var onay = confirm("Çıkmak istediğinize emin misiniz?");}
	
	if( onay ==true ){
		if(t==0){window.close();
		}else if(t==1){window.location="index.php?ktg=logout";
		}else{
		window.location="index.php?ktg=logout";
		setTimeout("window.close()",200);
		}
	}
	return false;
}
//

function trkc(dizin) {
for(i=0;i<dizin.length+1;i++){
var dizin = dizin.replace('ş','*351;');
dizin = dizin.replace('Ş','*350;');
dizin = dizin.replace('ğ','*287;');
dizin = dizin.replace('Ğ','*286;');
dizin = dizin.replace('ı','*305;');
dizin = dizin.replace('İ','*304;');
dizin = dizin.replace('+','*111;');
dizin = dizin.replace('&','*112;');
}
 return dizin;
	}
function htx(ndz) {
ndz=ndz.replace(/(\r\n)|(\n)/ig, "*x1U*");
 return ndz;
	}

//genel fnk.
function IsNumeric(sText)
{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
	for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
}

function shwdiv(id,lf,tp,obj){
if (nameb != "Microsoft Internet Explorer" || id=="skytct"){
dropmenuobj=document.getElementById(id);
dropmenuobj.x=getposOffset(obj, "left")+lf;
dropmenuobj.y=getposOffset(obj, "top")+tp;
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+"px";
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px";
dropmenuobj.style.display="block";
}else{return;}
}

function dvkpt(kapa,ac){
document.getElementById(kapa).style.display="none";
if(ac){document.getElementById(ac).style.display="block";}
}
function dvkpt2(kapa){
document.getElementById(kapa).style.display="none";
}
function dvgos(ac){
document.getElementById(ac).style.display="block";
}
function resimg(obj,aln,w,h){

if(obj){
if (nameb == "Microsoft Internet Explorer"){
document.getElementById(aln).innerHTML ="<img src='file:///"+obj+"' style='margin-top:4px;' border='0' width='"+w+"px' height='"+h+"px'>";
}else{
document.getElementById(aln).innerHTML ="<img src='imgs/tick.gif' style='margin-top:4px;' border='0' width='20px' height='20px'>";
}


}else{
document.getElementById(aln).innerHTML ="";
}
}
function rsmgos(obj,aln){
document.getElementById(aln).style.display="block";
if(obj){
document.getElementById(aln).innerHTML ="<img src='"+obj+"' onclick=dvkpt('odm','fa0'); style='cursor:pointer;' alt='Kapat' border='0' width='300' height='300'>";
}
}

function outputSelected(opt) {
            var sel = getSelected(opt);
            var strSel = "";
            for (var item in sel) { 
if(sel[item].value){			
               strSel += sel[item].value + "*2zD*";
           }
			}
			return strSel;
         }

function getSelected(opt) {
      var selected = new Array();
      var index = 0;
      for (var intLoop=0; intLoop < opt.length; intLoop++) {
         if (opt[intLoop].selected) {
            index = selected.length;
            selected[index] = new Object;
            selected[index].value = opt[intLoop].value;
            selected[index].index = intLoop;
         }
      }
      return selected;
   }
function addfavi() { 
title = "usiud.org"; 
url = "http://www.usiud.org/"; 
if (window.sidebar) { 
// Mozilla Firefox Bookmark 
window.sidebar.addPanel(title, url,""); 
} else if( window.external ) { 
// IE Favorite 
window.external.AddFavorite( url, title); 
} 
else if(window.opera && window.print) { 
// Opera Hotlist 
return true; } 
}
function setHomepage()
{
 if (document.all)
    {
  document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage('http://www.usiud.org/');
 
    }
    else if (window.sidebar)
    {
    if(window.netscape)
    {
         try
   {  
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }  
         catch(e)  
         {  
    alert("Bu özelliği kullanmak için,adres satırına about:config yazın.Açılan sayfada, signed.applets.codebase_principal_support anahtarını aratıp değerini true yapmanız gerekiyor.");  
         }
    } 
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage','http://www.usiud.org/');
 }
}
function getdosya(prt){
//window.location.href="dosyas/download.php?file="+dsy+"&d="+d;
window.location.href="dosyas/dw.php?"+prt;
}

function getuprf(idf,islm,obj) {
	shweload();
	var url = 'dosyas/p_shwprf.php';
	var pars = 'id=' + idf+ '&islem=' + islm;
	var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars,onComplete: showuprf} );
	window.oj=obj;
	}
function showuprf(originalRequest) {
hideload();
dropmenuobj=document.getElementById("uprf");
dropmenuobj.x=getposOffset(window.oj, "left")+50;
dropmenuobj.y=getposOffset(window.oj, "top")+100;
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(window.oj, "rightedge")+window.oj.offsetWidth+"px";
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(window.oj, "bottomedge")+"px";
dropmenuobj.style.display="block";
dropmenuobj="";
var aindex = originalRequest.responseText;
$("uprf").innerHTML = aindex;
}
function yazprf(sd){
var rnd=Math.random(0,99999);
window.open('dosyas/prfyaz.php?sid='+sd+'&x='+rnd, 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=750px,height=500px,directories=no,location=no');
window.print(); 
}
//anket
function ankoy(aid,islm,obj){
var scln=0;
for (var i=0; i < document.ankfrm.answ.length; i++)
     {
     if (document.ankfrm.answ[i].checked)
        {
        scln= document.ankfrm.answ[i].value;
        }
     }
if(scln==0){islm=0;}
	shweload();
	var url = 'dosyas/p_anksnc.php';
	var pars = 'aid=' + aid+ '&islem=' + islm+ '&scm=' + scln;
	var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars,onComplete: showank} );
	window.ojx=obj;
}
function showank(originalRequest){
hideload();
dropmenuobj=document.getElementById("dank");
//dropmenuobj.x=getposOffset(window.ojx, "left")+50;
//dropmenuobj.y=getposOffset(window.ojx, "top")+100;
//dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(window.ojx, "rightedge")+window.ojx.offsetWidth+"px";
//dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(window.ojx, "bottomedge")+"px";
dropmenuobj.style.display="block";
//dropmenuobj="";
var snclar = originalRequest.responseText;
$("dank").innerHTML = snclar;
}
//html code
function htmkyt(hid,islm,dgr,tpl,kid){
	shweload();
	var url = 'dosyas/p_htmkyt.php';
	if(dgr!=0){dgr=trkc(Base64.encode(dgr));}else{dgr=dgr;}
	var pars = 'hid=' + hid+ '&islem=' + islm+ '&dgr=' + dgr+ '&tpl=' + tpl+ '&kid=' + kid;
	
	var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars,onComplete: showhtm} );
window.kutid=hid+''+kid;
//alert(pars+','+window.kutid);
	}
function showhtm(originalRequest){
hideload();
document.getElementById("htmlk"+window.kutid).style.display="block";
var snclar = originalRequest.responseText;
$("htmlk"+window.kutid).innerHTML = snclar;
}
function hatamsg(msj,obj){

//if(nameb=="Microsoft Internet Explorer"){
//shwdiv("msgdv",-150,50,obj);
update_tip_pos("msgdv");
document.getElementById("msgdv").style.display="block";
document.getElementById("skytctm").innerHTML="<br><b>"+msj+"</b>";
setTimeout("document.getElementById('msgdv').style.display = 'none'",2300);
//}else{
//alert(msj);
//}
}
//hata mesaj poz.
var mouse_X;var mouse_Y;var tip_active=0;var tip_num=0;var ie = document.all?true:false;
function update_tip_pos(dvc){
X=mouse_X;Y=mouse_Y;SX=0;SY=0;
if (ie) {SX = self.screenLeft;SY = self.screenTop;}else{SX=self.screenX;SY=self.screenY;}
if (SX<0) {SX=0}
if (SY<0) {SY=0}
if (self.innerHeight){ix = self.innerWidth;iy = self.innerHeight;}
else if (document.documentElement && document.documentElement.clientHeight)
{ix = document.documentElement.clientWidth;iy = document.documentElement.clientHeight;}
else if (document.body)
{ix = document.body.clientWidth;iy = document.body.clientHeight;}
MX=ix-SX;MY=iy-SY;X=X+18;
if (X+430>MX) {X=MX-430;Y=Y+20}
DH=document.getElementById(dvc).clientHeight;
if (MY-DH+SY<Y-document.documentElement.scrollTop) {Y=Y-DH-40}
document.getElementById(dvc).style.left = X+'px';
document.getElementById(dvc).style.top  = Y+'px';
}
if (!ie) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
function getMouseXY(e) {
if (ie) {
mouse_X = event.clientX + document.documentElement.scrollLeft;
mouse_Y = event.clientY + document.documentElement.scrollTop;
}else{mouse_X = e.pageX;mouse_Y = e.pageY;}
if (mouse_X < 0){mouse_X = 0;}
if (mouse_Y < 0){mouse_Y = 0;}
}
//
function shweload(){
document.getElementById("vload").style.display="block";
//document.getElementById("vload2").style.display="block";
return;
}
function hideload(){
document.getElementById("vload").style.display="none";
//document.getElementById("vload2").style.display="none";
return;
}
function hdmsj(f){
if(f==0 && document.getElementById("pmsj").style.display=="block"){
document.getElementById("pmsj").style.display="none";
setTimeout("hdmsj(1)",100);
}else if(f==1 && document.getElementById("pmsj").style.display=="none"){
document.getElementById("pmsj").style.display="block";
setTimeout("hdmsj(2)",1200);
}else if(f==2 && document.getElementById("pmsj").style.display=="block"){
document.getElementById("pmsj").style.display="none";
}

}
var Base64 = {
 
	// private property
	_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
 
	// public method for encoding
	encode : function (input) {
		var output = "";
		var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
		var i = 0;
 
		input = Base64._utf8_encode(input);
 
		while (i < input.length) {
 
			chr1 = input.charCodeAt(i++);
			chr2 = input.charCodeAt(i++);
			chr3 = input.charCodeAt(i++);
 
			enc1 = chr1 >> 2;
			enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
			enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
			enc4 = chr3 & 63;
 
			if (isNaN(chr2)) {
				enc3 = enc4 = 64;
			} else if (isNaN(chr3)) {
				enc4 = 64;
			}
 
			output = output +
			this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
			this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
 
		}
 
		return output;
	},
 
	// public method for decoding
	decode : function (input) {
		var output = "";
		var chr1, chr2, chr3;
		var enc1, enc2, enc3, enc4;
		var i = 0;
 
		input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
 
		while (i < input.length) {
 
			enc1 = this._keyStr.indexOf(input.charAt(i++));
			enc2 = this._keyStr.indexOf(input.charAt(i++));
			enc3 = this._keyStr.indexOf(input.charAt(i++));
			enc4 = this._keyStr.indexOf(input.charAt(i++));
 
			chr1 = (enc1 << 2) | (enc2 >> 4);
			chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
			chr3 = ((enc3 & 3) << 6) | enc4;
 
			output = output + String.fromCharCode(chr1);
 
			if (enc3 != 64) {
				output = output + String.fromCharCode(chr2);
			}
			if (enc4 != 64) {
				output = output + String.fromCharCode(chr3);
			}
 
		}
 
		output = Base64._utf8_decode(output);
 
		return output;
 
	},
 
	// private method for UTF-8 encoding
	_utf8_encode : function (string) {
		string = string.replace(/\r\n/g,"\n");
		var utftext = "";
 
		for (var n = 0; n < string.length; n++) {
 
			var c = string.charCodeAt(n);
 
			if (c < 128) {
				utftext += String.fromCharCode(c);
			}
			else if((c > 127) && (c < 2048)) {
				utftext += String.fromCharCode((c >> 6) | 192);
				utftext += String.fromCharCode((c & 63) | 128);
			}
			else {
				utftext += String.fromCharCode((c >> 12) | 224);
				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
				utftext += String.fromCharCode((c & 63) | 128);
			}
 
		}
 
		return utftext;
	},
 
	// private method for UTF-8 decoding
	_utf8_decode : function (utftext) {
		var string = "";
		var i = 0;
		var c = c1 = c2 = 0;
 
		while ( i < utftext.length ) {
 
			c = utftext.charCodeAt(i);
 
			if (c < 128) {
				string += String.fromCharCode(c);
				i++;
			}
			else if((c > 191) && (c < 224)) {
				c2 = utftext.charCodeAt(i+1);
				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
				i += 2;
			}
			else {
				c2 = utftext.charCodeAt(i+1);
				c3 = utftext.charCodeAt(i+2);
				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
				i += 3;
			}
 
		}
 
		return string;
	}
 
}
//  End -->