//son dakika start-------------------------------------------------


function startTicker() {  

theItemCount = haberler.length;
theCurrentStory     = -1;  
theCurrentLength    = 0;  
 
if (document.getElementById) {        
theAnchorObject     = document.getElementById("sondakikaAnchor");    
runTheTicker();        
}  else {
             document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}<\/style>");
             return true;  
} 
} 

function runTheTicker() {  
var myTimeout;    
 
if(theCurrentLength == 0)  {   
theCurrentStory++;   
theCurrentStory      = theCurrentStory % theItemCount;   
theStorySummary      = haberler[theCurrentStory].replace(/&quot;/g,'"');     
theTargetLink        = haberlink[theCurrentStory];   
theAnchorObject.href = theTargetLink;   
thePrefix       = "";  
}  

theAnchorObject.innerHTML = thePrefix +   theStorySummary.substring(0,theCurrentLength) + whatWidget();  

if(theCurrentLength != theStorySummary.length)  {   
theCurrentLength++;   myTimeout = theCharacterTimeout;  
}  else  {   
theCurrentLength = 0;   
myTimeout = theStoryTimeout;  } 
 
setTimeout("runTheTicker()", myTimeout); } 

function whatWidget() {  
if(theCurrentLength == theStorySummary.length)  {   
return theWidgetNone;  
}   
if((theCurrentLength % 2) == 1)  {   return theWidgetOne;  }  else  {   return theWidgetTwo;  } } 

var theCharacterTimeout = 50;  
var theStoryTimeout     = 5000;  
var theWidgetOne        = "_";  
var theWidgetTwo        = "-";  
var theWidgetNone       = "";  
var theLeadString       = "";   
var haberler = new Array();  
var haberlink = new Array();   
var theItemCount;
//son dakika end------------------------------------------------- 

var sectionnames = new Array();  
var sectionlinks = new Array();
var pollHref = "http://www.bugun.com.tr/dynamics/anket/anketsonuc.aspx";

//anket start----------------------------------------------------
function validatePoll(objForm,ChoiceCount,pollID)
{
selectedChoice =-1;
var PollForm = document.getElementById(objForm);

for (i=0;i<ChoiceCount;i++) 
{
	if (PollForm.choice[i].checked) {
		selectedChoice=i;
		break;
	}
}

openstr= pollHref + "?pid=" + pollID;

if (selectedChoice!=-1) 
{
	openstr = openstr + '&choice=' + PollForm.choice[selectedChoice].value;
}

window.open(openstr,'pollPopup','left=100,top=100,toolbar=no,location=no,menubar=no,status=no,directories=no,scrollbars=yes,resizable=yes,width=600,height=350');
}

function pollResult(pollID) {

window.open(''+ pollHref +'?pid='+ pollID +'','anket','left=100,top=100,toolbar=no,location=no,menubar=no,status=no,directories=no,scrollbars=yes,resizable=yes,width=600,height=350');
}

function popupPrint(url)
{
window.open(url,'PrintSayfasi','left=100,top=100,toolbar=no,location=no,menubar=no,status=no,directories=no,scrollbars=yes,resizable=no,width=600,height=550');
}

function popupComments(url)
{
window.open(url,'Yorumlar','left=100,top=100,toolbar=no,location=no,menubar=no,status=no,directories=no,scrollbars=yes,resizable=no,width=600,height=550');
}

function popupFriend(url)
{
window.open(url,'Arkadas','left=100,top=100,toolbar=no,location=no,menubar=no,status=no,directories=no,scrollbars=yes,resizable=no,width=600,height=550');
}

function hizlierisim(url)
{
	window.location.href=url;
}
	

//anket end----------------------------------------------------



