var user_agent = navigator.userAgent;
var isOpera = user_agent.indexOf("Opera") >= 0;
var isFirefox = user_agent.indexOf("Firefox") >= 0;
var isWin32up = user_agent.indexOf("Win32") >= 0 
	|| user_agent.indexOf("Win64") >= 0
	|| user_agent.indexOf("Windows NT") >= 0;

// disallow Opera faking IE
var isIE = !isOpera && user_agent.indexOf("MSIE") >= 0;
var isIE55up = isIE && isWin32up && user_agent.match(/MSIE ((5\.5)|[6789])/);
var isIE70up = isIE && isWin32up && user_agent.match(/MSIE ([789])/);
var isIE55dn = isIE && !isIE55up;
var browser = "other";

if (isFirefox)
	browser = "firefox";
else if (isOpera) 
	browser = "opera";
else if (isIE55up) 
	browser = "ie55p";
else if (isIE55dn) 
	browser = "ie55d";

function setHomePage2(ths, url) {
	ths.style.behavior='url(#default#homepage)';
	ths.setHomePage(url);
}

/*****************************************************/
/******** Home Page & Add To Favorites ***************/
/*****************************************************/

function setHomePage2(ths, url) {
	ths.style.behavior='url(#default#homepage)';
	ths.setHomePage(url);
}

function add2Favorites(ths, url, title) {
	if (isIE && window.external != null) {
		window.external.AddFavorite(url,title);
	} else if (isFirefox && window.sidebar && window.sidebar.addPanel) {
		window.sidebar.addPanel(title, url, '');
	} else if (isOpera) {
		ths.rel = "sidebar";
		ths.title = title
		ths.href = url;
	}
}

// IE icin "anasayfam yap"
function linkHomePage(url, cssClass) {
	cssClass = (cssClass == null || cssClass == "") ? "" : " class=\"" + cssClass + "\"";
	
	if (isIE) {
		return ("<a" +
			cssClass +
			" href=\"javascript:;\"" +
			" onclick=\"setHomePage2(this, '" + url + "');\"" +
			"><img src='images/anasayfayap.jpg'  border='0'/></a>");
	}
	
	return "";
}

// IE icin "Sik Kullanlanlara ekle"
function linkFavorites(url, title, cssClass) {
	cssClass = (cssClass == null || cssClass == "") ? "" : " class=\"" + cssClass + "\"";

	if (isIE || isFirefox || isOpera) {
		return ("<a" +
			cssClass +
			" href=\"javascript:;\"" +
			" onclick=\"add2Favorites(this, '" + url + "', '" + title + "');\"" +
			"><img src='../images/kullanilanlar.jpg' border='0'></a>");
	}
	
	return "";
}

function AddFavorites() {
	// render only on known browsers
	if (!(isIE || isFirefox || isOpera))
		return;

	var url = "http://www.talat.com.tr/";
	var title = "talat.com.tr";
	var link_class = "";

	var lnkFav = linkFavorites(url, title, link_class);
	var lnkHome = linkHomePage(url, link_class);
	
	if (lnkFav == "" && lnkHome == "")
		return;

	
	if (lnkFav != "") {
		document.write("<div style='padding-top: 0px; padding-bottom: 0px;'>" + lnkFav + "</div>");
	}
	if (lnkHome != "") {
		document.write("<div style='padding-top: 0px; padding-bottom: 0px;'>" + lnkHome + "</div>");
	}

}



function BoxVisibility(id){
	var Click=0
		if (document.getElementById(id).style.display=="none"){
			 // Show(id)
					ShowEffect(id)
				//document.getElementById(id).style.display='block';
					//document.getElementById(id).style.visibility='visible';
				
			}
		else {
			//Hide(id)
				FadeEffect(id)
				//document.getElementById(id).style.display='none';
					//document.getElementById(id).style.visibility='hidden';
					
			}			
		}



   function FadeEffect(element){
       new Effect.Fade(element, { duration:1});

   }
   function ShowEffect(element){
       new Effect.Appear(element, 
       {duration:1, from:1.0, to:1.0});
   }



function MoveLeft()
{
    new Effect.MoveBy('BigBox', 0, 472 , 
                              {
                                  duration: 0.4,  
                                  transition: Effect.Transitions.sinoidal
                              });
}

function MoveRight()
{
    new Effect.MoveBy('BigBox', 0, -472 , 
                              {
                                  duration: 0.4,  
                                  transition: Effect.Transitions.sinoidal
                              });
}
