function CM_slider()
{
	// Lütfen izinsiz kullanmayınız.
	
	this.recordCount = 0;
	
	this.elm = null;
	this.elmActive = null;
	this.elmTotal = null;
	this.class_name = 'CM_slider_item';
	
	this.current = 0;
	this.direction = -1;
	
	this.stepItemCount = 3;
	this.itemWidth = 0;
	this.visibleCount = 0;
	this.firstSlide =true;
	
	this.stepTime = 60;
	this.stepCount = 10;
	this.stepAmount = 0;
	this.stepIndex = 0;
	this.totalWidth = 0;
	this.lastestLeft = 0;
	this._automaticStepTime = 15000;
	this._automaticTimer = null;
	this.name = '';
	this.goStatus = true;
	
	this.timerIndex = null;
	
	this._start = _start;
	this._action = _action;
	this._clear = _clear;
	this._go = _go;
	this.go = go;
	this._automatic = _automatic;
	this._clearAutomaticTimer = _clearAutomaticTimer;
	this._checkStatus = _checkStatus;
	
	function _start()
	{
		if(!this.elm)
			return false;
		
		tmp = this.elm.getElementsByTagName('div');
		
		for(i = 0; i<tmp.length; i++)
		{
			if(tmp[i].className == this.class_name)
			{
				this.recordCount += 1;
				this.itemWidth = tmp[i].offsetWidth;
			}
		}
		
		this.visibleCount = parseInt(this.elm.offsetWidth / this.itemWidth) * 1;
		
		this.totalWidth = this.itemWidth * this.recordCount;
		
		this.stepAmount = parseInt(this.itemWidth / this.stepCount);
		
		this.lastestLeft = document.getElementById(this.elm.id + "_" + (this.recordCount - 1)).offsetLeft;
		
		this.showElmTotal();
		
		this.showElmActive();
	}
	
	this.showElmTotal = function()
	{
		if(this.elmTotal)
		{
			this.elmTotal.innerHTML = this.recordCount;
		}
	}
	
	this.showElmActive = function()
	{
		if(this.elmActive)
		{
			tmp = this.current * -1 + this.stepItemCount;
			if(tmp > this.recordCount)
				tmp = this.recordCount;
			
			this.elmActive.innerHTML = tmp;
		}
	}
	
	function _action()
	{

		if(!this.recordCount)
			return false;
		else if (this.visibleCount >= this.recordCount)
			return false;
		
		this._automatic();
		
	}
	
	function _go()
	{
		
		this.stepIndex++;
		
		if(this.stepIndex == this.stepCount)
		{
			_step = this.itemWidth - (this.stepCount * this.stepAmount) + this.stepAmount;
		}
		else
		{
			_step = this.stepAmount;
		}
		
		_step = _step * this.stepItemCount;
		
		for(i=0; i<this.recordCount; i++)
		{
			tmp = document.getElementById(this.elm.id + "_" + i).offsetLeft + _step * this.direction;
			if(tmp > this.lastestLeft)
			{
				tmp = _step - this.itemWidth;
			}
			
			document.getElementById(this.elm.id + "_" + i).style.left = tmp + "px";
			
		}
		if(this.stepIndex == this.stepCount)
		{
			this._clear();
		}
		else
		{
			this.timerIndex = setTimeout(this.name + "._go();", this.stepTime);
		}
		
		this.showElmActive();
	}
	function go(direction, automatic)
	{
		if(!this.goStatus)
			return;
		
		/*if(this.current * direction + this.stepItemCount >= this.recordCount)
		{
			return false;
		}*/
		
		if(!automatic){
			this._clearAutomaticTimer();
		}
		if(this.current + direction > 0)
			return false;
		
		if((this.recordCount - this.visibleCount) < Math.abs(this.current + direction))
			return false;
		
		this.goStatus = false;
		
		this.direction = direction;
		this.current += direction * this.stepItemCount;
		this._go();
		
	}
	
	function _clear()
	{
		this.stepIndex = 0;
		
		if(this.timerIndex != null)
			clearTimeout(this.timerIndex);
		this.timerIndex = null;
		
		this.goStatus = true;
	}
	
	function _clearAutomaticTimer()
	{
		if (this._automaticTimer != null)
			clearTimeout(this._automaticTimer);
		this._automaticTimer = null;		
	}
	
	function _automatic() {
		if(this.firstSlide)
		{
			var temp = setTimeout("this.go(this.direction, 1)", this._automaticStepTime);
			clearTimeout(temp);
			this.firstSlide = false;
		}
		else
		{
			this._checkStatus();
			this.go(this.direction, 1);
		}
		this._automaticTimer = setTimeout(this.name + "._automatic();", this._automaticStepTime);
	}
	function _checkStatus()
	{
		var index = this.recordCount - this.visibleCount;
		
		if(this.current == -(index) )
			this.direction = 1;
		else if(this.current== 0)
			this.direction = -1;	
	}
}function openPopUp_520x390(href, target)
{
	window.open(href, target, 'width=516, height=390, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	return false;
}

function openPopUp(href, target, width, height)
{
	window.open(href, target, 'width=' + width + ', height=' + height + ', 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 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="noscale" /> ';
	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-shoc kwave-flash" scale="noscale"></embed> ';
	str += '</object> ';
	document.write(str);
}

function SymError()
{
	return true;
}
function whichBrowser()
{
	var agt = navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1)
		return 'Opera';
	if (agt.indexOf("staroffice") != -1)
		return 'Star Office';
	if (agt.indexOf("webtv") != -1) 
		return 'WebTV';
	if (agt.indexOf("beonex") != -1)
		return 'Beonex';
	if (agt.indexOf("chimera") != -1)
		return 'Chimera';
	if (agt.indexOf("netpositive") != -1)
		return 'NetPositive';
	if (agt.indexOf("phoenix") != -1)
		return 'Phoenix';
	if (agt.indexOf("firefox") != -1)
		return 'Firefox';
	if (agt.indexOf("safari") != -1)
		return 'Safari';
	if (agt.indexOf("skipstone") != -1)
		return 'SkipStone';
	if (agt.indexOf("msie") != -1)
		return 'MSIE';
	if (agt.indexOf("netscape") != -1)
		return 'Netscape';
	if (agt.indexOf("mozilla/5.0") != -1)
		return 'Mozilla';
	if (agt.indexOf('\/') != -1)
	{
		if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') 
		{
			return navigator.userAgent.substr(0,agt.indexOf('\/'));
		}
		else
			return 'Netscape';
	}
	else if (agt.indexOf(' ') != -1)
		return navigator.userAgent.substr(0,agt.indexOf(' '));
	else
		return navigator.userAgent;
}
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 changeTarget(elm)
{
	tmp = elm.getElementsByTagName("a");
	for(i=0; i<tmp.length; i++)
		tmp[i].target = "_blank";
}
function changeSizeDir(idx, _dir, class_name)
{
	var elm = document.getElementById(idx);
	var className = elm.className;
	var currentSize = parseInt(className.substr(className.length-2));

	if(isNaN(currentSize))
		currentSize = 12;

	if(_dir == 'd')
		currentSize -= 2;
	else
		currentSize += 2;

	if(currentSize >= 12 && currentSize <= 18)
	{
		elm.className = class_name + ' ' + class_name + '_' + currentSize;
		Set_Cookie('text_size', currentSize, 30, '', '', '');
	}
}
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblclick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

function windowReload()
{
	if(reloadable)
	{
		window.location.reload();
	}
}

function disableReload()
{
	reloadable = false;
}

function disableMetaRefresh()
{
	metatags = document.getElementsByTagName("META")
	if(!metatags.length)
		return;
	for(i = 0; i < metatags.length; i++)
	{
		if(metatags[i].httpEquiv == 'refresh')
		{
			metatags[i].content = '300000';
			break;
		}
	}
}
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 = imageURL + 'news/' + imageArr[idx] + '.jpg';
	document.getElementById("news_date").innerHTML = dateArr[idx];
	document.getElementById("news_spot").innerHTML = "<a href=\"" + linkArr[idx] + "\">" + spotArr[idx] + "</a>";
	document.getElementById("news_link").href =  linkArr[idx];
	
	previousItem = idx;
	return false;
}
function getFlashMovie(flash) {
	return (isIE) ? window[flash] : document[flash];
}
function changeNewsDetailFlash(idx, type, prop)
{
	var news_link = document.getElementById("news_link");

	news_link.href = linkArr[idx];
	if(prop == 8)
	{
		news_link.target = "_blank";
		news_link.rel = "adv";
	}

	document.getElementById("news_image").src = imageURL + 'news/' + imageArr[idx] + '.jpg';

	if(type)
	{
		document.getElementById("news_cat").innerHTML = catArr[idx];
		document.getElementById("news_date").innerHTML = dateArr[idx];
		document.getElementById("news_spot").innerHTML = "<a href=\"" + linkArr[idx] + "\">" + spotArr[idx] + "</a>";
	}

	document.getElementById("HD_item_" + prevHDIdx).className = 'item';
	//document.getElementById("HD_item_" + (prevHDIdx+1)).className = 'item';
	document.getElementById("HD_item_" + idx).className = 'item_current';
	//document.getElementById("HD_item_" + (idx + 1)).className = 'item item_next';
	prevHDIdx = idx;

	getFlashMovie("headlineFlashTitle").sendAUtoFlash(titleArr[idx]);

	return false;
}

