function SlideShow(cnt){
this.container=cnt;
this.folderPath;
this.imageDelay=3500;
this.transitionSpeed=1000;
this.target='_self';
this.autoStart=true;
this.loop=true;
this.random=false;
this.defaultEffect=0;//for random it should be 24
this.add=add;
this.next=next;
this.prev=prev;
this.play=play;
this.stop=stop;
this.go=go;

this.imgs=new Array();
this.onLoad=onLoad;

function imageInfo(){
    this.filePath='';
    this.url='';
    this.desc='';
    this.transEffect;
};

function add(filename,url,desc,te){
    var img=new imageInfo();
    img.filePath=this.folderPath+filename;
    if(!isEmpty(url))img.url=url;
    if(!isEmpty(desc))img.desc=desc;
    img.transEffect=isEmpty(te)?this.defaultEffect:te;
    this.imgs.push(img);
};

function onLoad(){
    f1(this.container,this.imageDelay,this.autoStart,this.loop,this.target,this.transitionSpeed,this.random,this.imgs);
};

function next(){
    f2(this.container,1,0);
};

function prev(){
    f2(this.container,0,0);
};
function play(){
    f2(this.container,1,1);
};
function stop(){
    f4(this.container);
};
function go(index){
    f5(this.container,index-1);
};
};

