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 HavaOut(id) {
window.open('havadurumu.asp?goster=hava&sehir='+id+'','','width=600,height=255,scrollbars=yes')
}
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 heightOptimizer()
{
	window.onresize = heightOptimizer;
	
	var _height = document.getElementById('sol').offsetHeight;
	
	if(_height < document.getElementById('orta').offsetHeight)
		_height = document.getElementById('orta').offsetHeight;
	
	if(_height < document.getElementById('sag').offsetHeight)
		_height = document.getElementById('sag').offsetHeight;
	
	document.getElementById('sayfa').style.height = _height + "px";
	document.getElementById('sol').style.height = _height + "px";
	document.getElementById('orta').style.height = _height + "px";
	document.getElementById('sag').style.height = _height + "px";
}
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 deleteConfirm()
{
	var restart = confirm("Bu Kayıtı Silmek İstediğinizden Emin misiniz?");
	if(restart)
		return true;
	else
		return false;
}
function onlyNumber()
{
	if (event.keyCode < 48 || event.keyCode> 57) event.returnValue = false;
}
function changeSize(elm, _size, class_name)
{
	document.getElementById(elm).className = class_name + ' ' + class_name + '_' + _size;
	Set_Cookie('text_size', _size, 30, '', '', '');
}
function authorChange(author_type, author_id, author_name, article_id, article_link, _title, _spot)
{
	document.getElementById("author_img_" + author_type).src = 'http://www.akishaber.net/images/yazar/' + author_id;
	document.getElementById("author_article_name_" + author_type).innerHTML = '<a style="color: #000000; font: bold 8pt/15px Tahoma;" href="' + article_link + '">' + author_name + "</a>";
	document.getElementById("author_article_title_" + author_type).innerHTML = '<a style="color: #000000;font: 100 8pt/15px Tahoma;" href="' + article_link + '">' + _title + "</a>";
}
function authorSelectChanged(authorId)
{
	if(authorId != "")
		window.location = "author_article_detail.php?authorId=" + authorId;
	return false;
}

function mostlyPage(type, page)
{
    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_" + type).innerHTML = mostly_items;
	changeMostly(type, 0);
}
function changeMostly(type, idx)
{
	
	eval('elm = mostly_data_' + type);
	
	if(typeof(window['elm']) == "undefined")
		return;
	
	document.getElementById("mostly_image_" + type).src = './images/news/101x76/' + elm[idx]['image'] + '.jpg';
	document.getElementById("mostly_title_" + type).innerHTML = '<a href="news_detail.php?id=' + idx + '">' + elm[idx]['title'] + '</a>';
	document.getElementById("mostly_short_content_" + type).innerHTML = "<a href=\"news_detail.php?id=" + idx + "\">" + elm[idx]['short_content'] + "</a>";
	document.getElementById("mostly_link_" + type).href = "news_detail.php?id=" + idx;
}
function goGazette(idx)
{
	if(idx == "")
		return false;
	
	window.open("newspaper.php?newspaper=" + idx, "", "");
	return true;
}
function goRadio(href, target)
{
	window.open(href, target, 'width=483, height=300, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	return false;
}
function goTV(href, target)
{
	window.open(href, target, 'width=504, height=410, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	return false;
}

function hide(divID)
    {
    document.getElementById(''+divID+'').style.display = 'none';
    }

function displayCatDiv(divID,rulerDiv)
    {
    document.getElementById(''+divID+'').style.display = 'block';
    document.getElementById(''+divID+'').style.top = (document.getElementById(''+rulerDiv+'').offsetTop - document.body.scrollTop + 116) + 'px' ;
    }

function displayCatDiv2(divID,rulerDiv)
    {
    document.getElementById(''+divID+'').style.display = 'block';
    document.getElementById(''+divID+'').style.top = (document.getElementById(''+rulerDiv+'').offsetTop - document.body.scrollTop - 80) + 'px' ;
    }
function displayDiv(divID)
    {
    hide('tits0-manset');hide('tits0-spot');hide('tits0-imaj');
    hide('tits1-manset');hide('tits1-spot');hide('tits1-imaj');
    hide('tits2-manset');hide('tits2-spot');hide('tits2-imaj');
    hide('tits3-manset');hide('tits3-spot');hide('tits3-imaj');
    hide('tits4-manset');hide('tits4-spot');hide('tits4-imaj');
    hide('tits5-manset');hide('tits5-spot');hide('tits5-imaj');
    hide('tits6-manset');hide('tits6-spot');hide('tits6-imaj');
    hide('tits7-manset');hide('tits7-spot');hide('tits7-imaj');
    hide('tits8-manset');hide('tits8-spot');hide('tits8-imaj');
//  hide('tits9-manset');hide('tits9-spot');hide('tits9-imaj');
//	hide('tits10-manset');hide('tits10-spot');hide('tits10-imaj');

    document.getElementById('tits'+divID+'-manset').style.display = 'block';
    document.getElementById('tits'+divID+'-spot').style.display = 'block';
    document.getElementById('tits'+divID+'-imaj').style.display = 'block';
}
function PrintOut(id) {
window.open('yazdir.asp?id='+id+'','','width=600,height=500,scrollbars=yes')
}
