/////////////////////////////////////////////////////////////////////////////
// JavaScriptler
/////////////////////////////////////////////////////////////////////////////

//=============================================================================
// Flash taramak, yazmak, flash yok ise resim koymak için
//=============================================================================
function hangiFlash (hangiSurum) {
	flashDurumu = 0;
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
		if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (surumDizini = navigator.plugins["Shockwave Flash"].description.indexOf (".")) != -1) {
			var surumMetni = navigator.plugins["Shockwave Flash"].description.substring (surumDizini - 1, surumDizini);
			surumDizini = parseInt (surumMetni);
			if (surumDizini >= hangiSurum) {
				flashDurumu = 1;
			}
		}
	} else if (navigator.userAgent && navigator.userAgent.indexOf ("MSIE") >= 0 && (navigator.userAgent.indexOf ("Windows 95") >= 0 || navigator.userAgent.indexOf ("Windows 98") >= 0 || navigator.userAgent.indexOf ("Windows NT") >= 0)) {
		satirYaz = 'flashDurumu = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + hangiSurum + '"))) \n';
		document.write ('<script language=VBScript\> \n');
		document.write ('on error resume next \n');
		document.write (satirYaz);
		document.write ('</script\> \n');
	}
	return flashDurumu;
}

//=============================================================================
function flashYazV4 (flashVersiyon, flIsimVeID, en, boy, zeminRengi, pencereDurumu, rsmIsim, degiskenler, rsmLink) {
	if (hangiFlash (flashVersiyon)) {
		document.write ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + flashVersiyon + ',0,0,0" width="' + en + '" height="' + boy + '" id="' + flIsimVeID + '" align="middle">');
		document.write ('<param name="allowScriptAccess" value="sameDomain">');
		document.write ('<param name="movie" value="medya/flash/' + flIsimVeID + '.swf' + degiskenler + '">');
		document.write ('<param name="menu" value="false">');
		document.write ('<param name="quality" value="best">');
		document.write ('<param name="wmode" value="' + pencereDurumu + '">');
		document.write ('<param name="bgcolor" value="#' + zeminRengi + '">');
		document.write ('<embed src="medya/flash/' + flIsimVeID + '.swf' + degiskenler + '" menu="false" quality="best" wmode="' + pencereDurumu + '" bgcolor="#' + zeminRengi + '" width="' + en + '" height="' + boy + '" name="' + flIsimVeID + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
		document.write ('</object>');
	} else {
		if (rsmLink) {
			document.write ('<a href="' + rsmLink + '"><img src="medya/resim/' + rsmIsim + '" width="' + en + '" height="' + boy + '" border="0"></a>');
		} else {
			document.write ('<img src="medya/resim/' + rsmIsim + '" width="' + en + '" height="' + boy + '" border="0">');
		}
	}
}

//=============================================================================
// Devam
//=============================================================================

function startTicker() {  
	// Define run time values  
	theCurrentStory = -1;  
	theCurrentLength = 0;  
	// Locate base objects  
	if (document.getElementById) {        
		theAnchorObject = document.getElementById("tickerAnchor");
		runTheTicker();
	} else {
		document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}<\/style>");
		return true;  
	} 
}

// Ticker main run loop 
function runTheTicker() {  
var myTimeout;    
// Go for the next story data block  
if(theCurrentLength == 0)  {   
	theCurrentStory++;   
	theCurrentStory      = theCurrentStory % theItemCount;   
	theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');     
	theTargetLink        = theSiteLinks[theCurrentStory];   
	theAnchorObject.href = theTargetLink;   
	thePrefix       = "";  
}  
// Stuff the current ticker text into the anchor  
theAnchorObject.innerHTML = thePrefix +   theStorySummary.substring(0,theCurrentLength) + whatWidget();  
// Modify the length for the substring and define the timer  
if (theCurrentLength != theStorySummary.length)  {   
	theCurrentLength++;   myTimeout = theCharacterTimeout;  
} else {   
	theCurrentLength = 0;   
	myTimeout = theStoryTimeout;  } 
	 // Call up the next cycle of the ticker  
	setTimeout("runTheTicker()", myTimeout);
} 
// Widget generator 
function whatWidget() {  
if(theCurrentLength == theStorySummary.length)  {   
return theWidgetNone;  
}   
if((theCurrentLength % 2) == 1)  {   return theWidgetOne;  }  else  {   return theWidgetTwo;  } } 


//=============================================================================
// Devam
//=============================================================================


var baseopacity=0

function showtext(thetext){
if (!document.getElementById)
return
textcontainerobj=document.getElementById("tabledescription")
browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
document.getElementById("tabledescription").innerHTML=thetext
highlighting=setInterval("gradualfade(textcontainerobj)",50)
}

function hidetext(){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
textcontainerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
else if (document.getElementById && baseopacity==0)
document.getElementById("tabledescription").innerHTML=""
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=20
else if (window.highlighting)
clearInterval(highlighting)
}

//=============================================================================
// Div gizle göster
//=============================================================================
var browserType;
if (document.layers) {
	browserType = "nn4";
}
if (document.all) {
	browserType = "ie";
}
if (window.navigator.userAgent.toLowerCase ().match ("gecko")) {
	browserType = "gecko";
}

function menuGizle () {
	if (browserType == "gecko") {
		document.poppedLayer = eval ('document.getElementById(\'menuust\')');
	} else if (browserType == "ie") {
		document.poppedLayer = eval ('document.all[\'menuust\']');
	} else {
		document.poppedLayer = eval ('document.layers[\'`menuust\']');
	}
	//document.poppedLayer.style.visibility = "hidden";
	document.poppedLayer.style.top = "-500";
}

function menuGoster () {
	if (browserType == "gecko") {
		document.poppedLayer = eval ('document.getElementById(\'menuust\')');
	} else if (browserType == "ie") {
		document.poppedLayer = eval ('document.all[\'menuust\']');
	} else {
		document.poppedLayer = eval ('document.layers[\'`menuust\']');
	}
	//document.poppedLayer.style.visibility = "visible";
	document.poppedLayer.style.top = "0";
}

/*function menuGoster(){
	document.menuust.style.visibility="visible";
	alert("gös");
}

function menuGizle(){
	document.menuust.style.visibility="hidden";
	alert("giz");
}*/

//=============================================================================
// + Popup pencere açmak için
//=============================================================================
function ustePencAc(dosyaAdi, en, boy){
	ekranGens = screen.width;
	ekranYuks = screen.height;
	solMesafe = (ekranGens - en)/2;
	ustMesafe = (ekranYuks - boy)/2;
	yeniPencere = window.open(""+dosyaAdi+"", "hesaplar", "width="+en+", height="+boy+", left="+solMesafe+", top="+ustMesafe+",resizable=no,status=no,scrollbars=no");
}

//=============================================================================
// Devam
//=============================================================================


