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 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 deleteConfirm()

{

	var restart = confirm("Bu Kay1t1 Silmek 0stediinizden Emin misiniz?");

	if(restart)

		return true;

	else

		return false;

}

function onlyNumber()

{

	if (event.keyCode < 48 || event.keyCode> 57) event.returnValue = false;

}

function changeNewsDetail(idx)

{

	if(previousItem != -1)

	{

		document.getElementById("news_headline_" + previousItem).style.display = 'none';

	}

	document.getElementById("news_headline_" + idx).style.display = 'block';

	

	document.getElementById("news_image").src = './images/news/' + imageArr[idx] + '.jpg';

	document.getElementById("news_spot").innerHTML = "<a href=\"haber_detayi.asp?id=" + idArr[idx] + "\">" + spotArr[idx] + "</a>";

	document.getElementById("news_link").href = "haber_detayi.asp?id=" + idArr[idx];

	

	previousItem = idx;

	return 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_id, author_name, article_id, article_link, _title, _spot)

{

	document.getElementById("author_img").src = './images/author/' + author_id + ".jpg";

	document.getElementById("author_article_name").innerHTML = '<a href="' + article_link + '">' + author_name + "</a>";

	document.getElementById("author_article_title").innerHTML = '<a href="' + article_link + '">' + _title + "</a>";

}



function authorChangex(author_idx, author_namex, article_idx, article_linkx, _titlex, _spotx)

{

	document.getElementById("author_imgx").src = './images/news/' + author_idx + ".jpg";

	document.getElementById("author_article_namex").innerHTML = '<a href="' + article_linkx + '">' + author_namex + "</a>";

	document.getElementById("author_article_titlex").innerHTML = '<a href="' + article_linkx + '">' + _titlex + "</a>";

}

function authorSelectChanged(authorId)

{

	if(authorId != "")

		window.location = "kose_yazisi_detayi.asp?id=" + authorId;

	return false;

}

function authorSelectChangedx(authorIdx)

{

	if(authorIdx != "")

		window.location = "haber_detayi.asp?id=" + authorIdx;

	return false;

}

function heightOptimizer()

{

	var _height = document.getElementById('base_middle').offsetHeight;



	if(_height < document.getElementById('base_right').offsetHeight)

		_height = document.getElementById('base_right').offsetHeight;



	document.getElementById('base_right').style.height = _height + "px";

	document.getElementById('base_middle').style.height = _height + "px";

	//document.getElementById('base').style.height = _height + "px";

}

function mostlyPage(type, page)

{

    mostly_type = type;

	var xmlHttpReq = false;

    var self = this;

    var strURL = 'x_mostly.asp?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").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/' + elm[idx]['image'] + '.jpg';

	document.getElementById("mostly_title_" + type).innerHTML = '<a href="haber_detayi.asp?id=' + idx + '">' + elm[idx]['title'] + '</a>';

	document.getElementById("mostly_short_content_" + type).innerHTML = "<a href=\"haber_detayi.asp?id=" + idx + "\">" + elm[idx]['short_content'] + "</a>";

}

function changeMiddleNews(type, id, title, image)
{
	document.getElementById("middle_news_image" + type).src = './images/news/' + image + '.jpg';
	document.getElementById("middle_news_title" + type).innerHTML = "<a href=news_detail.php@id=" + id + ">" + title + "</a>";
	document.getElementById("middle_news_link" + type).href = "haber_detayi.asp?id=" + id;
	
	return false;
}