function fO(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=fO(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
};

function f9(){
var v1=arguments,v2=v1[0],v3=fO(v2),v4,v5,v6;v4=Math.floor(Math.random()*(v3.t6.length));v5=v3.t6[v4];v6=v3.t6.splice(v4,1);if (v3.t6.length<1){f7(v2);}return v5;};

function f8(){
if (!Array.prototype.push){Array.prototype.push=function(){var v1=arguments;for(var v2=v1.length-1;v2>=0;v2--){this[this.length]=v1[v2];}return this.length;}}if (!Array.prototype.splice){Array.prototype.splice=function(){var v1=arguments,v3=new Array(),v4=new Array(),v5=0,v6=v1[0],v7=v1[1];for (v5=0;v5<v6;v5++){v3[v3.length]=this[v5];}for (v5=v6+v7;v5<this.length;v5++){v3[v3.length]=this[v5];}for (v5=0;v5<v7;v5++){v4[v4.length]=this[v6+v5];}this.length=0;for (v5=0;v5<v3.length;v5++){this[this.length]=v3[v5];}return v4;}}};

function f7(){
var v1=arguments,v2=v1[0],v3=fO(v2),v4;v3.t6=new Array();for (v4=0;v4<v3.t4.length;v4++){v3.t6.push(v4);}};

function f5(){
var v1=arguments,v2=v1[0],v3=fO(v2),v4=v1[1];if (v3&&v3.t4){f4(v2);if (v4>v3.t4.length-1){v4=v3.t4.length-1;}else if (v4<0){v4=0;}v3.t11=v4;if (!v3.t9){v3.t5=new Image();}v3.t5.src=v3.t4[v4][0];f3(v2,v4);}};

function flvFt6(){this.style.filter="";};

function f4(){var v1=fO(arguments[0]);if (v1&&v1.t4&&v1.t2!=null){clearTimeout(v1.t2);}};

function f3(){
var v1=arguments,v2=v1[0],v3=fO(v2),v4=v1[1],v5='<div class="slideImage">',v6,v7,v8;if (!v3.t5.complete){v6="f3('"+v2+"',"+v4+")";setTimeout(v6,50);return;}if (v3.t4[v4][1]!=""){v5+='<a href="'+v3.t4[v4][1]+'"';if (v3.t3!=""){v5+=' target="'+v3.t3+'"';}v5+='>';}v5+='<img src="'+v3.t5.src+'" border="0" alt="">';if (v3.t4[v4][1]!=""){v5+='</a>';}v5+='</div>';if (v3.t4[v4][2]!=""){v5+='<div class="slideDesc">'+unescape(v3.t4[v4][2])+'</div>';}v7=v3.t4[v4][3];if (!v3.t1||v7==25){if (document.layers){v3.document.open();v3.document.write(v5);v3.document.close();}else {v3.innerHTML=v5;}}else {try {v3.contentEditable=true;if (v3.filters[0]&&v3.filters[0].status==2){v3.filters[0].Stop();}if (v7==0){v8="blendTrans(Duration="+v3.t10+")";}else {v8="revealTrans(Duration="+v3.t10+",Transition="+(v7-1)+")";}v3.onfilterchange=flvFt6;v3.style.filter=v8;v3.filters[0].Apply();v3.innerHTML=v5;v3.filters[0].Play();v3.contentEditable=false;}catch (e){v3.t1=false;f3(v2,v4);}}};

function f2(){
var v1=arguments,v2=v1[0],v3=fO(v2),v4=v1[1],v5=v1[2],v6,v7,v8,v9;if (v3&&v3.t4){f4(v2);if (v5==0||v3.t7==0){if (v4==1){v6=v3.t11+1;if (v6>v3.t4.length-1){v6=0;if (v3.t12==0){return;}}}else {v6=v3.t11-1;if (v6<0){v6=v3.t4.length-1;if (v3.t12==0){return;}}}}else {v6=v3.t11;while (v6==v3.t11){v6=f9(v2);}}v3.t11=v6;if (!v3.t9){v3.t5=new Image();}v3.t5.src=v3.t4[v6][0];f3(v2,v6);if (v5==1){v7="f2('"+v2+"',"+v4+","+v5+")";v3.t2=setTimeout(v7,v3.t8);}}};

function f1(cnt,delay,v5,uk2,uk3,ts,uk4,imgs){
var v3,v4,v6,v7,v8,v9;
v3=fO(cnt);
v7=navigator.userAgent.toLowerCase();


if (v3){
    f8();
    v3.t8=delay;
    v3.t12=uk2;
    v3.t3=uk3;
    v3.t10=ts/1000;
    v3.t7=uk4;
    v3.t4=new Array();

    for (i=0;i<imgs.length;i++){
    v3.t4[v3.t4.length]=new Array(imgs[i].filePath,imgs[i].url,unescape(imgs[i].desc),parseInt(imgs[i].transEffect));
    };
        v9=0;
        if (v3.t7==1){
        f7(cnt);
        v9=f9(cnt);
        }
        v3.t11=v9;
        v3.t9=(v7.indexOf("netscape6")!=-1);
        v3.t5=new Image();
        v3.t5.src=v3.t4[v9][0];
        v3.t1=v3.filters&&(v7.indexOf("mac")<0);
        f3(cnt,v9);
        if (v5){
        v4="f2('"+cnt+"',1,"+v5+")";
        v3.t2=setTimeout(v4,v3.t8);
        }
    }
};


/* Kullanımı

var slideShow= new SlideShow('slideContainer');
slideShow.folderPath=HOST_URL+'include/images/deneme/';
slideShow.defaultEffect=0;
slideShow.autoStart=true;
slideShow.random=true;
slideShow.add('1.jpg','#');
slideShow.add('2.jpg','#222');
slideShow.add('3.jpg');
slideShow.add('4.jpg');
addLoadEvent(function(){slideShow.onLoad();});

*/



/* değişken ismleri için backup....

function SlideShow(cnt){
this.container=cnt;
this.folderPath;
this.imageDelay=3500;
this.transitionSpeed=1000;
this.autoStart=true;
this.loop=true;
this.random=false;
this.defaultEffect=0;//for random it should be 24
this.add=add;
this.next=next;
this.prev=prev;
this.play=play;
this.stop=stop;
this.go=go;

this.imgs=new Array();
this.onLoad=onLoad;

function imageInfo(){
    this.filePath='';
    this.url='#';
    this.desc='';
    this.transEffect;
};

function add(filename,url,desc,te){
    var img=new imageInfo();
    img.filePath=this.folderPath+filename;
    if(!isEmpty(url))img.url=url;
    if(!isEmpty(desc))img.desc=desc;
    img.transEffect=isEmpty(te)?this.defaultEffect:te;
    this.imgs.push(img);
};

function onLoad(){
    flvFTLS1(this.container,this.imageDelay,this.autoStart,this.loop,1,this.transitionSpeed,this.random,this.imgs);
};

function next(){
    flvFTLS2(this.container,1,0);
};

function prev(){
    flvFTLS2(this.container,0,0);
};
function play(){
    flvFTLS2(this.container,1,1);
};
function stop(){
    flvFTLS4(this.container);
};
function go(index){
    flvFTLS5(this.container,index-1);
};
};

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
};

function flvFTLS9(){
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4,v5,v6;v4=Math.floor(Math.random()*(v3.TLS6.length));v5=v3.TLS6[v4];v6=v3.TLS6.splice(v4,1);if (v3.TLS6.length<1){flvFTLS7(v2);}return v5;};

function flvFTLS8(){
if (!Array.prototype.push){Array.prototype.push=function(){var v1=arguments;for(var v2=v1.length-1;v2>=0;v2--){this[this.length]=v1[v2];}return this.length;}}if (!Array.prototype.splice){Array.prototype.splice=function(){var v1=arguments,v3=new Array(),v4=new Array(),v5=0,v6=v1[0],v7=v1[1];for (v5=0;v5<v6;v5++){v3[v3.length]=this[v5];}for (v5=v6+v7;v5<this.length;v5++){v3[v3.length]=this[v5];}for (v5=0;v5<v7;v5++){v4[v4.length]=this[v6+v5];}this.length=0;for (v5=0;v5<v3.length;v5++){this[this.length]=v3[v5];}return v4;}}};

function flvFTLS7(){
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4;v3.TLS6=new Array();for (v4=0;v4<v3.TLS4.length;v4++){v3.TLS6.push(v4);}};

function flvFTLS5(){
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4=v1[1];if (v3&&v3.TLS4){flvFTLS4(v2);if (v4>v3.TLS4.length-1){v4=v3.TLS4.length-1;}else if (v4<0){v4=0;}v3.TLS11=v4;if (!v3.TLS9){v3.TLS5=new Image();}v3.TLS5.src=v3.TLS4[v4][0];flvFTLS3(v2,v4);}};

function flvFTLS6(){this.style.filter="";};

function flvFTLS4(){var v1=MM_findObj(arguments[0]);if (v1&&v1.TLS4&&v1.TLS2!=null){clearTimeout(v1.TLS2);}};

function flvFTLS3(){
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4=v1[1],v5='<div class="slideImage">',v6,v7,v8;if (!v3.TLS5.complete){v6="flvFTLS3('"+v2+"',"+v4+")";setTimeout(v6,50);return;}if (v3.TLS4[v4][1]!=""){v5+='<a href="'+v3.TLS4[v4][1]+'"';if (v3.TLS3!=""){v5+=' target="'+v3.TLS3+'"';}v5+='>';}v5+='<img src="'+v3.TLS5.src+'" border="0" alt="">';if (v3.TLS4[v4][1]!=""){v5+='</a>';}v5+='</div>';if (v3.TLS4[v4][2]!=""){v5+='<div class="slideDesc">'+unescape(v3.TLS4[v4][2])+'</div>';}v7=v3.TLS4[v4][3];if (!v3.TLS1||v7==25){if (document.layers){v3.document.open();v3.document.write(v5);v3.document.close();}else {v3.innerHTML=v5;}}else {try {v3.contentEditable=true;if (v3.filters[0]&&v3.filters[0].status==2){v3.filters[0].Stop();}if (v7==0){v8="blendTrans(Duration="+v3.TLS10+")";}else {v8="revealTrans(Duration="+v3.TLS10+",Transition="+(v7-1)+")";}v3.onfilterchange=flvFTLS6;v3.style.filter=v8;v3.filters[0].Apply();v3.innerHTML=v5;v3.filters[0].Play();v3.contentEditable=false;}catch (e){v3.TLS1=false;flvFTLS3(v2,v4);}}};

function flvFTLS2(){
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4=v1[1],v5=v1[2],v6,v7,v8,v9;if (v3&&v3.TLS4){flvFTLS4(v2);if (v5==0||v3.TLS7==0){if (v4==1){v6=v3.TLS11+1;if (v6>v3.TLS4.length-1){v6=0;if (v3.TLS12==0){return;}}}else {v6=v3.TLS11-1;if (v6<0){v6=v3.TLS4.length-1;if (v3.TLS12==0){return;}}}}else {v6=v3.TLS11;while (v6==v3.TLS11){v6=flvFTLS9(v2);}}v3.TLS11=v6;if (!v3.TLS9){v3.TLS5=new Image();}v3.TLS5.src=v3.TLS4[v6][0];flvFTLS3(v2,v6);if (v5==1){v7="flvFTLS2('"+v2+"',"+v4+","+v5+")";v3.TLS2=setTimeout(v7,v3.TLS8);}}};

function flvFTLS1(cnt,delay,v5,uk2,uk3,ts,uk4,imgs){
var v3,v4,v6,v7,v8,v9;
v3=MM_findObj(cnt);
v7=navigator.userAgent.toLowerCase();


if (v3){
    flvFTLS8();
    v3.TLS8=delay;
    v3.TLS12=uk2;
    v3.TLS3=uk3;
    v3.TLS10=ts/1000;
    v3.TLS7=uk4;
    v3.TLS4=new Array();

    for (i=0;i<imgs.length;i++){
    v3.TLS4[v3.TLS4.length]=new Array(imgs[i].filePath,imgs[i].url,unescape(imgs[i].desc),parseInt(imgs[i].transEffect));
    };
        v9=0;
        if (v3.TLS7==1){
        flvFTLS7(cnt);
        v9=flvFTLS9(cnt);
        }
        v3.TLS11=v9;
        v3.TLS9=(v7.indexOf("netscape6")!=-1);
        v3.TLS5=new Image();
        v3.TLS5.src=v3.TLS4[v9][0];
        v3.TLS1=v3.filters&&(v7.indexOf("mac")<0);
        flvFTLS3(cnt,v9);
        if (v5){
        v4="flvFTLS2('"+cnt+"',1,"+v5+")";
        v3.TLS2=setTimeout(v4,v3.TLS8);
        }
    }
};


*/




