﻿var slideShowSpeedgf = 5000;
var bUrl="/";
var tgf=0;
// 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();
// to add more images, just continue
// the pattern, adding to the array below
var xmlDoc2gf=loadXML('/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

PicSf[0] =bUrl + xmlDoc2gf.childNodes[0].attributes.getNamedItem("kucukGorsel").value
PicSf[1] =bUrl + xmlDoc2gf.childNodes[1].attributes.getNamedItem("kucukGorsel").value
PicSf[2] =bUrl + xmlDoc2gf.childNodes[2].attributes.getNamedItem("kucukGorsel").value
PicSf[3] =bUrl + xmlDoc2gf.childNodes[3].attributes.getNamedItem("kucukGorsel").value
PicSf[4] =bUrl + xmlDoc2gf.childNodes[4].attributes.getNamedItem("kucukGorsel").value
PicSf[5] =bUrl + xmlDoc2gf.childNodes[5].attributes.getNamedItem("kucukGorsel").value
PicSf[6] =bUrl + xmlDoc2gf.childNodes[6].attributes.getNamedItem("kucukGorsel").value
PicSf[7] =bUrl + xmlDoc2gf.childNodes[7].attributes.getNamedItem("kucukGorsel").value
PicSf[8] =bUrl + xmlDoc2gf.childNodes[8].attributes.getNamedItem("kucukGorsel").value
PicSf[9] =bUrl + xmlDoc2gf.childNodes[9].attributes.getNamedItem("kucukGorsel").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

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

linkgf_[0]=bUrl + xmlDoc2gf.childNodes[0].attributes.getNamedItem("link").value
linkgf_[1]=bUrl + xmlDoc2gf.childNodes[1].attributes.getNamedItem("link").value
linkgf_[2]=bUrl + xmlDoc2gf.childNodes[2].attributes.getNamedItem("link").value
linkgf_[3]=bUrl + xmlDoc2gf.childNodes[3].attributes.getNamedItem("link").value
linkgf_[4]=bUrl + xmlDoc2gf.childNodes[4].attributes.getNamedItem("link").value
linkgf_[5]=bUrl + xmlDoc2gf.childNodes[5].attributes.getNamedItem("link").value
linkgf_[6]=bUrl + xmlDoc2gf.childNodes[6].attributes.getNamedItem("link").value
linkgf_[7]=bUrl + xmlDoc2gf.childNodes[7].attributes.getNamedItem("link").value
linkgf_[8]=bUrl + xmlDoc2gf.childNodes[8].attributes.getNamedItem("link").value
linkgf_[9]=bUrl + xmlDoc2gf.childNodes[9].attributes.getNamedItem("link").value

}else{

var xmlDoc2gxf=xmlDoc2gf.documentElement.childNodes;
PicBigf[0] =bUrl + xmlDoc2gxf[1].attributes[3].nodeValue
PicBigf[1] =bUrl + xmlDoc2gxf[3].attributes[3].nodeValue
PicBigf[2] =bUrl + xmlDoc2gxf[5].attributes[3].nodeValue
PicBigf[3] =bUrl + xmlDoc2gxf[7].attributes[3].nodeValue
PicBigf[4] =bUrl + xmlDoc2gxf[9].attributes[3].nodeValue
PicBigf[5] =bUrl + xmlDoc2gxf[11].attributes[3].nodeValue
PicBigf[6] =bUrl + xmlDoc2gxf[13].attributes[3].nodeValue
PicBigf[7] =bUrl + xmlDoc2gxf[15].attributes[3].nodeValue
PicBigf[8] =bUrl + xmlDoc2gxf[17].attributes[3].nodeValue
PicBigf[9] =bUrl + xmlDoc2gxf[19].attributes[3].nodeValue
PicSf[0] =bUrl + xmlDoc2gxf[1].attributes[4].nodeValue
PicSf[1] =bUrl + xmlDoc2gxf[3].attributes[4].nodeValue
PicSf[2] =bUrl + xmlDoc2gxf[5].attributes[4].nodeValue
PicSf[3] =bUrl + xmlDoc2gxf[7].attributes[4].nodeValue
PicSf[4] =bUrl + xmlDoc2gxf[9].attributes[4].nodeValue
PicSf[5] =bUrl + xmlDoc2gxf[11].attributes[4].nodeValue
PicSf[6] =bUrl + xmlDoc2gxf[13].attributes[4].nodeValue
PicSf[7] =bUrl + xmlDoc2gxf[15].attributes[4].nodeValue
PicSf[8] =bUrl + xmlDoc2gxf[17].attributes[4].nodeValue
PicSf[9] =bUrl + xmlDoc2gxf[19].attributes[4].nodeValue

ustgf[0]=""
ustgf[1]=""
ustgf[2]=""
ustgf[3]=""
ustgf[4]=""
ustgf[5]=""
ustgf[6]=""
ustgf[7]=""
ustgf[8]=""
ustgf[9]=""

altgf[0]=""
altgf[1]=""
altgf[2]=""
altgf[3]=""
altgf[4]=""
altgf[5]=""
altgf[6]=""
altgf[7]=""
altgf[8]=""
altgf[9]=""

linkgf_[0]=bUrl + xmlDoc2gxf[1].attributes[5].nodeValue
linkgf_[1]=bUrl + xmlDoc2gxf[3].attributes[5].nodeValue
linkgf_[2]=bUrl + xmlDoc2gxf[5].attributes[5].nodeValue
linkgf_[3]=bUrl + xmlDoc2gxf[7].attributes[5].nodeValue
linkgf_[4]=bUrl + xmlDoc2gxf[9].attributes[5].nodeValue
linkgf_[5]=bUrl + xmlDoc2gxf[11].attributes[5].nodeValue
linkgf_[6]=bUrl + xmlDoc2gxf[13].attributes[5].nodeValue
linkgf_[7]=bUrl + xmlDoc2gxf[15].attributes[5].nodeValue
linkgf_[8]=bUrl + xmlDoc2gxf[17].attributes[5].nodeValue
linkgf_[9]=bUrl + xmlDoc2gxf[19].attributes[5].nodeValue
}
// do not edit anything below this line
for(i=0;i<=9;i++){
document.getElementById("imglf" + i).href=linkgf_[i];
document.getElementById("imgf" + i).src=PicSf[i];
}
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("ustBaslikf").style.display="block";
document.getElementById("ustBHyp").innerHTML=preLoad1gf[jgf];
}else{
document.getElementById("ustBaslikf").style.display="none";
document.getElementById("ustBHyp").innerHTML=""
}
//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<=9;kgf++){
   if(kgf==jgf){
        ssgf=kgf;
		}
	}
