﻿var slideShowSpeedgf = 5000;
var bUrl="/";
var tgf=0;var cUrl="";
var mydate=new Date();
var g=mydate.getDate();
if(g<10){
g='0' + g;
}else{
g=g;
}
var m=mydate.getMonth() + 1;
if(m<10){
m='0' + m;
}else{
m=m
}

var tarih= '/' + mydate.getFullYear() + '/' + m + '/' + g

// Duration of crossfade (seconds)
var crossFadeDurationgf = 0.5;
// Specify the image files
//var Pic = new Array(); //thumbnailler
var PicBigf=new Array();
var PicSf=new Array();
var ustgf=new Array();
var altgf=new Array();
var linkgf_ = new Array();
var brs = document.location.href;
if (brs.split("/").length > 4) {
    tarih = "/" + brs.split("/")[3] + "/" + brs.split("/")[4] + "/" + brs.split("/")[5];
}
// to add more images, just continue
// the pattern, adding to the array below
var xmlDoc2gf=loadXML(tarih + '/xml/manset.xml')
if(navigator.appName=="Microsoft Internet Explorer"){
PicBigf[0] = bUrl + xmlDoc2gf.childNodes[0].attributes.getNamedItem("gorsel").value
PicBigf[1] =bUrl + xmlDoc2gf.childNodes[1].attributes.getNamedItem("gorsel").value
PicBigf[2] =bUrl + xmlDoc2gf.childNodes[2].attributes.getNamedItem("gorsel").value
PicBigf[3] =bUrl + xmlDoc2gf.childNodes[3].attributes.getNamedItem("gorsel").value
PicBigf[4] =bUrl + xmlDoc2gf.childNodes[4].attributes.getNamedItem("gorsel").value
PicBigf[5] = bUrl + xmlDoc2gf.childNodes[5].attributes.getNamedItem("gorsel").value
PicBigf[6] =bUrl + xmlDoc2gf.childNodes[6].attributes.getNamedItem("gorsel").value
PicBigf[7] =bUrl + xmlDoc2gf.childNodes[7].attributes.getNamedItem("gorsel").value
PicBigf[8] =bUrl + xmlDoc2gf.childNodes[8].attributes.getNamedItem("gorsel").value
PicBigf[9] =bUrl + xmlDoc2gf.childNodes[9].attributes.getNamedItem("gorsel").value
PicBigf[10]=bUrl + xmlDoc2gf.childNodes[10].attributes.getNamedItem("gorsel").value

ustgf[0]=xmlDoc2gf.childNodes[0].attributes.getNamedItem("ustBaslik").value
ustgf[1]=xmlDoc2gf.childNodes[1].attributes.getNamedItem("ustBaslik").value
ustgf[2]=xmlDoc2gf.childNodes[2].attributes.getNamedItem("ustBaslik").value
ustgf[3]=xmlDoc2gf.childNodes[3].attributes.getNamedItem("ustBaslik").value
ustgf[4]=xmlDoc2gf.childNodes[4].attributes.getNamedItem("ustBaslik").value
ustgf[5]=xmlDoc2gf.childNodes[5].attributes.getNamedItem("ustBaslik").value
ustgf[6]=xmlDoc2gf.childNodes[6].attributes.getNamedItem("ustBaslik").value
ustgf[7]=xmlDoc2gf.childNodes[7].attributes.getNamedItem("ustBaslik").value
ustgf[8]=xmlDoc2gf.childNodes[8].attributes.getNamedItem("ustBaslik").value
ustgf[9]=xmlDoc2gf.childNodes[9].attributes.getNamedItem("ustBaslik").value
ustgf[10]=xmlDoc2gf.childNodes[10].attributes.getNamedItem("ustBaslik").value

altgf[0]=xmlDoc2gf.childNodes[0].attributes.getNamedItem("altBaslik").value
altgf[1]=xmlDoc2gf.childNodes[1].attributes.getNamedItem("altBaslik").value
altgf[2]=xmlDoc2gf.childNodes[2].attributes.getNamedItem("altBaslik").value
altgf[3]=xmlDoc2gf.childNodes[3].attributes.getNamedItem("altBaslik").value
altgf[4]=xmlDoc2gf.childNodes[4].attributes.getNamedItem("altBaslik").value
altgf[5]=xmlDoc2gf.childNodes[5].attributes.getNamedItem("altBaslik").value
altgf[6]=xmlDoc2gf.childNodes[6].attributes.getNamedItem("altBaslik").value
altgf[7]=xmlDoc2gf.childNodes[7].attributes.getNamedItem("altBaslik").value
altgf[8]=xmlDoc2gf.childNodes[8].attributes.getNamedItem("altBaslik").value
altgf[9]=xmlDoc2gf.childNodes[9].attributes.getNamedItem("altBaslik").value
altgf[10]=xmlDoc2gf.childNodes[10].attributes.getNamedItem("altBaslik").value


linkgf_[0]=cUrl + xmlDoc2gf.childNodes[0].attributes.getNamedItem("link").value
linkgf_[1]=cUrl + xmlDoc2gf.childNodes[1].attributes.getNamedItem("link").value
linkgf_[2]=cUrl + xmlDoc2gf.childNodes[2].attributes.getNamedItem("link").value
linkgf_[3]=cUrl + xmlDoc2gf.childNodes[3].attributes.getNamedItem("link").value
linkgf_[4]=cUrl + xmlDoc2gf.childNodes[4].attributes.getNamedItem("link").value
linkgf_[5]=cUrl + xmlDoc2gf.childNodes[5].attributes.getNamedItem("link").value
linkgf_[6]=cUrl + xmlDoc2gf.childNodes[6].attributes.getNamedItem("link").value
linkgf_[7]=cUrl + xmlDoc2gf.childNodes[7].attributes.getNamedItem("link").value
linkgf_[8]=cUrl + xmlDoc2gf.childNodes[8].attributes.getNamedItem("link").value
linkgf_[9]=cUrl + xmlDoc2gf.childNodes[9].attributes.getNamedItem("link").value
linkgf_[10]=cUrl + xmlDoc2gf.childNodes[10].attributes.getNamedItem("link").value
}else{
var xmlDoc2gxf=xmlDoc2gf.getElementsByTagName("manset")[0].childNodes;
PicBigf[0] =bUrl + xmlDoc2gxf[0].getAttribute("gorsel")
PicBigf[1] =bUrl + xmlDoc2gxf[1].getAttribute("gorsel")
PicBigf[2] =bUrl + xmlDoc2gxf[2].getAttribute("gorsel")
PicBigf[3] =bUrl + xmlDoc2gxf[3].getAttribute("gorsel")
PicBigf[4] =bUrl + xmlDoc2gxf[4].getAttribute("gorsel")
PicBigf[5] =bUrl + xmlDoc2gxf[5].getAttribute("gorsel")
PicBigf[6] =bUrl + xmlDoc2gxf[6].getAttribute("gorsel")
PicBigf[7] =bUrl + xmlDoc2gxf[7].getAttribute("gorsel")
PicBigf[8] =bUrl + xmlDoc2gxf[8].getAttribute("gorsel")
PicBigf[9] =bUrl + xmlDoc2gxf[9].getAttribute("gorsel")
PicBigf[10]=bUrl + xmlDoc2gxf[10].getAttribute("gorsel")

ustgf[0]=xmlDoc2gxf[0].getAttribute("ustBaslik")
ustgf[1]=xmlDoc2gxf[1].getAttribute("ustBaslik")
ustgf[2]=xmlDoc2gxf[2].getAttribute("ustBaslik")
ustgf[3]=xmlDoc2gxf[3].getAttribute("ustBaslik")
ustgf[4]=xmlDoc2gxf[4].getAttribute("ustBaslik")
ustgf[5]=xmlDoc2gxf[5].getAttribute("ustBaslik")
ustgf[6]=xmlDoc2gxf[6].getAttribute("ustBaslik")
ustgf[7]=xmlDoc2gxf[7].getAttribute("ustBaslik")
ustgf[8]=xmlDoc2gxf[8].getAttribute("ustBaslik")
ustgf[9]=xmlDoc2gxf[9].getAttribute("ustBaslik")
ustgf[10]=xmlDoc2gxf[10].getAttribute("ustBaslik")

altgf[0]=xmlDoc2gxf[0].getAttribute("altBaslik")
altgf[1]=xmlDoc2gxf[1].getAttribute("altBaslik")
altgf[2]=xmlDoc2gxf[2].getAttribute("altBaslik")
altgf[3]=xmlDoc2gxf[3].getAttribute("altBaslik")
altgf[4]=xmlDoc2gxf[4].getAttribute("altBaslik")
altgf[5]=xmlDoc2gxf[5].getAttribute("altBaslik")
altgf[6]=xmlDoc2gxf[6].getAttribute("altBaslik")
altgf[7]=xmlDoc2gxf[7].getAttribute("altBaslik")
altgf[8]=xmlDoc2gxf[8].getAttribute("altBaslik")
altgf[9]=xmlDoc2gxf[9].getAttribute("altBaslik")
altgf[10]=xmlDoc2gxf[10].getAttribute("altBaslik")

linkgf_[0]=cUrl + xmlDoc2gxf[0].getAttribute("link")
linkgf_[1]=cUrl + xmlDoc2gxf[1].getAttribute("link")
linkgf_[2]=cUrl + xmlDoc2gxf[2].getAttribute("link")
linkgf_[3]=cUrl + xmlDoc2gxf[3].getAttribute("link")
linkgf_[4]=cUrl + xmlDoc2gxf[4].getAttribute("link")
linkgf_[5]=cUrl + xmlDoc2gxf[5].getAttribute("link")
linkgf_[6]=cUrl + xmlDoc2gxf[6].getAttribute("link")
linkgf_[7]=cUrl + xmlDoc2gxf[7].getAttribute("link")
linkgf_[8]=cUrl + xmlDoc2gxf[8].getAttribute("link")
linkgf_[9]=cUrl + xmlDoc2gxf[9].getAttribute("link")
linkgf_[10]=cUrl + xmlDoc2gxf[10].getAttribute("link")
}
// do not edit anything below this line
function goURL(s){
  window.open(linkgf_[s]);
}
var tgf;
var jgf = 0;
var bbgf=0;
var ssgf=0;
var pgf = PicBigf.length;
var preLoadgf = new Array();
var preLoad1gf=new Array();
var preLoad2gf=new Array();
var preLoad3gf=new Array();
for (i = 0; i < pgf; i++) {
preLoadgf[i] = new Image();
preLoadgf[i].src = PicBigf[i];
preLoad1gf[i]=ustgf[i];
preLoad2gf[i]=altgf[i];
preLoad3gf[i]=linkgf_[i];
}
function runSlideShowgf() {
document.getElementById("anaImgf").src = preLoadgf[jgf].src;
if(preLoad1gf[jgf]==""){
document.getElementById("hpustb").innerHTML="&nbsp;";
}else{
document.getElementById("hpustb").innerHTML=preLoad1gf[jgf];
}
document.getElementById("hpustb").href=preLoad3gf[jgf];
document.getElementById("hpaltb").innerHTML=preLoad2gf[jgf];
document.getElementById("hpaltb").href=preLoad3gf[jgf];

//document.getElementById("altBHyp").innerHTML=preLoad2gf[jgf];
document.getElementById("analinkf").href=preLoad3gf[jgf];
//document.getElementById("altBHyp").href=preLoad3gf[jgf];
//document.getElementById("ustBHyp").href=preLoad3gf[jgf];
for(kgf=0;kgf<=10;kgf++){
   if(kgf==jgf){
        ssgf=kgf;
		}
	}
for(bbgf=0;bbgf<=10;bbgf++){
document.getElementById("kutu" + bbgf).style.backgroundColor="#79969f";
}
//document.getElementById("r" + bbg).style.border="1px";
//document.getElementById("r" + ssg).style.borderColor="#ffffff";
//document.getElementById("abg" + ssg).style.backgroundColor="#b80000"
//document.getElementById("ubg" + ssg).style.backgroundColor="#b80000"
document.getElementById("kutu" + ssgf).style.backgroundColor="#ff9900";
jgf = jgf + 1;
if (jgf > (pgf - 1)) jgf = 0;
tgf = setTimeout('runSlideShowgf()', slideShowSpeedgf);
}
runSlideShowgf()
function clearTOutgf(){
clearTimeout(tgf);
}
function setTOutgf(){
tgf = setTimeout('runSlideShowgf()', slideShowSpeedgf);
}
function changeSpotgf(kgff){
document.getElementById("anaImgf").src = preLoadgf[kgff].src;
if(preLoad1gf[kgff]==""){
document.getElementById("hpustb").innerHTML="&nbsp;"
}else{
document.getElementById("hpustb").innerHTML=preLoad1gf[kgff];
}
document.getElementById("hpaltb").innerHTML=preLoad2gf[kgff];

//document.getElementById("altBHyp").innerHTML=preLoad2gf[kgff];
document.getElementById("analinkf").href=preLoad3gf[kgff];
document.getElementById("hpustb").href=preLoad3gf[kgff];
document.getElementById("hpaltb").href=preLoad3gf[kgff];
//document.getElementById("altBHyp").href=preLoad3gf[kgff];
//alert(document.getElementById("ustBaslik")) //.Attributes.Add("onclick","window.open('" + preLoad3g[kg] + "')");

for(ngf=0;ngf<=10;ngf++){
   if(ngf==kgff){
        sssgf=kgff;
		}
	}
for(bbbgf=0;bbbgf<=10;bbbgf++){
//document.getElementById("r" + bbbg).style.borderColor="#616161";
document.getElementById("kutu" + bbbgf).style.backgroundColor="#79969f";
}
//document.getElementById("r" + sssg).style.borderColor="#ff0000";
document.getElementById("kutu" + sssgf).style.backgroundColor="#ff9900";
}

