function tabanyap(giris){ document.write('');
document.write(giris);
document.write('');}
function tU(ne){ne.className=(ne.className=='catListing')?'catListingH':'catListing';}
function tabBaslat(i){
		for (j = 1; j < arguments.length; j++) {
		c = document.getElementById(arguments[j]);
		tp[j] = c.parentNode.removeChild(c);
		}
	tabNerede=document.getElementById(i);
	while (tabNerede.firstChild) tabNerede.removeChild(tabNerede.firstChild);
	tabNerede.appendChild(tp[4]);
}
function tabSec(i,t){
//	for(j=1;j<tp.length;j++) tp[j].className = 'deaktifTab';
	linkler=document.getElementsByTagName('a');
	for(j=0;j<linkler.length;j++)
		if(linkler[j].className=='aktifTab')linkler[j].className='deaktifTab';
	while (tabNerede.firstChild) tabNerede.removeChild(tabNerede.lastChild);
	tabNerede.appendChild(tp[i]);//tp[i].className='aktifTab';
	t.className='aktifTab';
	}
function renkleriBelirleKutusu(id2,id1){
	id=document.getElementById(id1);
	arr=Array('ff','CC','99','66','33','00');
	while(id.firstChild)
		id.removeChild(id.lastChild);
	iiii=-1;
	for(iii=0;iii<6;iii++)
	for(i=0;i<6;i++)
		for(ii=0;ii<6;ii++){
			a=document.createElement('a');
			a.title=''+arr[i]+arr[ii]+arr[iii];
			a.href='javascript:renkleriBelirle("'+id1+'","'+id2+'","'+a.title+'");';
			a.appendChild(document.createTextNode('Zey'));
			a.style.backgroundColor='#'+a.title;
			a.style.color='#'+a.title;
			id.appendChild(a);
			iiii++;
			if(((iiii)%18)==17)
				id.appendChild(document.createElement('br'));
		}
}
function renkleriBelirle(id1,id2,renk){
	id=document.getElementById(id1);
	while(id.firstChild)
		id.removeChild(id.lastChild);
	id=document.getElementById(id2);
	id.value=renk;
	asilFotoCerceve(id2);
}
function asilFotoCerceve(ne){
	asilFoto=document.getElementById('asilfoto').style;
	deger=document.getElementById(ne).value;
	switch(ne){
		case 'cerceveboyu':
			asilFoto.borderWidth= deger+'px '+deger+'px '+deger+'px '+deger+'px';
			break;
		case 'cerceve':
			asilFoto.borderColor='#'+deger;
			break;
		case 'paspartuboyu':
			//alert(ne+' '+deger );
			//alert(asilFoto.padding);
			asilFoto.padding=deger+'px';
			break;
		case 'paspartu':
			asilFoto.backgroundColor='#'+deger;
			break;
	}
}
function ilefBekle(){
if(document.getElementById('uyariKutusu'))return(false);
	d=document.createElement('div');
	d.id='uyariKutusu';
	h3=document.createElement('h3');
	center=document.createElement('center');
	h3.appendChild(document.createTextNode('Güncelleniyor'));
	center.appendChild(h3);
	d.appendChild(center);
	document.body.appendChild(d);
	d.style.zindex='100';
}
function siralamaPenceresi(){
	nereye=document.getElementById('siralamaListesi');
	for(i=0;i<siralamaListesi.length;i++){
	siralama=siralamaListesi[i];
	tr=document.createElement('tr');
	nereye.appendChild(tr);
	ydO=document.createElement('td'); tr.appendChild(ydO);
	yd=document.createElement('td'); tr.appendChild(yd);
	ydS=document.createElement('td'); tr.appendChild(ydS);

	img=document.createElement('img');
	img.src=resRoot+siralama[2]+'.jpg';
	img.title=siralama[4];
	yazi=document.createElement('a');
	yazi.href='foto.php?f='+siralama[2]+'&style='+siralamaTur;
	yazi.appendChild(img);
	yazi.appendChild(document.createElement('br'));
	yazi.appendChild(document.createTextNode(siralama[3]));
	ydS.appendChild(document.createTextNode('Sonraki'));
	ydS.appendChild(document.createElement('br'));
	ydS.appendChild(yazi);

	img=document.createElement('img');
	img.src=resRoot+siralama[5]+'.jpg';
	img.title=siralama[7];
	yazi=document.createElement('a');
	yazi.href='foto.php?f='+siralama[5]+'&style='+i;
	yazi.appendChild(img);
	yazi.appendChild(document.createElement('br'));
	yazi.appendChild(document.createTextNode(siralama[6]));
	ydO.appendChild(document.createTextNode('Önceki'));
	ydO.appendChild(document.createElement('br'));
	ydO.appendChild(yazi);

	yd.appendChild(document.createTextNode(siralamaAciklama[i]));
	yd.appendChild(document.createElement('br'));
	yd.appendChild(document.createTextNode('Bu listede '+siralama[0]+' tane fotograf vardır.'));
	yd.appendChild(document.createElement('br'));
	yd.appendChild(document.createTextNode('gozuken fotografın sırası '+siralama[1]+'.'));
	yd.appendChild(document.createElement('br'));
	categoriLink=document.createElement('a');
	categoriLink.appendChild(document.createTextNode(kategori));
	categoriLink.href='browse.php?kad='+kategori;
	yd.appendChild(document.createTextNode('Bulunduğu Kategori: '));
	yd.appendChild(categoriLink);
}
}
var siralamaAciklama= new Array('Kategoriye Eklenme', 'Kategoride Puan', 'Fotografçının Eklemesi', 'Fotografçıda  Puan', 'Site Geneli Eklenme', 'Site Geneli Puan');
function animClipDown(ref, counter){var cP=Math.pow(Math.sin(Math.PI*counter/200),0.75);ref.style.clip = (counter==100 ?((window.opera || navigator.userAgent.indexOf('KHTML') > -1) ? '':   'rect(auto, auto, auto, auto)') : 'rect(0, ' + ref.offsetWidth + 'px, '+(ref.offsetHeight*cP)+'px, 0)');};
function fotoBoyut(w,h){foto=document.getElementById('asilfoto');foto.width=w;foto.height=h;}
function animFade(ref, counter){var f = ref.filters, done = (counter==100);if (f){if (!done && ref.style.filter.indexOf("alpha") == -1)ref.style.filter += ' alpha(opacity=' + counter + ')';else if (f.length && f.alpha) with (f.alpha){if (done) enabled = false;else { opacity = counter; enabled=true }}}else ref.style.opacity = ref.style.MozOpacity = counter/100.1;}
function inputSil(nerden){ if(nerden.value==nerden.defaultValue)nerden.value=''; }
function inputYaz(nerden){ if(nerden.value=='')nerden.value=nerden.defaultValue; }
function ppu(n,t){
	switch(n){
		case 's':
			n="hizli/yorumcvp.php?ne=s&yorum="+t;//yorum
			break;
		case 'y':
			n="hizli/yorumcvp.php?ne=y&yorum="+t;//yorum
			break;
		case 'oyla':
			n="hizli/oyver.php?yorum="+t;
			break;
		case 'a': //arkadas
			n="hizli/arkadas.php?ne=arkadas&kim="+t;
			break;
		case 'd': //defet
			n="hizli/arkadas.php?ne=defet&kim="+t;
			break;
		default:
			n=n+t;
			break;
	}
	ppU(n,'',320,300);
}
function ppU(u,t,w,h){window.open(u,'_blank','width='+w+',height='+h);}
