// JavaScript Document
function stil( id, bu)
{
	var eleman= document.getElementById('id');
	eleman.bgColor= "#cccccc";
}
function divctrl(id, NNtype, IEtype, WC3type) 
{
    if (document.getElementById) {
        eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
    } else {
        if (document.layers) {
            document.layers[id].visibility = NNtype;
        } else {
            if (document.all) {
                eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
            }
        }
    }
}
function ctlDivView (divid, value)
{
	document.getElementById(divid).style.display= value;
}
function cval (id, val)
{
	document.getElementById(id).value= val;
	document.getElementById('tmpt').value= 'Seçilen dosya: ' +document.getElementById(id).value;
}
function cval2 ()
{
	document.getElementById('tmpt').value= 'Yerel dosya seçildi.';
}
function cval3 (id, val)
{
	document.getElementById(id).value= val;
}
function cval4 (id)
{
	document.getElementById(id).value='';
	document.getElementById('tmpt').value= 'Mevcut seçim iptal edildi.';		
}
function ekle(id, text)
{
	var ta= document.getElementById(id).value;//ta: text area
	if (ta != "")
	{
		document.getElementById(id).value+= text;
	}
}

function divflash(divID, src, w, h)
{
	var d = document.getElementById(divID);
	d.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' +w+ '" height="' +h+ '" title="urunler"><param name="movie" value="' +src+ '"><param name="quality" value="high"><embed src="' +src+ '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' +w+ '" height="' +h+ '"></embed></object>';
}
function redirifJS()
{
	var url= window.document.URL.toString();
	var reurl= url.replace("eb500-1.aspx", "eb500-1wjs.aspx") +"&js=WkVoS01WcFJQVDA9";
	window.location= reurl;
}



//-----------------------------TabControl-----------------------------------------------//

function setTab(hiddenid, tabid)
{
	document.getElementById(hiddenid).value= tabid;
	swTab(tabid);
}
function swTab(tabid, idtabicerik)
{
	var divitabid= 'itab' + tab_ID;	
	document.getElementById('tab' + tab_ID).style.border = '1px solid  #000000' ;
	document.getElementById(divitabid).style.display= 'none';
	divitabid= 'itab' + tabid;
	document.getElementById(divitabid).style.display= 'block';	
	document.getElementById(divitabid).style.backgroundColor = r[parseInt(tabid)];	
	var divtabid= 'tab' + tabid;	
	document.getElementById(divtabid).style.backgroundColor = r[parseInt(tabid)];	
	document.getElementById(divtabid).style.border = '1px solid ' +r[parseInt(tabid)];
	if (tabid != tab_ID)
	{
		divtabid= 'tab' + tab_ID;
		document.getElementById(divtabid).style.backgroundColor = dftabbg;	
		document.getElementById(divtabid).style.border = '1px solid ';
	}
	tab_ID= tabid;
}

function initTab()
{
	var tid=0;
	if(parseInt(tab_ID) < r.length -1)
	{
		tid= parseInt(tab_ID) + 1;
	}
	swTab(String(tid));
	setTimeout("initTab()", 10000);
}

	
	
	
	
	
function udswTab(tabid, idtabicerik)
{
	var divitabid= 'itab' + tab_ID;	
	document.getElementById('tab' + tab_ID).style.border = '1px solid  #000000' ;
	document.getElementById(divitabid).style.display= 'none';
	divitabid= 'itab' + tabid;
	document.getElementById(divitabid).style.display= 'block';	
	var divtabid= 'tab' + tabid;	
	document.getElementById(divtabid).style.borderBottom= '1px solid ' +r[parseInt(tabid)];
	tab_ID= tabid;
}
/*----------------menu kontrol--------------------------------------*/
var acik= null;
function oPn(pn)
{	
	var panel= document.getElementById(pn);
	panel.style.display= 'block';
	if (acik != null && acik!= pn)
	{
		document.getElementById(acik).style.display= 'none';
	}
	 acik= pn;

}
/*------------------------arama kutusu kontrol------------------*/
function setFocus(el, focus)
{
	if(focus)
	{
		eval("document.forms[0]." +el+ ".focus()");
	}
	else
	{
		eval("document.forms[0]." +el+ ".blur()");
	}
}
function bt_ara_Clicked()
{
	var s= document.getElementById('ara').value;
	var kontrol= true;
	if (s == "" || s == "Aranacak sözcükleri giriniz.")
	{
		document.getElementById('ara').value= "Aranacak sözcükleri giriniz.";
		document.getElementById('ara').style.color= "#cccccc";
		setFocus('ara', false);
		kontrol= false;
	}
	else
	{
		window.location="/arama/" +s+ ".aspx";
	}
}

/*----------------------------------------------------------------*/