window.onload=function () { setStyles(); };  
function setStyles() {  
 ids = new Array ('header1','header2','header3');  
 for (i=0;i<ids.length;i++) {  
  document.getElementById(ids[i]).className='tab';  
  document.getElementById(ids[i]).onclick=function() { return CngClass(this); }  
 }  
}  
function CngClass(obj){  
 var currObj; 
 for (i=0;i<ids.length;i++) { 
  currObj = document.getElementById(ids[i]); 
  if (obj.id == currObj.id) {  
  currObj.className=(currObj.className=='tab')?'tabSelected':'tab';  
  } 
  else { currObj.className='tab'; } 
 } 
 return false;  
}
function init(){
	var stretchers = document.getElementsByClassName('box');
	var toggles = document.getElementsByClassName('tab');
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: false, height: true, duration: 200}
	);
	//hash functions
	var found = false;
	toggles.each(function(h3, i){
		var div = Element.find(h3, 'nextSibling');
			if (window.location.href.indexOf(h3.title) > 0) {
				myAccordion.showThisHideOpen(div);
				found = true;
			}
		});
		if (!found) myAccordion.showThisHideOpen(stretchers[0]);
}


function initi(){
	var stretchers = document.getElementsByClassName('boxorta');
	var toggles = document.getElementsByClassName('tab2');
	var myAccordion = new fx.Accordion(
		toggles, stretchers, {opacity: false, height: true, duration: 200}
	);
	var found = false;
	toggles.each(function(h3, i){
		var div = Element.find(h3, 'nextSibling');
			if (window.location.href.indexOf(h3.title) > 0) {
				myAccordion.showThisHideOpen(div);
				found = true;
			}
		});
		if (!found) myAccordion.showThisHideOpen(stretchers[0]);
}
function CheckSearchForm() {
		formErrors = "";	
		
		if (document.frmSearchBox.SearchText.value.length < 1) {
			formErrors = "Lütfen aranacak kelimeyi giriniz.";
			}
		if (formErrors!="") {
			alert(formErrors);
			return false;
		} else {
			return true;
			document.frmSearchBox.submit();
		}
	}
$(document).ready(function(){		
		$('#photos').galleryView({
			panel_width: 660,
			panel_height: 250,
			transition_speed: 1500,
			transition_interval: 5000,
			nav_theme: 'dark',
			border: '1px solid #dad8cc',
			overlay_height: 0,
			pause_on_hover: true			
		});
	});
function changeFontSize(container,whatFont){
document.getElementById(container).style.fontSize=whatFont+"px"; x=document.getElementById("fontsize").getElementsByTagName("a");
for (i=0;i<x.length;i++)
{
if(x[i].getAttribute("rel") == whatFont){
FM.addClass(x[i], "current");
}else{
FM.removeClass(x[i], "current");
 }
}
} 
function yazdir(url)
	{
	mywin = window.open(url,"window","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=700,height=500" );
	}
function CheckValues(objForm)
{	
	Warning=""
	if (objForm.kelime.value.length<3)
	{
		Warning+=("Lütfen Aranacak Kelime Giriniz!\n")
	}	
	if (Warning.length>0){
		alert(Warning);
		return false;
	}else{
		return true
	}
}