for(bbgf=0;bbgf<=9;bbgf++){
document.getElementById("okf" + bbgf).style.visibility="hidden";
document.getElementById("t" + bbgf).style.backgroundColor="#000000";
document.getElementById("tt" + bbgf).style.backgroundColor="#000000";
}
//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("okf" + ssgf).style.visibility="visible";
document.getElementById("t" + ssgf).style.backgroundColor="#666666";
document.getElementById("tt" + ssgf).style.backgroundColor="#666666";
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("ustBaslikf").style.display="block";
document.getElementById("ustBHyp").innerHTML=preLoad1gf[kgff];
}else{
document.getElementById("ustBHyp").innerHTML="";
document.getElementById("ustBaslikf").style.display="none";
}
//document.getElementById("altBHyp").innerHTML=preLoad2gf[kgff];
document.getElementById("analinkf").href=preLoad3gf[kgff];
document.getElementById("ustBHyp").href=preLoad3gf[kgff];
//document.getElementById("altBHyp").href=preLoad3gf[kgff];
//alert(document.getElementById("ustBaslik")) //.Attributes.Add("onclick","window.open('" + preLoad3g[kg] + "')");

for(ngf=0;ngf<=9;ngf++){
   if(ngf==kgff){
        sssgf=kgff;
		}
	}
for(bbbgf=0;bbbgf<=9;bbbgf++){
//document.getElementById("r" + bbbg).style.borderColor="#616161";
document.getElementById("okf" + bbbgf).style.visibility="hidden";
document.getElementById("t" + bbbgf).style.backgroundColor="#000000";
document.getElementById("tt" + bbbgf).style.backgroundColor="#000000";
}
//document.getElementById("r" + sssg).style.borderColor="#ff0000";
document.getElementById("t" + sssgf).style.backgroundColor="#666666";
document.getElementById("tt" + sssgf).style.backgroundColor="#666666";
//document.getElementById("anaimg").filters.blendTrans.Play();
document.getElementById("okf" + sssgf).style.visibility="visible";
}
