function showhide(id)
{
	var obj = $(id);
	if(obj.style.display=='none')
	{
		obj.style.display='block';
		$('div_weatherbar_hidelink').src = 'images/hide.gif';
	}else{
		obj.style.display='none';
		$('div_weatherbar_hidelink').src = 'images/show.gif';
	}	
}
	
function resim_getir(path, image, descr, title)
{
	var obj = document.getElementById('resim_getir').innerHTML = '<a target="_blank" href="'+ path +'"><img src="/cache/images/galeri/medium/'+ image +'" /></a><br><br><b>'+ title +'</b><br>'+ descr;

}

function changeTab(tab, tabcount, id, module)
{
	for(var i=0; i<tabcount;i++)
	{
		if(i != tab)
		{
			if(i==tabcount-1) $('tab' + i).className = "son"; else $('tab' + i).className = "item"; 

		} else {
			if(i==tabcount-1) $('tab' + i).className = "selected_son"; else $('tab' + i).className = "selected_item"; 
			
		}	
	}
	
	GetNews(id,module);
}		


function OG(url,name) 
{
  var winWidth = 700;
  var winHeight = 500;
  var w = (screen.width - winWidth)/2;
  var h = (screen.height - winHeight)/2 - 60;
  var features = 'width='+winWidth+',height='+winHeight+',top='+h+',left='+w+',scrollbars=1';
  window.open(url,name,features);
}
var opera = navigator.userAgent.toLowerCase().indexOf('opera')>=0?true:false;
var ajaxObjects = new Array();

var siteurl = '/index.php/ajax';

function GetNews(id,module)
{
	var ajaxIndex = ajaxObjects.length;
	ajaxObjects[ajaxIndex] = new sack();
	$('tab_content').innerHTML = '<img src="http://www.kafkasevi.com/system/application/views/internet/images/main/indicator.gif" hspace="10" vspace="10"/>';
	ajaxObjects[ajaxIndex].requestFile = siteurl +'/get_news/'+ module +'/' + escape(id);
	ajaxObjects[ajaxIndex].onCompletion = function()
	{ 
		var rssContent = ajaxObjects[ajaxIndex].response;
		$('tab_content').innerHTML = rssContent;

		
		ajaxObjects[ajaxIndex] = false;
	
	};	
	ajaxObjects[ajaxIndex].runAJAX();
}

function GetTabNews(id,count)
{
	var i;
	var last = count +1;

	for(i=1; i<last; i++)
	{
		$('news_'+ i).style.display = 'none';	
	}

	$('news_'+ id).style.display='';	
}