function openPopUp_520x390(href, target)
{
	window.open(href, target, 'width=520, height=390, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	return false;
}

function openPopUp_600x450(href, target)
{
	window.open(href, target, 'width=600, height=450, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	return false;
}

function openPopUp_670x500(href, target)
{
	window.open(href, target, 'width=670, height=500, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	return false;
}

function blinkIt()
{
	if(!document.all)
		return;
	else
	{
		for(i=0; i<document.all.tags('blink').length; i++)
		{
			s=document.all.tags('blink')[i];
			s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
		}
	}
}

function SymError()
{
	return true;
}

function Set_Cookie( name, value, expires, path, domain, secure ) 
{
	var today = new Date();
	today.setTime( today.getTime() );

	if ( expires )
	{
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );

	document.cookie = name + "=" + escape( value ) +
		( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
		( ( path ) ? ";path=" + path : "" ) + 
		( ( domain ) ? ";domain=" + domain : "" ) +
		( ( secure ) ? ";secure" : "" );
}
function Get_Cookie( name )
{
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;
	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) )
	{
		return null;
	}
	if ( start == -1 )
		return null;
	var end = document.cookie.indexOf( ";", len );
	if ( end == -1 )
		end = document.cookie.length;
	return unescape( document.cookie.substring( len, end ) );
}
function Delete_Cookie( name, path, domain )
{
	if ( Get_Cookie( name ) )
		document.cookie = name + "=" +
			( ( path ) ? ";path=" + path : "") +
			( ( domain ) ? ";domain=" + domain : "" ) +";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function changeSize_(elm, _size, class_name)
{
	document.getElementById(elm).className = class_name + ' ' + class_name + '_' + _size;
	Set_Cookie('text_size', _size, 30, '', '', '');
	//window.location.reload(false);
}

var contentFontSize;// = Get_Cookie('text_size');
if (!contentFontSize)
	contentFontSize = 12;
function changeSize(elm, type)
{
	if (type == 1)
	{
		if (contentFontSize < 18)
			contentFontSize += 2;
	}
	else if (type == -1)
	{
		if (contentFontSize > 12)
			contentFontSize -= 2;
	}
	
	document.getElementById(elm).className = 'content_' + contentFontSize;
	//Set_Cookie('text_size', contentFontSize, 30, '', '', '');
}

function mostlyPage(type, page)
{
    mostly_type = type;
	var xmlHttpReq = false;
    var self = this;
    var strURL = 'x_mostly.php?type=' + type + '&page=' + page;
    
    if (window.XMLHttpRequest)
    {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-javascript; charset=iso-8859-9');
    self.xmlHttpReq.onreadystatechange = function()
    {
        if (self.xmlHttpReq.readyState == 4)
        {
        	mostlyLoad(type, self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send('');
    return false;
}
function mostlyLoad(type, str)
{
	eval(str);
	
	document.getElementById("mostly_items_data_" + type).innerHTML = mostly_items;
	changeMostly(type, 0);
}
function changeMostly(type, idx, link)
{
	eval('elm = mostly_data_' + type);
	
	if(typeof(window['elm']) == "undefined")
		return;

	document.getElementById("mostly_image_" + type).src = './images/news/' + THUMB + '/' + elm[idx]['image'] + '.jpg';
	document.getElementById("mostly_title_" + type).innerHTML = '<a href="' + link + '">' + elm[idx]['title'] + '</a>';
	document.getElementById("mostly_short_content_" + type).innerHTML = '<a href="' + link + '">' + elm[idx]['short_content'] + '</a>';
}
function goGazette(path, idx)
{
	if(idx == "")
		return false;
	
	window.open(path + "gazete-" + idx + ".htm", "", "");
	return true;
}

function getSWF(swWidth, swHeight, swFile, swWmode, swVar, swName)
{
	nameO = '';
	nameE = '';
	if(swName)
	{
		nameO = ' id="' + swName + '"';
		nameE = ' name="' + swName + '"';
	}
	ext = '';
	str = '<object' + nameO + ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width='+swWidth+'  height='+swHeight+'>';
	str += '<param name="movie" value="'+swFile+'" /> ';
	if(swVar)
	{
		str += '<param name="flashvars" value="'+swVar+'" /> ';
		ext += ' flashvars="'+swVar+'"';
	}
	str += '<param name="quality" value="high" /> ';
	str += '<param name="salign" value="TL" /> ';
	str += '<param name="wmode" value="'+swWmode+'" /> ';
	str += '<param name="scale" value="exactfit" /> ';
	str += '<param name="allowscriptaccess" value="always" /> ';
	
	str += '<embed' + nameE + ' allowscriptaccess="always" salign="TL" src='+swFile+' width='+swWidth+' height='+swHeight + ext + ' wmode='+swWmode+' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit"></embed> ';
	str += '</object> ';
	document.write(str);
}

function getFlashMovie(flash) {
	return (isIE) ? window[flash] : document[flash];
}
function weatherChange(name, image_code, detail_str)
{
	var _detail;
	_detail = detail_str.split("|");
	document.getElementById("weather_city").innerHTML = '<a href="hava-durumu.html">' +  name  + '</a>';
	document.getElementById("weather_degree").innerHTML = _detail[0] + ' &deg;C <br> ' + _detail[1];
	document.getElementById("items_1").innerHTML = '<div style="float:left; width: 90px;"><b>Hissedilen</b></div>' + _detail[2] + ' &deg;C';
	document.getElementById("items_2").innerHTML = '<div style="float:left; width: 90px;"><b>Nem Oranı</b></div>' + _detail[3] + ' %';
	document.getElementById("items_3").innerHTML = '<div style="float:left; width: 90px;"><b>Basınç</b></div>' + _detail[4] + 'kpa';
	document.getElementById("items_4").innerHTML = '<div style="float:left; width: 90px;"><b>Rüzgar Hızı</b></div>' + _detail[5] + 'km/s';
	document.getElementById("items_5").innerHTML = '<div style="float:left; width: 90px;"><b>Rüzgar Yönü</b></div>' + _detail[6];	
	getFlashMovie("weatherIcon").sendAUtoFlash(image_code);
}
function resizeIFrame(idx)
{
	var _height = document.getElementById(idx).contentWindow.document.body.scrollHeight;

	document.getElementById(idx).height = _height;
}

function changeTarget(elm)
{
	tmp = elm.getElementsByTagName("a");
	for(i=0; i<tmp.length; i++)
	{
		if(tmp[i].href.indexOf(baseURL) == -1 || tmp[i].href.indexOf('http://') == -1)
			tmp[i].target = "_blank";
	}
}
function validateLength(el, word_left_field, len)
{
	if(len == 0)
		return true;

	var elm = document.getElementById(word_left_field);
	elm.value = len - el.value.length;

	if(elm.value < 1)
	{
		alert("Max. " + len + " karakter girebilirsiniz.");
		el.value = el.value.substr(0, len);
		elm.value = 0;

		return false;
	}

	return true;
}
function commentAdd(type, id, content)
{
	var http = new XMLHttpRequest();
	var url = "x_comment_add.php";
	var params = 'type=' + type + '&id=' + id + '&content=' + content;

	document.getElementById('comment_loading').style.display = 'block';
	
	http.open("POST", url, true);

	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8");
	http.setRequestHeader("Content-length", params.length);
	http.setRequestHeader("Connection", "close");
	
	http.onreadystatechange = function() 
	{
		if(http.readyState == 4 && http.status == 200)
		{
			document.getElementById('comment_content').value = '';
			document.getElementById('comment_loading').style.display = 'none';
			alert(http.responseText);
		}
	}
	http.send(params);
	return false;
}
function getLiveScore(type)
{
	var xmlHttpReq = false;
    var self = this;
	var strURL  = 'x_livescore.php?type=' + type;

	if (window.XMLHttpRequest)
    {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-javascript; charset=UTF-8');
    self.xmlHttpReq.onreadystatechange = function()
    {
        if (self.xmlHttpReq.readyState == 4)
        {
        	setLiveScore(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send('');
    return false;
}
function setLiveScore(str)
{
	eval(str);

	document.getElementById("div_livescore").innerHTML = tmp;
}
function getFixture(league_id, week, lnk_id)
{
	var xmlHttpReq = false;
    var self = this;
    
    if (week > 34)
    	week = 1;
    else if (week < 1)
    	week = 34;
    	
	var strURL  = 'x_fixture.php?league_id=' + league_id + '&week=' + week + '&lnk_id=' + lnk_id;

	if (window.XMLHttpRequest)
    {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
    self.xmlHttpReq.onreadystatechange = function()
    {
        if (self.xmlHttpReq.readyState == 4)
        {
        	document.getElementById('div_fixture').innerHTML = self.xmlHttpReq.responseText;
        }
    }
    self.xmlHttpReq.send('');
    return false;
}
function getEcoNewsContent(id)
{
	var xmlHttpReq = false;
    var self = this;
    var strURL = 'x_eco_news.php?id=' + id;
    
    if (window.XMLHttpRequest)
    {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }

    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
    self.xmlHttpReq.onreadystatechange = function()
    {
        if (self.xmlHttpReq.readyState == 4)
        {
        	elm = document.getElementById('eco_news_' + id);
        	if (prevEcoNewsID == id)
        	{
        		if (elm.style.display == 'block')
        		{
        			elm.style.display = 'none';
        		}
        		else
        			elm.style.display = 'block';
        	}
        	else
        	{
        		document.getElementById('eco_news_' + prevEcoNewsID).style.display = 'none';
	        	elm.style.display = 'block';
        	}
        	document.getElementById('eco_news_' + id).innerHTML = self.xmlHttpReq.responseText;
        	prevEcoNewsID = id;
        }
    }
    self.xmlHttpReq.send('');
    return false;
}
function getEcoVob(type)
{
	var xmlHttpReq = false;
    var self = this;
    var strURL = 'x_eco_vob.php?type=' + type;
    
    if (window.XMLHttpRequest)
    {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }

    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
    self.xmlHttpReq.onreadystatechange = function()
    {
        if (self.xmlHttpReq.readyState == 4)
        {
        	document.getElementById('div_vob').innerHTML = self.xmlHttpReq.responseText;
        }
    }
    self.xmlHttpReq.send('');
    return false;
}
function findPosX(obj)
{
	var curleft = 0;
	if(obj.offsetParent)
	{
		while(1) 
		{
			curleft += obj.offsetLeft;
			if(!obj.offsetParent)
				break;
			obj = obj.offsetParent;
		}
	}
	else if(obj.x)
		curleft += obj.x;
		
	return curleft;
}
function findPosY(obj)
{
	var curtop = 0;
	if(obj.offsetParent)
	{
		while(1)
		{
			curtop += obj.offsetTop;
			if(!obj.offsetParent)
				break;
			obj = obj.offsetParent;
		}
	}
	else if(obj.y)
		curtop += obj.y;

	return curtop;
}
/* TOP MENU */
function showMenuEffect(no, cat)
{
	if (no > 0)
	{
		document.getElementById('menu_item_' + no).className = 'menu_item_eff menu_item_eff_' + cat;			
		document.getElementById('menu_sep_' + no).className = 'menu_sep_eff menu_sep_eff_' + cat;
		document.getElementById('menu_sep_' + (no * 1 + 1)).className = 'menu_sep_eff menu_sep_eff_' + cat;
	}
	if (no != curNo && curNo > 0 && curCat > 0)
	{
		document.getElementById('menu_sep_' + curNo).className = 'menu_sep_eff menu_sep_eff_' + curCat;
		document.getElementById('menu_sep_' + (curNo * 1 + 1)).className = 'menu_sep_eff menu_sep_eff_' + curCat;
	}
	if (curCat == -1)
		showFirstItemEff();
}
function hideMenuEffect(no)
{
	document.getElementById('menu_item_' + no).className = 'menu_item';
	document.getElementById('menu_sep_' + no).className = 'menu_sep';
	document.getElementById('menu_sep_' + (no * 1 + 1)).className = 'menu_sep';
	if (no != curNo && curNo > 0 && curCat > 0)
	{
		document.getElementById('menu_sep_' + curNo).className = 'menu_sep_eff menu_sep_eff_' + curCat;
		document.getElementById('menu_sep_' + (curNo * 1 + 1)).className = 'menu_sep_eff menu_sep_eff_' + curCat;
	}
}
function showSubMenu(no, cat)
{
	showMenuEffect(no, cat);
	elm = document.getElementById('menu_item_' + no);
	y = findPosY(elm);
	x = findPosX(elm);
	base_left = findPosX(document.getElementById('base_top'));
	//base_top  = findPosY(document.getElementById('base_top'));
	sub_elm = document.getElementById('sub_menu_' + no);
	sub_elm.style.top = (y + elm.offsetHeight) * 1 + 'px';
	sub_elm.style.left = (x - base_left - 1) * 1 + 'px';
}
function hideSubMenu(no)
{
	sub_elm = document.getElementById('sub_menu_' + no);
	sub_elm.style.top = '-1000px';
	sub_elm.style.left = '-1000px';
	hideMenuEffect(no);
	showMenuEffect(curNo, curCat);
}
function showOtherMenu()
{
	document.getElementById('menu_other').style.display = 'block';
	document.getElementById('menu_other_caption').className = 'menu_other_caption menu_other_caption_eff';
	document.getElementById('menu_sep_' + (cntMenuItem + 1)).className = 'menu_sep menu_sep_eff';
}
function hideOtherMenu()
{
	document.getElementById('menu_other').style.display = 'none';
	document.getElementById('menu_other_caption').className = 'menu_other_caption';
	document.getElementById('menu_sep_' + (cntMenuItem + 1)).className = 'menu_sep';
}
function showExtraMenu()
{
	document.getElementById('menu_extra').style.display = 'block';
	document.getElementById('menu_extra_caption').className = 'menu_extra_caption menu_extra_caption_eff';
}
function hideExtraMenu()
{
	document.getElementById('menu_extra').style.display = 'none';
	document.getElementById('menu_extra_caption').className = 'menu_extra_caption';
}
function locateExtraMenu()
{
	elm = document.getElementById('menu_other_caption');
	x = findPosX(elm);
	w = elm.offsetWidth;
	base_left = findPosX(document.getElementById('base_top'));
	document.getElementById('menu_extra_container').style.left = (x - base_left + w + 8) + 'px';
}
function showFirstItemEff()
{
	document.getElementById('menu_item_first').className = 'menu_item_first_eff';
	document.getElementById('menu_sep_1').className = 'menu_sep menu_sep_eff';
}
function hideFirstItemEff()
{
	if (curCat != -1)
	{
		document.getElementById('menu_item_first').className = 'menu_item_first';
		document.getElementById('menu_sep_1').className = 'menu_sep';
	}
}
/* TOP MENU END */
/* GALLERY MENU */
function showGalleryMenuEffect(no, cat)
{
	document.getElementById('menu_item_' + no).className = 'menu_item_eff';
	document.getElementById('menu_sep_' + no).className = 'menu_sep_eff';
	document.getElementById('menu_sep_' + (no * 1 + 1)).className = 'menu_sep_eff';
	if (no != curNo && curNo > 0 && curCat > 0)
	{
		document.getElementById('menu_sep_' + curNo).className = 'menu_sep_eff';
		document.getElementById('menu_sep_' + (curNo * 1 + 1)).className = 'menu_sep_eff';
	}
}
function hideGalleryMenuEffect(no)
{
	document.getElementById('menu_item_' + no).className = 'menu_item';
	document.getElementById('menu_sep_' + no).className = 'menu_sep';
	document.getElementById('menu_sep_' + (no * 1 + 1)).className = 'menu_sep';
	if (no != curNo && curNo > 0 && curCat > 0)
	{
		document.getElementById('menu_sep_' + curNo).className = 'menu_sep_eff';
		document.getElementById('menu_sep_' + (curNo * 1 + 1)).className = 'menu_sep_eff';
	}
}
/* GALLERY MENU END *>
/* SHOW MEMBER LINKS */
function showMemberLink()
{
	var xmlHttpReq = false;
    var self = this;
	var strURL  = 'x_member_link.php';

	if (window.XMLHttpRequest)
    {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
    self.xmlHttpReq.onreadystatechange = function()
    {
        if (self.xmlHttpReq.readyState == 4)
        {
        	document.getElementById('member_links').innerHTML = self.xmlHttpReq.responseText;
        }
    }
    self.xmlHttpReq.send('');
    return false;
}
/* MEMBER LINKS END */
/* WEATHER */
function showWeatherCities()
{
	document.getElementById('weather_cities').style.display = 'block';
}
function hideWeatherCities()
{
	document.getElementById('weather_cities').style.display = 'none';
}
function setCityWeather(city, redirect)
{
	document.getElementById('weather_value').innerHTML = arrWeatherVal[city] + ' &deg;C';
	document.getElementById('weather_city').innerHTML = arrWeatherCty[city];
	document.getElementById('weather_image').src = baseURL + 'images/weather/' + arrWeatherImg[city] + '.png';
	document.getElementById('weather_image').title = arrWeatherSta[city];
	
	Set_Cookie('city_code', city, 30, '/', '', '');
	
	if (redirect)
		window.location = 'hava-durumu-' + city + '.html'
}
function citySelected()
{
	elm = document.getElementById('select_cities');
	if (elm.value)
		setCityWeather(elm.value, 1);
	else
	{
		alert("Bir Şehir Seçiniz!");
	}
}
/* WEATHER END */
/* ECONOMY CALCULATOR */
function clearCalcForm()
{
	document.getElementById('calc_inst_cnt').value = '';
	document.getElementById('calc_interest').value = '0';
	document.getElementById('calc_total').value = '0';
	document.getElementById('calc_inst_amo_out').innerHTML = '0';
	document.getElementById('calc_total_payback').innerHTML = '0';
	document.getElementById('calc_inst_amo_in').value = '0';
	document.getElementById('calc_total_cre_out').innerHTML = '0';
	document.getElementById('calc_total_payback_2').innerHTML = '0';
}
function validateCalc()
{
	if (document.getElementById('calc_inst_cnt').value == '')
	{
		alert('Lütfen Kredi Vadesi Seçin!');
		document.getElementById('calc_inst_cnt').focus();
		return false;
	}
	if (document.getElementById('calc_interest').value <= 0)
	{
		alert('Lütfen Geçerli Bir Faiz Oranı Girin!');
		document.getElementById('calc_interest').focus();
		return false;
	}
	if (document.getElementById('calc_total').value <= 0 && document.getElementById('calc_inst_amo_in').value <= 0)
	{
		alert('Lütfen Toplam Tutar veya Aylık Ödeme Tutarı Girin!');
		document.getElementById('calc_total').focus();
		return false;
	}
	return true;
}
function calcCredit()
{
	if (!validateCalc())
		return false;
		
	instCnt = document.getElementById('calc_inst_cnt').value;
	interest = document.getElementById('calc_interest').value;
	interest = interest.replace(',', '.') * 1 / 100;
	
	if (document.getElementById('calc_total').value > 0)
	{
		total = document.getElementById('calc_total').value;
	
		instAmo = total * interest * Math.pow((1 + interest), instCnt) / (Math.pow((1 + interest), instCnt) - 1);
	
		document.getElementById('calc_inst_amo_out').innerHTML = roundNumber(instAmo, 2);
		document.getElementById('calc_total_payback').innerHTML = roundNumber(instAmo * instCnt, 2);
	}
	
	if (document.getElementById('calc_inst_amo_in').value > 0)
	{
		instAmo = document.getElementById('calc_inst_amo_in').value;

		total = instAmo / (interest * Math.pow((1 + interest), instCnt) / (Math.pow((1 + interest), instCnt) - 1));
	
		document.getElementById('calc_total_cre_out').innerHTML = roundNumber(total, 2);
		document.getElementById('calc_total_payback_2').innerHTML = roundNumber(instAmo * instCnt, 2);
	}
	
	return true;
}
function roundNumber(value, decimal)
{
	if (value)
		return addCommas(value.toFixed(decimal));
	
	return 0;
}
function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? ',' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1))
	{
		x1 = x1.replace(rgx, '$1' + '.' + '$2');
	}
	
	return x1 + x2;
}
/* END ECONOMY CALCULATOR */
function showHDAdjacent(ind, stop_timer)
{
	if (stop_timer)
		clearInterval(timerHDAdj);
		
	if (ind == 0)
	{
		actHDAdjSec = (actHDAdjSec * 1) + 1;
		if (actHDAdjSec == 4)
		{
			actHDAdjSec = 1;
			prevHDAdjSec = 3;
		}
		ind = actHDAdjSec;
	}
	else
		actHDAdjSec = ind;
		
	document.getElementById('hd_adj_content_' + prevHDAdjSec).style.display = 'none';
	document.getElementById('hd_adj_caption_' + prevHDAdjSec).className = 'hd_adj_caption';
	document.getElementById('hd_adj_content_' + ind).style.display = 'block';
	document.getElementById('hd_adj_caption_' + ind).className = 'hd_adj_caption_eff';
	prevHDAdjSec = ind;
}
function changeLeague(id)
{
	document.getElementById('league_name').innerHTML = '<img src="images/flag_' + couFlag[id] + '.png" align="absmiddle"> ' + leaName[id];
	document.getElementById('league_link').href = 'puan-durumu-' + id + '.html';
}
function showPhotoMagazine(inc)
{
	phMagInd = phMagInd + inc * 1
	
	if (phMagInd > 4)
		phMagInd = 0;
	if (phMagInd < 0)
		phMagInd = 4;
	str = '<a href="' + phMagLnk[phMagInd] + '" title="' + phMagTit[phMagInd] + '"><img src="images/news/' + phMagImg[phMagInd] + '.jpg" alt="' + phMagTit[phMagInd] + '"></a>';
	document.getElementById('photo_magazine').innerHTML = str;

	return false;
}
function setGraphicCode(code)
{
	document.getElementById('gr_link_' + prevGrCode).style.color = '#521f32';
	document.getElementById('gr_link_' + prevGrCode).style.background = 'transparent';
	document.getElementById('gr_link_' + code).style.color = '#ffffff';
	document.getElementById('gr_link_' + code).style.background = '#521f32';
	prevGrCode = code;
	setGraphic('day');
}
function setGraphic(type)
{
	document.getElementById('ifr_graphic').src= 'eco_graphic.php?loc=fin&code=' + prevGrCode + '&type=' + type;
	document.getElementById('gr_link_' + prevGrLink).style.background = 'transparent';
	document.getElementById('gr_link_' + type).style.background = '#e2e2e2';
	
	prevGrLink = type;
	return false;
}
/* INDEX CAT NEWS */
function showIndexCat(ind)
{
	if (ind == 0)
	{
		actCatNo = (actCatNo * 1) + 1;
		if (actCatNo == indexCatCount + 1)
		{
			actCatNo = 1;
			prevCatNo = indexCatCount;
		}
		ind = actCatNo;
	}
	else
		actCatNo = ind;
		
	document.getElementById('cat_content_' + prevCatNo).style.display = 'none';
	document.getElementById('cap_item_' + prevCatNo).className = 'cap_item';
	document.getElementById('cap_sep_' + prevCatNo).className = 'cap_sep';
	document.getElementById('cap_sep_' + (prevCatNo * 1 + 1)).className = 'cap_sep';
	
	document.getElementById('cat_content_' + ind).style.display = 'block';
	document.getElementById('cap_item_' + ind).className = 'cap_item_eff';			
	document.getElementById('cap_sep_' + ind).className = 'cap_sep_eff';
	document.getElementById('cap_sep_' + (ind * 1 + 1)).className = 'cap_sep_eff';
	
	prevCatNo = ind
	
	return false;
}
function setVob(type)
{
	getEcoVob(type);
	document.getElementById('vob_link_' + prevVobType).style.color = '#521f32';
	document.getElementById('vob_link_' + prevVobType).style.background = 'transparent';
	document.getElementById('vob_link_' + type).style.color = '#ffffff';
	document.getElementById('vob_link_' + type).style.background = '#521f32';
	prevVobType = type;
	
	return false;
}

function showBookmark( )
{
	var title = encodeURIComponent(document.title);
	var url = encodeURIComponent(document.location.href);

	while ( title.indexOf("'") != -1 )
	{
		title = title.replace("'", "");
	}

	document.write('<div style="text-align: center; width: 420px; float: left; margin-bottom: 10px;"><iframe src="http://www.facebook.com/plugins/like.php?href=' + url + '&amp;layout=standard&amp;show_faces=true&amp;width=420&amp;action=recommend&amp;font=verdana&amp;colorscheme=light&amp;height=24" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:420px; height:24px;" allowTransparency="true"></iframe></div>');

	document.write('<div style="float: left; padding-left: 15px; margin-bottom: 10px;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="' + document.title + '" data-url="' + document.location + '" >Tweet</a><sc' + 'ript type="text/javascript" src="http://platform.twitter.com/widgets.js"></' + 'script></div>');

	document.write('<br class="clear" />');
}
