// VARIABLES
aDurumDefault = new Array()
aDurumDefault["menu"] = "none"
aDurumDefault["edit"] = "block"

aDurum = new Array()
aDurum["none"] = "block"
aDurum["block"] = "none"

aBranchID = new Array()
aBranchID["none"] = "branch_open"
aBranchID["block"] = "branch_close"

aImgName = new Array()
aImgName["block"] = "branch_open"
aImgName["none"] = "branch_close"

oAktifAltmenu = ""

var sKeysPressed = ""
function fKeyPress(){
	sKeysPressed += event.keyCode
}

function fAL(){
		window.open('_admin_login.php','adminlogin','width=100, height=195');
}


////////////////////

// FUNCTIONS
function fGetID(ID){
    return document.getElementById(ID)
}

function SH(div,durum){
    fGetID(div).style.display = durum
}


function Jump(sayfa,deger,obj){
    sValue = obj.options[obj.selectedIndex].value
    if(sValue)
        if((sValue.substring(0,1)+1)>0)
            self.location=sayfa+"?"+deger+"="+sValue
        else
            self.location = sValue
}

function FindObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ShowHide(oDiv,id){
    oDiv = id ? FindObj(oDiv) : oDiv
    durum = oDiv.style.display
	oDiv.style.display = (durum == "none" || !durum) ? "block" : "none"
	return false;
}

function fFocus(obj){    
    obj.style.backgroundColor = "#FFFFC0"
}

function fBlur(obj){
    obj.style.backgroundColor = "#FFFFFF"
}

function fSil(tablo,id,obj,kriter){
	if(confirm('Kaydı silmek istediğinden eminmisin..!?')){
    	edit_frame.location.href='edit/single_sil.php?sUpdTable='+tablo+'&sUpdKriterColumn='+kriter+'&sUpdKriterValue='+id
        obj.removeNode(true)
    }
    else
        return false;
}

function fSilCift(tablo,id,obj,kriter){
	if(confirm('Kaydı silmek istediğinden eminmisin..!?')){
        if(confirm('SON KARARIN..!?')){
    	    edit_frame.location.href='edit/single_sil.php?sUpdTable='+tablo+'&sUpdKriterColumn='+kriter+'&sUpdKriterValue='+id
            obj.removeNode(true)
        }
    }
    else
        return false;
}

function fSilResim(sDir,sFileName,obj,onPath){
	var onPath = onPath
    if(confirm('Resmi silmek istediğinizden emin misiniz?')){
        edit_frame.location.href=onPath+'edit/resim_sil.php?sDir='+sDir+'&sFileName='+sFileName
        obj.removeNode(true)
    }
    else
        return false;
}

function FlashGoster(file,w,h){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+w+'" height="'+h+'">')
    document.write('<param name=movie value="'+file+'">')
    document.write('<param name=quality value=high>')
    document.write('<param name="wmode" value="transparent">')    
    document.write('<embed src="'+file+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode="transparent">')
    document.write('</embed>')
    document.write('</object>')
}