﻿/**********/
var COUNT=15;
/*********/



var n=0;
var browserName=navigator.appName; 

function changeLink(link){
    var more=document.getElementById("galleryMore");
    more.setAttribute("href",link);
}
function changeDesc(n){/*
    var galleryDesc=new Array(
    ["Logotypy","Logotyp All4m","http://netunion.pl/realizacje,22,22,logotypy-agencja-interaktywna-wroclaw.html"],
    ["Portale internetowe","All4m","http://netunion.pl/realizacje-wiecej,47.html"],
    
    ["Multimedia","All4m","http://netunion.pl/realizacje-wiecej,44.html"],
    ["Logotypy","Amaranti","http://netunion.pl/realizacje,22,22,logotypy-agencja-interaktywna-wroclaw.html"],
    
    ["Logotypy","Cel - Masz co wiesz!","http://netunion.pl/realizacje,22,22,logotypy-agencja-interaktywna-wroclaw.html"],
    ["Plakaty, ulotki i foldery","Podręcznik Cel - Masz co wiesz!","http://netunion.pl/realizacje-wiecej,74.html"],
    
    ["Portale internetowe","Cel - Masz co wiesz!","http://netunion.pl/realizacje-wiecej,69.html"],
    ["Plakaty, ulotki i foldery","Plakat CEL - Masz co wiesz!","http://netunion.pl/realizacje,23,23,plakaty-ulotki-i-foldery-agencja-interaktywna-wroclaw.html"],
    
    ["Plakaty, ulotki i foldery","Menu dla restauracji DiRoberto","http://netunion.pl/realizacje-wiecej,70.html"],
    ["Materiały reklamowe","Kartki Świąteczne dla AMW Wrocław","http://netunion.pl/realizacje-wiecej,71.html"],
    
    ["Projekty stron internetowych","Pub Gramofon","http://netunion.pl/realizacje-wiecej,43.html"],
    ["Logotypy","Lextra","http://netunion.pl/realizacje-wiecej,42.html"],
    
    ["Sklepy internetowe","AGD Online","http://netunion.pl/realizacje-wiecej,46.html"],
    ["Portale internetowe","Nie ma barier. Dolny Śląsk","http://netunion.pl/realizacje-wiecej,54.html"],
    
    ["Materiały reklamowe","Siatka TKT Engineering","http://netunion.pl/realizacje-wiecej,59.html"],
    ["Sklepy internetowe","Tłumiki24","http://netunion.pl/realizacje-wiecej,45.html"]
     
);

    var galleryNavTxtCategory=window.document.getElementById("galleryNavTxtCategory");
    var galleryNavTxtProject=window.document.getElementById("galleryNavTxtProject");
*/
    /*if(n=="12"){n=12;}
    else if(n=="11"){n=11;}
    else if(n=="10"){n=10;}
    else if(n=="9"){n=9;}
    else if(n=="8"){n=8;}
    else if(n=="7"){n=7;}
    else if(n=="6"){n=6;}
    else if(n=="5"){n=5;}
    else if(n=="4"){n=4;}
    else if(n=="3"){n=3;}
    else if(n=="2"){n=2;}
    else if(n=="1"){n=1;}
    else if(n=="0"){n=0;}*/
    /*
    n=parseFloat(n);
    if(browserName!="Microsoft Internet Explorer"){
        galleryNavTxtCategory.textContent=galleryDesc[n][0]+": ";
        galleryNavTxtProject.textContent=galleryDesc[n][1];
    }else{
        galleryNavTxtCategory.innerHTML=galleryDesc[n][0]+": ";
        galleryNavTxtProject.innerHTML=galleryDesc[n][1];
    }
    changeLink(galleryDesc[n][2]);*/
}


var playOrNot="1";

function chageButtonPlayStop(a){/*
    if(a!=undefined){
     playOrNot=a;
    }
    if(playOrNot=="1"){
        window.document.getElementById('realizacjePlayButton').setAttribute('src','img/stop.gif');
        window.document.getElementById('realizacjePlayButton').setAttribute('onmouseover',"this.src='img/stop_hover.gif'");
        window.document.getElementById('realizacjePlayButton').setAttribute('onmouseout',"this.src='img/stop.gif'");
        playOrNot="0";
        window.document.realizacje.SetVariable("PLAY", "1");
        
    }else if(playOrNot=="0"){
        window.document.getElementById('realizacjePlayButton').setAttribute('src','img/play.gif');
        window.document.getElementById('realizacjePlayButton').setAttribute('onmouseover',"this.src='img/play_hover.gif'");
        window.document.getElementById('realizacjePlayButton').setAttribute('onmouseout',"this.src='img/play.gif'");
        playOrNot="1";
        window.document.realizacje.SetVariable("PLAY", "0");
    }*/
}


function gallerySidebarDown(){
    if(galleryThumbs[n+2]){
        n++;
        document.getElementById("img1").setAttribute("onClick", "galleryThumbsClick("+n+")");
        document.getElementById("img1_a").setAttribute("src", galleryThumbs[n]);
        document.getElementById("img2").setAttribute("onClick", "galleryThumbsClick("+(n+1)+")");
        document.getElementById("img2_a").setAttribute("src", galleryThumbs[(n+1)]);
    }
}
function gallerySidebarUp(){
    if(galleryThumbs[n-1]){
        n--;
        document.getElementById("img1").setAttribute("onClick", "galleryThumbsClick("+n+")");
        document.getElementById("img1_a").setAttribute("src", galleryThumbs[n]);
        document.getElementById("img2").setAttribute("onClick", "galleryThumbsClick("+(n+1)+")");
        document.getElementById("img2_a").setAttribute("src", galleryThumbs[(n+1)]);
    }
}
function sendDataToFlash(data){
    var n=0;
    while(data[n]){
        window.document.realizacje.SetVariable("rlzData"+n, data[n]);
       
        n++;
    }
    changeDesc(0);
}
function galleryThumbsClick(n){
    window.document.realizacje.SetVariable("IMAGE", n); window.document.realizacje.SetVariable("PLAY", "0");
}


