function createAjaxObj2(){
var httprequest=false
if (window.XMLHttpRequest){ // if Mozilla, Safari etc
httprequest=new XMLHttpRequest()
if (httprequest.overrideMimeType)
httprequest.overrideMimeType('text/xml')
}
else if (window.ActiveXObject){ // if IE
try {
httprequest=new ActiveXObject("Msxml2.XMLHTTP");
} 
catch (e){
try{
httprequest=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}
return httprequest
}
function ajax_ticker2(xmlfile2, divId2, divClass2, delay2, fadeornot2){
this.xmlfile2=xmlfile2 
this.tickerid2=divId2
this.delay2=delay2
this.mouseoverBol=0
this.pointer=0
this.opacitystring=(typeof fadeornot2!="undefined")? "width: 100%;" : ""
if (this.opacitystring!="") this.delay2+=500
this.opacitysetting=0.2
this.messages2=[]
this.ajaxobj2=createAjaxObj2()
document.write('<div id="'+divId2+'" class="hb1"><div style="'+this.opacitystring+'">Yükleniyor...</div></div>')
this.getxmlfile2()
}
ajax_ticker2.prototype.getxmlfile2=function(){
if (this.ajaxobj2){
var instanceOfTicker=this
var url=this.xmlfile2+"?bustcache="+new Date().getTime()
this.ajaxobj2.onreadystatechange=function(){instanceOfTicker.initialize()}
this.ajaxobj2.open('GET', url, true)
this.ajaxobj2.send(null)
}
}

ajax_ticker2.prototype.initialize=function(){ 
if (this.ajaxobj2.readyState == 4){
if (this.ajaxobj2.status==200 || window.location.href.indexOf("http")==-1){
this.contentdiv=document.getElementById(this.tickerid2).firstChild
var xmldata=this.ajaxobj2.responseText
this.contentdiv.style.display="none"
this.contentdiv.innerHTML=xmldata
if (this.contentdiv.getElementsByTagName("div").length==0){
this.contentdiv.innerHTML="Not Found !"
return
}
var instanceOfTicker=this
document.getElementById(this.tickerid2).onmouseover=function(){instanceOfTicker.mouseoverBol=1}
document.getElementById(this.tickerid2).onmouseout=function(){instanceOfTicker.mouseoverBol=0}
if (window.attachEvent)
window.attachEvent("onunload", function(){instanceOfTicker.contentdiv=instanceOfTicker.ajaxobj2=null})
for (var i=0; i<this.contentdiv.getElementsByTagName("div").length; i++){
if (this.contentdiv.getElementsByTagName("div")[i].className=="message2")
this.messages2[this.messages2.length]=this.contentdiv.getElementsByTagName("div")[i].innerHTML
}
this.contentdiv.innerHTML=""
this.contentdiv.style.display="block"
this.rotatemsg()
}
}
}
ajax_ticker2.prototype.rotatemsg=function(){
var instanceOfTicker=this
if (this.mouseoverBol==1)
setTimeout(function(){instanceOfTicker.rotatemsg()}, 100)
else{
this.fadetransition("reset")
this.contentdiv.innerHTML=this.messages2[this.pointer]
this.fadetimer2=setInterval(function(){instanceOfTicker.fadetransition('up', 'fadetimer2')}, 100)
this.pointer=(this.pointer<this.messages2.length-1)? this.pointer+1 : 0
setTimeout(function(){instanceOfTicker.rotatemsg()}, this.delay2)
}
}

ajax_ticker2.prototype.fadetransition=function(fadetype, timerid){
var contentdiv=this.contentdiv
if (fadetype=="reset")
this.opacitysetting=0.2
if (contentdiv.filters && contentdiv.filters[0]){
if (typeof contentdiv.filters[0].opacity=="number")
contentdiv.filters[0].opacity=this.opacitysetting*100
else
contentdiv.style.filter="alpha(opacity="+this.opacitysetting*100+")"
}
else if (typeof contentdiv.style.MozOpacity!="undefined" && this.opacitystring!=""){
contentdiv.style.MozOpacity=this.opacitysetting
}
else
this.opacitysetting=1
if (fadetype=="up")
this.opacitysetting+=0.1
if (fadetype=="up" && this.opacitysetting>=1)
clearInterval(this[timerid])
}