var prevHeadlinePage = 1;
function headlinePageNext(count)
{
	if(prevHeadlinePage + 1 <= count)
		headlinePage(prevHeadlinePage + 1);
	return false;
}
function headlinePage(page, category, location)
{
    var xmlHttpReq = false;
    var self = this;
    var strURL = 'x_headline_page.php?page=' + page + '&category=' + category + '&location=' + location;
    
    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)
        {
        	if(prevHeadlinePage != null)
        	{
        		document.getElementById('headline_page_' + prevHeadlinePage).className = "item";
        	}
        	document.getElementById('headline_page_' + page).className = "item active";
        	prevHeadlinePage = page;
        	
            headlinePageLoad(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send('');
    return false;
}
function headlinePageLoad(str)
{
	eval(str);

	document.getElementById("headline_items").innerHTML = headlineItems;
	document.getElementById("headline_images").innerHTML = headlineImages;
	previousItem = -1;
	//changeNewsDetail(0);
	changeNewsDetailFlash(0);
}

// PreHeadlineScript
var prevPHeadlinePage = 1;
function headlinePageNext(count)
{
	if(prevHeadlinePage + 1 <= count)
		headlinePage(prevHeadlinePage + 1);
	return false;
}
function preHeadlinePage(page)
{
    var xmlHttpReq = false;
    var self = this;
    var strURL = 'x_pre_headline_page.php?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=utf-8');
    self.xmlHttpReq.onreadystatechange = function()
    {
        if (self.xmlHttpReq.readyState == 4)
        {
        	if(prevPHeadlinePage != null)
        	{
        		document.getElementById('pre_headline_page_' + prevPHeadlinePage).className = "item";
        	}
        	document.getElementById('pre_headline_page_' + page).className = "item active";
        	prevPHeadlinePage = page;
        	
            preHeadlinePageLoad(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send('');
    return false;
}
function preHeadlinePageLoad(str)
{
	eval(str);

	document.getElementById("pre_headline_items").innerHTML = preHeadlineItems;
	document.getElementById("pre_headline_images").innerHTML = preHeadlineImages;
	changePreHeadline(0);
}
function changePreHeadline(idx, prop)
{
	var phd_news_link = document.getElementById("phd_news_link");
	var targetStr = "";

	phd_news_link.href = linkPArr[idx];
	if(prop == 8)
	{
		phd_news_link.target = "_blank";
		phd_news_link.rel = "adv";
		targetStr = ' target="_blank" rel="adv"';
	}

	document.getElementById("phd_news_image").src = imageURL + 'news/' + imagePArr[idx] + '.jpg';

	if (spotPArr[idx])
	{
		document.getElementById("transparent_container").style.display = 'block';
		document.getElementById("phd_headline").innerHTML = "<a href=\"" + linkPArr[idx] + "\"" + targetStr + ">" + titlePArr[idx] + "</a>";
		document.getElementById("phd_news_spot").innerHTML = "<a href=\"" + linkPArr[idx] + "\"" + targetStr + ">" + spotPArr[idx] + "</a>";
	}
	else
	{
		document.getElementById("transparent_container").style.display = 'none';
	}

	document.getElementById("PHD_item_" + prevPHDIdx).className = 'item';
	document.getElementById("PHD_item_" + idx).className = 'item_current';
	prevPHDIdx = idx;

	return false;
}
//

function mostlyPage(type, page, paging)
{
    var xmlHttpReq = false;
    var self = this;
    var strURL = 'x_mostly.php?type=' + type + '&page=' + page + '&paging=' + paging;
    
    if (window.XMLHttpRequest)
    {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    /*
    if (typeof(prevMostlyTab) != 'undefined')
	    document.getElementById('mostly_tab_' + prevMostlyTab).className = 'tab_' + prevMostlyTab + ' pas_tab';
    document.getElementById('mostly_tab_' + page).className = 'tab_' + page + ' act_tab';
    prevMostlyTab = page;
    */
    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)
        {
        	mostlyLoad(type, self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send('');

	for(i=1;i<=4;i++)
	{
		if(i == 2)
			continue;
		
		elm = document.getElementById("mostly_tab_" + type + "_" + i);
		if(i == page)
			elm.className = "act";
		else
			elm.className = "";
	}
	
	for(i=1; i<=5; i++)
	{
		elm = document.getElementById("mostly_page_" + type + "_" + i);
		if(i == paging)
			elm.className = "item active"
		else
			elm.className = "item"
	}

    return false;
}
function mostlyLoad(type, str)
{
	eval(str);
	
	document.getElementById("mostly_items_" + type).innerHTML = mostly_items;
}
function authorChange(author_id, author_name, article_id, article_link, _title, _date)
{
	document.getElementById("author_img").src = imageURL + 'author/' + author_id + "_m.jpg";
	document.getElementById("author_article_name").innerHTML = author_name;
	document.getElementById("author_article_title").innerHTML = '<a href="' + article_link + '">' + _title + "</a>";
	document.getElementById("author_article_date").innerHTML = _date;
}

function changeMostlyTab(idx)
{
	if(idx == 1)
	{
		document.getElementById("mostly_readed").style.display = 'block';
		document.getElementById("mostly_commented").style.display = 'none';
	}
	else
	{
		document.getElementById("mostly_readed").style.display = 'none';
		document.getElementById("mostly_commented").style.display = 'block';
	}
}
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').style.height = _height + "px";
	document.getElementById('base_middle').style.height = _height + "px";
	document.getElementById('base_right').style.height = _height + "px";
}
function drawTopMenu(menuitem, active_page)
{
	i = 0;
	str = '';
	sep_class = "sep";
	item_class = "item";
	for (i=0; i < 6; i++)
	{
		if(active_page == i)
		{
			sep_class = "active_sep_1";
			item_class = "active_item";
		}
		
		if(i == 0 && sep_class != "active_sep_1")
			str += '<div class="sep_first"></div>';
		
		if( !(i == 0 && sep_class == "sep"))
			str += '<div class="' + sep_class + '"></div>';
		
		str += '<div id="headline_nav_page_' + i + '" class="' + item_class + '"><a href="javascript:void()" onclick="changeHeadlineTab(' + i + ')">' + menuitem[i] + '</a></div>';
		
		if( i == 5 && sep_class == "active_sep_1" )
			str += '<div class="active_sep_2"></div>';
		
		if(active_page == i)
			sep_class = "active_sep_2";
		else
			sep_class = "sep";
		
		item_class = "item";
	}
	i = null;
	sep_class = null;
	item_class = null;
	
	return str;	
}
function changeHeadlineTab(idx)
{
	if(prevHeadlineTab == idx)
		return;
	
	document.getElementById('headline_nav').innerHTML = drawTopMenu(menuitem, idx);
	document.getElementById('headline_item_' + idx).style.display = 'block';
	if(prevHeadlineTab != "-1")
	{
		document.getElementById('headline_item_' + prevHeadlineTab).style.display = 'none';
	}
	prevHeadlineTab = idx;
}
var writer = 0;
function writerOpen(i) {

	document.getElementById('writerRight'+writer).className = 'writerHide';
	document.getElementById('writerRight'+i).className = 'writerShow';
	
	document.getElementById('writerRightIcerik'+writer).className = 'writerHide';
	document.getElementById('writerRightIcerik'+i).className = 'writerShow';
	
	writer = i;
}
function changeESNewsDetail(idx)
{
	document.getElementById("es_image").src = imageURL + 'news/170x129/' + esContent[idx][1] + '.jpg';
	document.getElementById("es_link").innerHTML = esContent[idx][2];
	document.getElementById("es_link").href = esContent[idx][0];
	document.getElementById("es_spot").innerHTML = esContent[idx][3];
	document.getElementById("es_item_" + prevESIdx).className = 'item';
	document.getElementById("es_item_" + idx).className = 'item item_act';
	
	prevESIdx = idx;

	return false;
}

function showLocalNews(id, IDS)
{
    var xmlHttpReq = false;
    var self = this;
    var strURL = 'x_local_news.php?id=' + id + '&IDS=' + IDS;
    
    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)
        {
        	document.getElementById('main_local_news').innerHTML = self.xmlHttpReq.responseText;
        }
    }
    self.xmlHttpReq.send('');
    return false;
}

function togglePreHeadline(toggle)
{
	var elm = document.getElementById('pre_headline');
	if(elm.style.display == '')
	{
		elm.style.display = 'none';
		toggle.className = 'footer toggle';
	}
	else
	{
		elm.style.display = '';
		toggle.className = 'footer toggle toggle_active';
	}
}

function expandSubLocal()
{
	var elm = document.getElementById('sub_local');
	elm.className = 'inner clearfix';
}

function menuHover(elm, hor, ver)
{
	elm.style.backgroundPosition = '-' +  hor + 'px ' + ver;
}
//SubMenu
var subMenu;
var subMenuTimer;
function showSubMenu(menu, idx)
{
	clearTimeout(subMenuTimer);

	subMenu = document.getElementById("sub_menu_" + idx);
	if(!subMenu)
		return;

	/*if(menu.offsetLeft > 470)
		subMenu.style.left = "470px";
	else
		subMenu.style.left = menu.offsetLeft + "px";*/

	subMenu.style.display = "block";
}

function closeSubMenu()
{
	if(!subMenu)
		return;

	subMenu.style.display = "none";
}

function closeSubMenuTimer()
{
	subMenuTimer = setTimeout('closeSubMenu();',500)
}

function keepSubMenu()
{
	clearTimeout(subMenuTimer);
}
//
function npSlideInfo()
{
	var elm = document.getElementById("np_slide_info");
	elm.innerHTML = (CMSLIDER.current * -1) + 1 + " / " + CMSLIDER.recordCount;
}
function submitSearchForm(F)
{
	if(F.q.value == F.default_txt.value )
	{
		alert('Lütfen aranacak kelimeyi giriniz.')
		F.q.focus();
		return false;
	}

	F.q.value = F.q.value + F.extra_query.value;
	return true;
}
function changeVideoItem(idx)
{
	document.getElementById('video_code').innerHTML = arrVideoCode[idx];
	document.getElementById('video_title').innerHTML = '<a href="' + arrVideoLink[idx] + '">' + arrVideoTitle[idx] + '</a>';
	
	return false;
}
function expandComment(action, idx)
{
	var elm = document.getElementById(idx);

	if(elm.className != 'comment_content')
	{
		elm.className = 'comment_content';
		action.style.backgroundPosition = 'right bottom';
	}
	else
	{
		elm.className = 'comment_content comment_content_shrinked';
		action.style.backgroundPosition = 'right top';
	}
}
/**/
_ZINDEX = 2000;

function floatingBanner()
{
	// writed by CM Bilisim
	this.x_index = 820;
	this.min_client_width = this.x_index + 200;
	this.top_margin = 2;
	
	this.banner_CSS = "display: none; visibility: visible; width: 156px; position: absolute; top: 2px; z-index: " + _ZINDEX + ";";
	
	this.banner_Code = '';
	
	this._show = _show;
	this._hidden = _hidden;
	this._paint = _paint;
	this._draw = _draw;
	this.swapStatus = swapStatus;
	
	this.show_status = false;
	
	_ZINDEX += 1;
	
	function _show()
	{
		document.getElementById('CM_Float_banner_div').style.visibility = 'visible';
		document.getElementById('CM_Float_banner_div').style.display = 'block';
		this.show_status = true;
		this._paint();
	}

	function _hidden()
	{
		document.getElementById('CM_Float_banner_div').style.visibility = 'hidden';
		this.show_status = false;
	}
	
	function swapStatus()
	{
		if(this.show_status)
			this._hidden()
		else
			this._show();
	}
	function _paint()
	{
		with(document.body)
		{
			if(clientWidth > this.min_client_width)
			{
				if (this.show_status)
				{
					document.getElementById('CM_Float_banner_div').style.left = this.x_index + 'px';
					
					document.getElementById('CM_Float_banner_div').style.top = (scrollTop + this.top_margin) + 'px';
					
					document.getElementById('CM_Float_banner_div').style.display = "block";
				}
			}
			else
			{
				document.getElementById('CM_Float_banner_div').style.display = "none";
			}
		}
	}
	function _draw()
	{
		this.min_client_width = this.x_index + 200;
		document.write ('<div id="CM_Float_banner_div" style="' + this.banner_CSS + '">' + this.banner_Code + '</div>');
	}
	
}
function CM_Floating_changeStatus()
{
	elm.swapStatus()
}
function CM_Floating_Event()
{
	elm._paint();
}

function getNormalSWF(_WIDTH, _HEIGHT, _SRC, _WMODE, _VARS)
{
	if(!_WMODE)
	{
		_WMODE = 'opaque';
	}
	
	document.write('<div style="width: ' + _WIDTH + 'px; height: ' + _HEIGHT + 'px; z-index: ' + _ZINDEX + ';">');
	document.write('<object width="' + _WIDTH + '" height="' + _HEIGHT + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0">');
	document.write('<param name="movie" value="' + _SRC + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="' + _WMODE + '">');
	document.write('<param name="scale" value="exactfit">');
	document.write('<param name="allowscriptaccess" value="always">');
	flashvars = '';
	if(_VARS)
	{
		document.write('<param name="flashvars" value="' + _VARS + '">');
		flashvars = ' flashvars="' + _VARS + '"';
	}
	document.write('<embed style="z-index: ' + _ZINDEX + ';" src="' + _SRC + '" width="' + _WIDTH + '" height="' + _HEIGHT + '" scale="exactfit" quality="high" wmode="' + _WMODE + '" ' + flashvars + ' pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>');
	document.write('</object>');
	document.write('</div>');
	_ZINDEX += 1;
}

function getRolloverSWF(_WIDTH, _HEIGHT, _ROLL_WIDTH, _ROLL_HEIGHT, _SRC, _ROLL_DIR)
{
	_LEFT = '0px';
	_TOP = '0px';
	switch(_ROLL_DIR)
	{
		case '1':
			_TOP = '-' + (_ROLL_HEIGHT - _HEIGHT) + 'px';
			_LEFT = '0px';
			break;
		case '4':
			_TOP = '0px';
			_LEFT = '-' + (_ROLL_WIDTH - _WIDTH) + 'px';
			break;
	}
	
	document.write('<div style="width: ' + _WIDTH + 'px; height: ' + _HEIGHT + 'px; position: relative; z-index: ' + _ZINDEX + '; top: ' + _TOP + '; left: ' + _LEFT + '">');
	document.write('<object width="' + _ROLL_WIDTH + 'px" height="' + _ROLL_HEIGHT + 'px" style="position: absolute; left: 0px; top: 0px;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0">');
	document.write('<param name="movie" value="' + _SRC + '">');
	document.write('<param name="menu" value="false">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="scale" value="exactfit">');
	document.write('<param name="allowscriptaccess" value="always">');
	if(_VARS)
		document.write('<param name="flashvars" value="' + _VARS + '">');
	document.write('<embed style="z-index: ' + _ZINDEX + ';" src="' + _SRC + '" width="' + _ROLL_WIDTH + '" height="' + _ROLL_HEIGHT + '" scale="exactfit" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>');
	document.write('</object>');
	document.write('</div>');
	
	_ZINDEX += 1;
}

function hideFloatingBanner()
{
	var elm = document.getElementById('CM_floatingElm');
	if (typeof(elm) == 'undefined')
		return;
	elm.style.display = "none";
}
/**/
function CM_HTTPReq(method, url, callbackFunction)
{
	var self = this;
	this._method = method;
	this._url = url;
	this._callbackFunction = callbackFunction;
	this._handle = null;
	this._form = '';
	this._param = '';
	this._contentType = 'text/html';
	this._body = (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
	this._showTransparentLayer = false;
	this._showOutput = false;
	this._showDialog = false;
	this._outputElm = document.getElementById('CMAX_container');
	this._contentElm = document.getElementById('CMAX_content');
	this._loadingElm = document.getElementById('CMAX_loading');
	
	this.getXmlHttpObject = function()
	{
		self._handle = null;
		
		try
		{
			self._handle = new XMLHttpRequest();
		}
		catch (e)
		{
			try
			{
				self._handle = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				self._handle = new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		
		if (self._handle == null)
		{
			alert ("Internet Tarayıcınız HTTP_Request Desteklemiyor!");
			return false;
		}
		
		return true;
	}
	
	this.formDataToQueryString = function()
	{
		
		tmp = '';
		
		for (i = 0; i < this._form.elements.length; i++)
		{
			elm = this._form.elements[i];
			
			switch (elm.type)
			{
				case 'text':
				case 'select-one':
				case 'hidden':
				case 'password':
				case 'textarea':
					tmp += elm.name + '=' + (elm.value) + '&'
					break;
			}
		}
		return tmp;
	}
	
	this.stateChanged = function()
	{	
		if (self._handle.readyState == 4 || self._handle.readyState == "complete")
		{
			if (self._handle.status == 200) 
			{
				if(self._showDialog)
				{
					self.showDialog(self._handle.responseText);
				}
				if(self._showOutput)
				{
					self.showOutput(self._handle.responseText);
				}
				
				if(self._callbackFunction)
				{
					eval(self._callbackFunction);
				}
				
			}
			else
			{
				alert("Hata!!!");
			}
			
			document.getElementById("CMAX_loading").style.display = "none";
		}
	}
	
	this.doRequest = function()
	{
		
		if(!this.getXmlHttpObject())
		{
			alert('Hata!!!');
			return false;
		}

		if(this._showTransparentLayer)
		{
			this.showTransparentLayer();
		}
	
		this.centerElement(this._loadingElm);

		this._loadingElm.style.display = "block";

		this._handle.onreadystatechange = this.stateChanged;

		this._handle.open(this._method, this._url, true);
	
		this._handle.setRequestHeader("Content-type", this._contentType);
		this._handle.setRequestHeader("Content-length", this._param.length);
		this._handle.setRequestHeader("Connection", "close");
		this._handle.send(this._param);
	}
	
	this.showOutput = function(str)
	{
		this._contentElm.innerHTML = str;
		this.executeEmbeddedScripts(str);
	}
	
	this.showDialog = function(str)
	{
		this._outputElm.style.display = 'block';
		this._contentElm.innerHTML = str;
		this.executeEmbeddedScripts(str);
		this.centerElement(this._outputElm);
	}
	
	this.hideDialog = function()
	{
		this._outputElm.style.display = 'none';
		this.hideTransparentLayer();
	}
	
	this.setForm = function(F)
	{
		this._form = F;
		this._param = this.formDataToQueryString();
	}
	
	this.setParam = function(param)
	{
		this._param = param;
	}
	
	this.setContentType = function(str)
	{
		this._contentType = str;
	}
	
	this.setOutputElm = function(elm)
	{
		this._outputElm = elm;
	}
	
	this.setContentElm = function(elm)
	{
		this._contentElm = elm;
	}
	
	this.setLoadingElm = function(elm)
	{
		this._loadingElm = elm;
	}
	
	this.centerElement = function(elm)
	{
		
		docwidth = document.getElementById('base').offsetWidth;
		docheight = Math.min(this._body.scrollHeight, this._body.clientHeight);
		
		_top = this._body.scrollTop + Math.ceil((docheight - elm.clientHeight) / 2);
		//_left = this._body.scrollLeft + Math.ceil((docwidth - elm.clientWidth) / 2);
		
		//alert(docwidth + ' ' + docheight + ' ' + _top + ' ' + _left + ' ' + elm.clientHeight + ' ' + elm.clientWidth)
		if(_top < 100)
			_top = 100;
		elm.style.top = _top + "px";
		//elm.style.left = _left + "px";	
	}
	
	this.showTransparentLayer = function()
	{
		this.hideSelectElement();
		
		tmp = document.getElementById('CMAX_transparent_layer');
	
		tmp.style.width = this._body.scrollWidth;
		tmp.style.height = this._body.scrollHeight;
		
		tmp.style.display = 'block';
	}
	
	this.hideTransparentLayer = function()
	{
		document.getElementById('CMAX_transparent_layer').style.display = 'none';
		this.showSelectElement();
	}
	
	this.showSelectElement = function()
	{
		elms = document.getElementsByTagName('select');
		
		for(i=0; i<elms.length; i++)
		{
			elms[i].style.display = 'block';
		}
	}
	
	this.hideSelectElement = function()
	{
		elms = document.getElementsByTagName('select');
		
		for(i=0; i<elms.length; i++)
		{
			elms[i].style.display = 'none';
		}
	}
	
	this.myBindexOf = function(myObject,mySearch,myPos)
	{
		if (myPos==null)
			myPos=0;
		if (typeof(myObject)!='object')
			return -1;
		if(!myObject.indexOf)
		{
			for(var i=myPos; i < myObject.length; i++)
			if(myObject[i]==mySearch)
				return i;
			return -1;
		}
		else
			return myObject.indexOf(mySearch,myPos);
	}

	this.executeEmbeddedScripts = function(response)
	{
		if (!this._contentElm)
			return;
		var bSaf = (this.myBindexOf(navigator.userAgent,'Safari',0) != -1);
		var bOpera = (this.myBindexOf(navigator.userAgent,'Opera',0) != -1);
		var bMoz = (navigator.appName == 'Netscape');
				
		var myHead = document.getElementsByTagName('head');
		
		if ((!bSaf)&&(!bOpera)&&(!bMoz))
			this._contentElm.innerHTML = response; // World's most retarded IE fix
		
		var st = this._contentElm.getElementsByTagName('SCRIPT');
		var strExec;
		var scripts = st.length;
		var i = 0;
		for(j = 0; j < scripts; j++)
		{
			var scriptsAtStart = st.length;
			if (bSaf)
			{
				strExec = st[i].innerHTML; st[i].innerHTML = "";
			}
			else if (bOpera)
			{
				strExec = st[i].text; st[i].text = "";
			}
			else if (bMoz)
			{
				strExec = st[i].textContent; st[i].textContent = "";
			}
			else
			{
				strExec = st[i].text; st[i].text = "";
			}
			
			try
			{
				var myScript = document.createElement("script");
				myHead.item(0).appendChild(myScript);
				myScript.type = "text/javascript";
				myScript.text=strExec;
				var html = this._contentElm.innerHTML;
				// jscript would prematurely eject if it encountered the full closing tag, even encapsulated in a string object
				var endScriptL = '<' + '/script>';  
				var endScriptU = '<' + '/SCRIPT>';
				var pos2 = this.myBindexOf(html,strExec,0);
				var pos = this.myBindexOf(html,endScriptL,pos2) >= 0 ? this.myBindexOf(html,endScriptL,pos2) : this.myBindexOf(html,endScriptU,pos2);
				pos += String(endScriptL).length;
				html = html.substr(0,pos) + html.substr(pos);
				this._contentElm.innerHTML = html;
				if(scriptsAtStart==st.length)
					i++;
			}
			catch(e)
			{
				alert("Sayfada hata var: "+e);
			}
		}
	}
}

var CM_HTTP;

function CMAX_postForm(F, callback, from)
{
	CM_HTTP = new CM_HTTPReq(F.method, F.action, callback);
	
	CM_HTTP.setContentType('application/x-www-form-urlencoded; charset=UTF-8');
	
	CM_HTTP.setForm(F);
	
	CM_HTTP._showDialog = true;
	
	CM_HTTP.doRequest();
	
	return false;
}

function CMAX_showDialog(url, callback)
{
	CM_HTTP = new CM_HTTPReq('get', url, callback);

	CM_HTTP.setContentType('text/html; charset=UTF-8');
	
	CM_HTTP._showDialog = true;
	
	CM_HTTP._showTransparentLayer = false;
	
	CM_HTTP.doRequest();

	return false;
}

function CMAX_showURL(url, output_elm, loading_elm, callback)
{
	CM_HTTP = new CM_HTTPReq('get', url, callback);
	
	CM_HTTP.setContentType('text/html; charset=UTF-8');
	
	CM_HTTP.setContentElm(document.getElementById(output_elm));
	
	if(loading_elm)
	{
		CM_HTTP.setLoadingElm(document.getElementById(output_elm));
	}
	
	CM_HTTP._showOutput = true;
	
	CM_HTTP._showTransparentLayer = false;
	
	CM_HTTP.doRequest();
	
	return false;
}

function CMAX_cancelDialog(reloadStatus)
{
	if(CM_HTTP == null)
		return false;
	
	CM_HTTP.hideDialog();
	
	if(reloadStatus)
		window.location.reload();
		
	return true;
}

function loginPostCallBck()
{
	window.location.reload();
}

function _commentPagingCallBack()
{
	window.location.href = window.location.href.replace('#comment_top', '') + '#comment_top';	
}

function _addCommentCallback()
{
	//createRTEElm('content');
}
//
function submitCommentForm(form, action)
{
	if(form.comment_content.value == "")
	{
		alert("Yorum içeriği boş geçilemez.");
		return false;
	}
	
	form.comment_submit.disabled = true;
	form.action = action;

	return CMAX_postForm(form, '');
}

function cleanupCommentForm()
{
	var elm = document.getElementById('comment_form');
	if(elm)
	{
		elm.content.value = '';
		elm.reply.value = 0;

		elm = document.getElementById('reply_to');
		elm.innerHTML = '';
	}

	return false;
}

function setCommentReply(idx, member)
{
	var elm = document.getElementById('comment_form');
	if(elm)
	{
		elm.reply.value = idx;

		elm = document.getElementById('reply_to');
		elm.innerHTML = '<span>@' + member + '</span><span class="remove" onclick="clearCommentReply();">x</span>';
	}
}

function clearCommentReply()
{
	var elm = document.getElementById('comment_form');
	if(elm)
	{
		elm.reply.value = 0;

		elm = document.getElementById('reply_to');
		elm.innerHTML = '';
	}
}

function CM_slider()
{
	// Lütfen izinsiz kullanmayınız.
	
	this.recordCount = 0;
	
	this.elm = null;
	this.elmActive = null;
	this.elmTotal = null;
	
	this.class_name = '';
	
	this.current = 0;
	this.direction = -1;
	
	this.stepItemCount = 3;
	this.itemWidth = 0;
	this.visibleCount = 0;
	this.firstSlide =true;
	
	this.stepTime = 60;
	this.stepCount = 10;
	this.stepAmount = 0;
	this.stepIndex = 0;
	this.totalWidth = 0;
	this.lastestLeft = 0;
	this._automaticStepTime = 8000;
	this._automaticTimer = null;
	this.name = '';
	this.goStatus = true;
	
	this.timerIndex = null;
	
	this._start = _start;
	this._action = _action;
	this._clear = _clear;
	this._go = _go;
	this.go = go;
	this._automatic = _automatic;
	this._clearAutomaticTimer = _clearAutomaticTimer;
	this._checkStatus = _checkStatus;
	
	function _start()
	{
		if(!this.elm)
			return false;
		
		tmp = this.elm.getElementsByTagName('div');
		
		for(i = 0; i<tmp.length; i++)
		{
			if(tmp[i].className == this.class_name)
			{
				this.recordCount += 1;
				this.itemWidth = tmp[i].offsetWidth;
			}
		}
		
		this.visibleCount = parseInt(this.elm.offsetWidth / this.itemWidth) * 1;
		
		this.totalWidth = this.itemWidth * this.recordCount;

		this.stepAmount = parseInt(this.itemWidth / this.stepCount);
		
		this.lastestLeft = this.totalWidth - this.itemWidth; //document.getElementById(this.elm.id + "_" + (this.recordCount - 1)).offsetLeft;
		
		this.showElmTotal();
		
		this.showElmActive();
	}
	
	this.showElmTotal = function()
	{
		if(this.elmTotal)
		{
			this.elmTotal.innerHTML = this.recordCount;
		}
	}
	
	this.showElmActive = function()
	{
		if(this.elmActive)
		{
			tmp = this.current * -1 + this.stepItemCount;
			if(tmp > this.recordCount)
				tmp = this.recordCount;
			
			this.elmActive.innerHTML = tmp;
		}
	}
	
	function _action()
	{

		if(!this.recordCount)
			return false;
		else if (this.visibleCount >= this.recordCount)
			return false;
		
		this._automatic();
		
	}
	
	function _go()
	{
		this.stepIndex++;
		
		if(this.stepIndex == this.stepCount)
		{
			_step = this.itemWidth - (this.stepCount * this.stepAmount) + this.stepAmount;
		}
		else
		{
			_step = this.stepAmount;
		}
		
		_step = _step * this.stepItemCount;
		
		for(i=0; i<this.recordCount; i++)
		{
			tmp = document.getElementById(this.elm.id + "_" + i).offsetLeft + _step * this.direction;
			if(tmp > this.lastestLeft)
			{
				tmp = _step - this.itemWidth;
			}
			
			document.getElementById(this.elm.id + "_" + i).style.left = tmp + "px";
		}
		if(this.stepIndex == this.stepCount)
		{
			this._clear();
		}
		else
		{
			this.timerIndex = setTimeout(this.name + "._go();", this.stepTime);
		}
		
		this.showElmActive();
	}
	function go(direction, automatic)
	{
		if(!this.goStatus)
			return;
		
		/*if(this.current * direction + this.stepItemCount >= this.recordCount)
		{
			return false;
		}*/
		
		if(!automatic){
			this._clearAutomaticTimer();
		}

		if(this.current + direction > 0)
			return false;

		if((this.recordCount - this.visibleCount) < Math.abs(this.current + direction))
			return false;

		this.goStatus = false;
		
		this.direction = direction;
		this.current += direction * this.stepItemCount;
		this._go();
	}
	
	function _clear()
	{
		this.stepIndex = 0;
		
		if(this.timerIndex != null)
			clearTimeout(this.timerIndex);
		this.timerIndex = null;

		this.goStatus = true;
	}
	
	function _clearAutomaticTimer()
	{
		if (this._automaticTimer != null)
			clearTimeout(this._automaticTimer);
		this._automaticTimer = null;		
	}
	
	function _automatic() {
		if(this.firstSlide)
		{
			var temp = setTimeout("this.go(this.direction, 1)", this._automaticStepTime);
			clearTimeout(temp);
			this.firstSlide = false;
		}
		else
		{
			this._checkStatus();
			this.go(this.direction, 1);
		}
		this._automaticTimer = setTimeout(this.name + "._automatic();", this._automaticStepTime);
	}

	function _checkStatus()
	{
		var index = this.recordCount - this.visibleCount;
		
		if(this.current == -(index) )
			this.direction = 1;
		else if(this.current== 0)
			this.direction = -1;	
	}
}
v_font = 'Verdana';
v_fontSize = '11px';
v_fontSizeNS4 = '11px';
v_fontWeight = 'normal';
v_fontColor = '#ffffff';
v_textDecoration = 'none';
v_fontColorHover = '#ffff00';
v_textDecorationHover = 'none';
v_bgColor = 'transparent';
v_top = 0;
v_left = 0;
v_width = 400;
v_height = 14;
v_paddingTop = 0;
v_paddingLeft = 4;
v_position = 'absolute';
v_timeout = 2500;
v_slideSpeed = 30;
v_slideDirection = 0;
v_pauseOnMouseOver = true;
v_slideStep = 4;
v_textAlign = 'left';
v_textVAlign = 'middle';

v_ua = navigator.userAgent;
v_nS4 = document.layers ? 1 : 0;
v_iE = document.all && !window.innerWidth && v_ua.indexOf("MSIE") !=  - 1 ? 1 : 0;
v_oP = v_ua.indexOf("Opera") !=  - 1 && document.clear ? 1 : 0;
v_oP7 = v_oP && document.appendChild ? 1 : 0;
v_oP4 = v_ua.indexOf("Opera") !=  - 1 && !document.clear;
v_kN = v_ua.indexOf("Konqueror") !=  - 1 && parseFloat(v_ua.substring(v_ua.indexOf("Konqueror/") + 10)) < 3.1 ? 1 : 0;
v_cur = 1;
v_cl = 0;
v_d = v_slideDirection ?  - 1: 1;
v_TIM = 0;
v_fontSize2 = v_nS4 && navigator.platform.toLowerCase().indexOf("win") !=  - 1 ? v_fontSizeNS4 : v_fontSize;
v_canPause = 0;

function v_getOS(a)
{
	return v_iE ? document.all[a].style: v_nS4 ? document.layers["v_container"].document.layers[a]: document.getElementById(a).style
}
function v_start()
{
	var o, px;
	o = v_getOS("v_1");
	px = v_oP && !v_oP7 || v_nS4 ? 0 : "px";
	if (parseInt(o.top) == v_paddingTop)
	{
		v_canPause = 1;
		if (v_count > 1)
			v_TIM = setTimeout("v_canPause=0;v_slide()", v_timeout);
		return 
	}
	o.top = (parseInt(o.top) - v_slideStep * v_d) * v_d > v_paddingTop * v_d ? parseInt(o.top) - v_slideStep * v_d + px: v_paddingTop + px;
	if (v_oP && o.visibility.toLowerCase() != "visible")
		o.visibility = "visible";
	setTimeout("v_start()", v_slideSpeed)
}

function v_slide()
{
	var o, o2, px;
	o = v_getOS("v_" + v_cur);
	o2 = v_getOS("v_" + (v_cur < v_count ? v_cur + 1: 1));
	px = v_oP && !v_oP7 || v_nS4 ? 0 : "px";
	if (parseInt(o2.top) == v_paddingTop)
	{
		if (v_oP)
			o.visibility = "hidden";
		o.top = v_height * v_d + px;
		v_cur = v_cur < v_count ? v_cur + 1: 1;
		v_canPause = 1;
		v_TIM = setTimeout("v_canPause=0;v_slide()", v_timeout);
		return ;
	}
	if (v_oP && o2.visibility.toLowerCase() != "visible")
		o2.visibility = "visible";
	if ((parseInt(o2.top) - v_slideStep * v_d) * v_d > v_paddingTop * v_d)
	{
		o.top = parseInt(o.top) - v_slideStep * v_d + px;
		o2.top = parseInt(o2.top) - v_slideStep * v_d + px
	}
	else
	{
		o.top =  - v_height * v_d + px;
		o2.top = v_paddingTop + px
	}
	setTimeout("v_slide()", v_slideSpeed)
}
function v_init()
{
	v_count = v_content.length;
	if (v_nS4 || v_iE || v_oP || document.getElementById && !v_kN && !v_oP4)
	{
		document.write("<style>.vnewsticker,a.vnewsticker{font-family:" + v_font + ";font-size:" + v_fontSize2 + ";color:" + v_fontColor + ";text-decoration:" + v_textDecoration + ";font-weight:" + v_fontWeight + "}a.vnewsticker:hover{font-family:" + v_font + ";font-size:" + v_fontSize2 + ";color:" + v_fontColorHover + ";text-decoration:" + v_textDecorationHover + "}</style>");
		v_temp = "<div " + (v_nS4 ? "name" : "id") + "=v_container style='position:" + v_position + ";top:" + v_top + "px;left:" + v_left + "px;width:" + v_width + "px;height:" + v_height + "px;background:" + v_bgColor + ";layer-background" + (v_bgColor.indexOf("url(") == 0 ? "-image" : "-color") + ":" + v_bgColor + ";clip:rect(0," + v_width + "," + v_height + ",0);overflow:hidden'>" + (v_iE ? "<div style='position:absolute;top:0px;left:0px;width:100%;height:100%;clip:rect(0," + v_width + "," + v_height + ",0)'>": "");
		for (v_i = 0; v_i < v_count; v_i++)
			v_temp += "<div " + (v_nS4 ? "name" : "id") + "=v_" + (v_i + 1) + " style='position:absolute;top:" + (v_height * v_d) + "px;left:" + v_paddingLeft + "px;width:" + (v_width - v_paddingLeft * 2) + "px;height:" + (v_height - v_paddingTop * 2) + "px;clip:rect(0," + (v_width - v_paddingLeft * 2) + "," + (v_height - v_paddingTop * 2) + ",0);overflow:hidden" + (v_oP ? ";visibility:hidden" : "") + ";text-align:" + v_textAlign + "' class=vnewsticker>" + (!v_nS4 ? "<table width=" + (v_width - v_paddingLeft * 2) + " height=" + (v_height - v_paddingTop * 2) + " cellpadding=0 cellspacing=0 border=0><tr><td width=" + (v_width - v_paddingLeft * 2) + " height=" + (v_height - v_paddingTop * 2) + " align=" + v_textAlign + " valign=" + v_textVAlign + " class=vnewsticker>": "") + (v_content[v_i][0] != "" ? "<a href='" + v_content[v_i][0] + "' class=vnewsticker" + (v_pauseOnMouseOver ? " onmouseover='if(v_canPause&&v_count>1){clearTimeout(v_TIM);v_cl=1};window.status=\"\";return true' onmouseout='if(v_canPause&&v_count>1&&v_cl)v_TIM=setTimeout(\"v_canPause=0;v_slide();v_cl=0\"," + v_timeout + ")' onmouseover='if(v_canPause&&v_count>1){clearTimeout(v_TIM);v_cl=1};window.status=\"" + v_content[v_i][1] + "\";return true'": "") + ">": "<span" + (v_pauseOnMouseOver ? " onmouseover='if(v_canPause&&v_count>1){clearTimeout(v_TIM);v_cl=1}' onmouseout='if(v_canPause&&v_count>1&&v_cl)v_TIM=setTimeout(\"v_canPause=0;v_slide();v_cl=0\"," + v_timeout + ")'": "") + "><span class=time>") + v_content[v_i][1] + "</span> - <b>" + v_content[v_i][2] + '</b>' + (v_content[v_i][0] != "" ? "</a>" : "</span>") + (!v_nS4 ? "</td></tr></table>" : "") + "</div>";
		v_temp += (v_iE ? "</div>" : "") + "</div>";
		document.write(v_temp);
		setTimeout("v_start()", 1000);
		if (v_nS4)
		onresize = function()
		{
			location.reload()
		}
	}
}
function setLiveImsakiye(order)
{
	now    = new Date();
	hour   = now.getHours();
	minute = now.getMinutes();
	second = now.getSeconds();
	if (hour == 0 && minute == 0 && second >= 0 && second < 3)
	{
		window.location = window.location;
		return;
	}
	
	if (hour < 6)
	{
		caption = 'SAHUR SON DAKİKA';
		arrTime = imsTime;
		arrProv = imsProv;
		cls		= 'imsak';
		type    = 1;
	}
	else
	{
		caption = 'İFTAR SON DAKİKA';
		arrTime = iftTime;
		arrProv = iftProv;
		cls		= 'iftar';
		type    = 2;
	}
		
	if (hour < 10)
		hour = '0' + hour;
	if (minute < 10)
		minute = '0' + minute;
	if (second < 10)
		second = '0' + second;

	if (remTime == 1)
		col = 3;
	else
		col = 2;
	str = '<div class="live_imsakiye_container">';
	str += '<table cellpadding="0" cellspacing="1" border="0" class="live_imsakiye">';
		str += '<tr>';
			str += '<td class="header" colspan="' + col + '">' + caption + '</td>';
		str += '</tr>';
		cnt = 0;
		for (i = 0; i < 81; i++)
		{
			if (arrProv[i])
			{
				timeNow = hour + ':' + minute;
				if (timeNow <= arrTime[i])
				{
					if (timeNow == arrTime[i])
						cl = ' class="highlight"';
					else
						cl = '';
						
					str += '<tr' + cl + '>';
						str += '<td>' + arrProv[i] + '</td>';
						str += '<td class="' + cls + '">' + arrTime[i] + '</td>';
						if (remTime == 1)
							str += '<td>' + getRemainingTime(timeNow, arrTime[i], type) + '</td>';
					str += '</tr>';
					cnt++;
				}
			}
			if (cnt == cntCity)
				break;
		}
		if (cnt == 0)
		{
			if (type == 1)
				msg = 'Tüm illerde imsak vakti geçmiştir.<br>İftarda Buluşmak Üzere...';
			else
				msg = 'Tüm illerde iftar vakti geçmiştir.<br>Sahurda Buluşmak Üzere...';
			str += '<tr><td colspan="' + col + '">' + msg + '</td></tr>';
		}
		if (hasIms)
			str += '<tr><td colspan="' + col + '" align="center" style="border-width: 0px;"><a href="' + imsUrl + '">Tüm İllerin İmsakiyeleri</a></td></tr>';
	str += '</table>';
	str += '</div>';
	document.getElementById('live_imsakiye').innerHTML = str;
	if (order == 1)
		setTimeout('setLiveImsakiye(2)', 60000 - second * 1000);
	else if (order == 2)
		setInterval('setLiveImsakiye(0)', 60000);
}
function getRemainingTime(time1, time2, type)
{
	if (time1 == time2)
	{
		if (type == 1)
			return 'İmsak Vakti';
			
		return 'İftar Vakti';
	}
		
	hour1 = time1.substring(0,2);
	min1  = time1.substring(3,5);
	hour2 = time2.substring(0,2);
	min2  = time2.substring(3,5);
	
	if (hour1 == hour2)
		return (min2 - min1) + ' dk kaldı';
		
	if (min1 > min2)
	{
		hour1 = (hour1 * 1) + 1;
		min2  = (min2 * 1) + 60;
	}
	
	sa = '';
	if (hour2 > hour1)
		sa = (hour2 - hour1) + ' sa ';
		
	dk = '';
	if (min2 > min1)
		dk = (min2 - min1) + ' dk ';
		
	return sa + dk + ' kaldı';
}
/**/
function setIndexInterview(no)
{
	document.getElementById('interview_link').href = arrInterviewLink[no];
	document.getElementById('interview_image').src = arrInterviewImage[no];
	document.getElementById('interview_number_' + prevInterviewNo).className = 'number';
	document.getElementById('interview_number_' + no).className = 'number number_eff';
	prevInterviewNo = no;
}
function setIndexTwitul(no)
{
	document.getElementById('twitul_link').href = arrTwitulLink[no];
	document.getElementById('twitul_image').src = arrTwitulImage[no];
	document.getElementById('twitul_number_' + prevTwitulNo).className = 'number';
	document.getElementById('twitul_number_' + no).className = 'number number_eff';
	prevTwitulNo = no;
}
/**/
function setMainMenuRow2()
{
	elm = document.getElementById('main_menu_row2');
	baseTop = document.getElementById('base_top');
	if (elm.style.display == 'block')
	{
		baseTop.style.height = '260px';
		elm.style.display = 'none';
	}
	else
	{
		baseTop.style.height = '280px';
		elm.style.display = 'block';
	}
}
/**/
var _point = 0;
function rateGallery(idx, point, mod)
{
	document.getElementById("vote_iframe").src = mod + "_vote.php?id=" + idx + "&point=" + point;
	_point = point;
	alert(_point);
}
function redraw(point_sum, point_count)
{
	elm = window.frames["vote_iframe"].document.body.getElementsByTagName("div");
	if(!elm.length)
		return;
	
	if(elm[0].innerHTML == "0")
		return;
	
	document.getElementById("current_rating").style.width = (((point_sum * 1 + _point) / (point_count * 1 + 1) ) * 16) + "px";
}
/**/
function showNewsTargetChk()
{
	if (Get_Cookie('chk_news_target') == '1')
		chk = ' checked';
	else
		chk = '';
	document.write('<input type="checkbox" id="chk_news_target"' + chk + ' onclick="setNewsTarget();" /> Haberler farklı pencerede açılsın');
}
var pattern = /-[0-9]+h\.htm/;
function setNewsTarget()
{
	val = document.getElementById('chk_news_target').checked;
	if (val)
	{
		cookie = 1;
		target = '_blank';
	}
	else
	{
		cookie = 0;
		target = '_self';
	}
	items = document.getElementsByTagName('a');
	for (i = 0; i < items.length; i++)
	{
		if(items[i].rel == 'adv')
		{
			continue;
		}

		if (pattern.exec(items[i].href))
		{
			items[i].target = target;
		}
	}
	Set_Cookie('chk_news_target', cookie, 7 * 24 * 3600, '', '', '');
}
/**/
function setGalleryDetailLinks()
{
	if (window.name == '')
	{
		elm = document.getElementById('g_link_logo');
		elm.href = './';
		elm.onclick = '';
		elm = document.getElementById('g_link_gallery');
		elm.href = 'foto-galeri.htm';
		elm.onclick = '';
		elm = document.getElementById('g_link_video');
		elm.href = 'video-galeri.htm';
		elm.onclick = '';
		elm = document.getElementById('g_link_close');
		elm.href = './';
		elm.onclick = '';
	}
	
	return false;
}
function changeGalleryDetailLink(url)
{
	window.location = url;
	return false;
}
function popGallery(link)
{
	width	= 1120;
	height	= screen.height;
	win		= window.open(link, 'ih_gallery', 'width=' + width + ',height=' + height + ',scrollbars=1,resizable=0');
	win.moveTo(screen.width - width, 0);
	return false;
}
function setGalleryDetailImage()
{
	maxW		= 550;
	maxH		= screen.height * 390 / 800;
	img			= document.getElementById('ih_gallery_image');
	width		= img.offsetWidth;
	height		= img.offsetHeight;
	ch			= 0;
	if (width > maxW)
	{
		height	= Math.round(height * maxW / width);
		width	= maxW;
		ch		= 1;
	}
	if (height > maxH)
	{
		width	= Math.round(width * maxH / height);
		height	= maxH;
		ch		= 1;
	}
	if (ch)
	{
		img.width	= width - 14; //(-14: img.padding)
		img.height	= height - 14;
	}
}
/**/
function gemius_parameters() {
        var d=document;
        var href=new String(d.location.href);
        var ref;
        var f=0;
        var fv='-';
        if (d.referrer) { ref=new String(d.referrer); } else { ref=''; }
        if (typeof Error!='undefined') {
                var fo;
                eval('try { f=(d==top.document)?1:2; if (typeof top.document.referrer=="string") { ref=top.document.referrer } } catch(e) {f=3;}');
                eval('try { fv=navigator.plugins["Shockwave Flash"].description; } catch (e) {}');
                eval('if (typeof ActiveXObject!="undefined") { try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch(e) { try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); fv="X"; fo.AllowScriptAccess="always"; } catch(e) { if (fv=="X") { fv="WIN 6,0,20,0"; }} try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch(e) {} } if ((fv=="-" || fv=="X") && fo) { fv=fo.GetVariable("$version"); }}');
        }
        var url='&fr='+f+'&fv='+escape(fv)+'&tz='+(new Date()).getTimezoneOffset()+'&href='+escape(href.substring(0,499))+'&ref='+escape(ref.substring(0,499));
        if (screen) {
                var s=screen;
                if (s.width) url+='&screen='+s.width+'x'+s.height;
                if (s.colorDepth) url+='&col='+s.colorDepth;
        }
        return url;
}
function gemius_add_onload_event(obj,fn) {
        if (obj.attachEvent) {
                obj.attachEvent('onload', fn);
        } else if(obj.addEventListener) {
                obj.addEventListener('load', fn, false);
        }
}
function gemius_append_script(xp_url) {
        if (typeof Error!='undefined') {
                eval('try { xp_javascript=document.createElement("script"); xp_javascript.src=xp_url; xp_javascript.type="text/javascript"; xp_javascript.defer=true; document.body.appendChild(xp_javascript); } catch(e) {}');
        }
}
function gemius_obj_loaded() {
        window.pp_gemius_loaded+=1;
        if (window.pp_gemius_loaded==2 && window.pp_gemius_image.width && window.pp_gemius_image.width>1) {
                gemius_append_script(window.pp_gemius_script);
        }
}
var pp_gemius_proto = (document.location && document.location.protocol && document.location.protocol=='https:')?'https://':'http://';
if (typeof pp_gemius_hitcollector == 'undefined') {
        if (typeof gemius_hitcollector != 'undefined') {
                pp_gemius_hitcollector = gemius_hitcollector;
        } else {
                pp_gemius_hitcollector = 'gatr.hit.gemius.pl';
        }
}
var pp_gemius_host = pp_gemius_proto+pp_gemius_hitcollector+'/_';
if (typeof pp_gemius_nhit == 'undefined') {
        if (typeof pp_gemius_identifier == 'undefined') {
                if (typeof gemius_identifier != 'undefined') {
                        pp_gemius_identifier = gemius_identifier;
                        gemius_identifier = 'USED_'+gemius_identifier;
                } else {
                        pp_gemius_identifier = '';
                }
        }
        if (typeof window.pp_gemius_cnt != 'undefined') {
                if (typeof window.pp_gemius_images == 'undefined') {
                        window.pp_gemius_images = new Array();
                }
                var gemius_l = window.pp_gemius_images.length;
                window.pp_gemius_images[gemius_l]=new Image();
                window.pp_gemius_images[gemius_l].src = pp_gemius_host+(new Date()).getTime()+'/redot.gif?l=33&id=ERR_'+pp_gemius_identifier.replace(/id=/,'id=ERR_')+gemius_parameters();
        } else {
                if (typeof pp_gemius_mode == 'undefined') {
                        window.pp_gemius_loaded = 0;
                        window.pp_gemius_script = pp_gemius_host+(new Date()).getTime()+'/pp.js?id='+pp_gemius_identifier;
                        gemius_add_onload_event(window,gemius_obj_loaded);
                        window.pp_gemius_image = new Image();
                        gemius_add_onload_event(window.pp_gemius_image,gemius_obj_loaded);
                        window.pp_gemius_image.src = pp_gemius_host+(new Date()).getTime()+'/rexdot.gif?l=30&id='+pp_gemius_identifier+gemius_parameters();
                        window.pp_gemius_cnt = 1;
                } else {
                        window.pp_gemius_image = new Image();
                        window.pp_gemius_image.src = pp_gemius_host+(new Date()).getTime()+'/rexdot.gif?l=31&id='+pp_gemius_identifier+gemius_parameters();
                        window.pp_gemius_cnt = 1;
                }
        }
        pp_gemius_identifier = 'USED_'+pp_gemius_identifier;
}
function pp_gemius_hit_int(list,rfrom,rto) {
        var gu = pp_gemius_host+(new Date()).getTime()+'/redot.gif?l=32';
        if (typeof window.xgemius_prot_cnt == 'undefined') {
                window.xgemius_prot_cnt=0;
        }
        if (typeof xgemius_prot_cnt == 'undefined') {
                xgemius_prot_cnt=0;
        }
        if (window.xgemius_prot_cnt<=xgemius_prot_cnt) {
                go=1;
                window.xgemius_prot_cnt++;
        } else {
                go=0;
        }
        xgemius_prot_cnt++;
        for (var i=rfrom ; i<rto ; i++) {
                gu += '&id='+list[i];
        }
        gu += gemius_parameters();
        if (typeof window.gemius_hit_images == 'undefined') {
                window.gemius_hit_images = new Array();
        }
        var gl = window.gemius_hit_images.length;
        window.gemius_hit_images[gl]=new Image();
        if (go) {
                window.gemius_hit_images[gl].src = gu;
        } else {
                window.gemius_hit_images[gl].src = gu.replace(/id=/,'id=DBL_');
        }
}
function pp_gemius_hit() {
        for (i=0 ; i<arguments.length ; i+=5) {
                if (i+5<arguments.length) {
                        pp_gemius_hit_int(arguments,i,i+5);
                } else {
                        pp_gemius_hit_int(arguments,i,arguments.length);
                }
        }
}
if (typeof gemius_hit != 'function') {
        gemius_hit=pp_gemius_hit;
}

