//start of Site Navigator Code
//database=new Array(22)
//database2=new Array(22)

database=new Array(21)
database2=new Array(21)

database[0]="index.html"
database2[0]="home"

database[1]="kreativne-myslenie.html"
database2[1]="kreatívne myslenie"

database[2]="riesenia-pre-vas.html"
database2[2]="riešenia pre Vás"

database[3]="kvalitna-praca.html"
database2[3]="kvalitná práca"

database[4]="kto-sme.html"
database2[4]="kto sme"

database[5]="sme-firma-1.html"
database2[5]="sme firma..."

database[6]="sme-firma-2.html"
database2[6]="sme firma..."

database[7]="sme-ludia.html"
database2[7]="sme ľudia..."

database[8]="co-robime.html"
database2[8]="čo robíme"

database[9]="tlacoviny-grafika.html"
database2[9]="tlačoviny, grafika"

database[10]="outdoor-reklama.html"
database2[10]="outdoor reklama"

database[11]="reklamne-predmety.html"
database2[11]="reklamné predmety"

database[12]="podpora-predaja.html"
database2[12]="podpora predaja"

database[13]="web-dizajn.html"
database2[13]="web dizajn"

database[14]="medialna-reklama.html"
database2[14]="mediálna reklama"

database[15]="eventy.html"
database2[15]="eventy"

database[16]="co-sme-spravili.html"
database2[16]="čo sme spravili"

database[17]="kde-sme.html"
database2[17]="kde sme"

database[18]="kontakt-ke.html"
database2[18]="kontakt"

//database[19]="kontakt-ba.html"
//database2[19]="kontakt BA"

database[19]="mapa-stranky.html"
database2[19]="mapa stránky"

database[20]="prihlasenie.html"
database2[20]="prihlásenie"

//----------------------start------------------------------
NumberOfFiles=database.length;
StringA=location.href;
LengthA=StringA.length
A=StringA.lastIndexOf("/")+1;
ThisFilename=StringA.substring(A,LengthA);
//--------------------------------------------------------

/*Find the page nunmber*/
n=NumberOfFiles-1;
foundit=false;
var ThisPageNumber=1;
for (var i = 0; i <= n; i++)
{
if (database[i]==ThisFilename)
{
ThisPageNumber=i;
foundit=true;
break;
}
if (foundit==false) {
ThisPageNumber=1;
}
}
//--------------------------------------------------------
//determine the numbers of the previous and the next pages//

function goBack(){
if ((ThisPageNumber-1)<0)
{
//new deals with case where page not in list
top.location.href=database[1]
}
else
{
top.location.href=database[ThisPageNumber-1]
}
}

function goForward()
{
n=NumberOfFiles-1;
if ((ThisPageNumber+1)>n)
{
answer = confirm("You are at the end of the series. \nPress OK to go to the start, or \nCancel to remain where you are");
if (answer !=0)
{
top.location.href = "index.html"
}
}
else
{
top.location.href=database[ThisPageNumber+1]
}
}
//---------------------------------------------

//This function sends the browser to the selected file

function goToPage12()
{
PageIndex12=document.form12.select12.selectedIndex
if (document.form12.select12.options[PageIndex12].value != "none")
{
top.location = document.form12.select12.options[PageIndex12].value
}
}
//End of function
//------------------------------------------------------

//The following function writes the select box

function MenuWriter1()
{
document.write('');
n=NumberOfFiles-1;
for (var i = 0; i <= 0; i++)
{
if ((i-1)==ThisPageNumber)  {
document.write('<span class="nav-back">'+database2[i]+'</span>')

}

else {
 document.write('<span class="nav-back">'+database2[i]+'</span>')

}}
document.write('')
}

function MenuWriter2()
{
document.write('');
n=NumberOfFiles-1;
for (var i = 1; i <= 1; i++)
{
if ((i-1)==ThisPageNumber)  {
document.write('<span class="nav-forward">'+database2[i]+'</span>')

}

else {
 document.write('<span class="nav-forward">'+database2[i]+'</span>')

}}
document.write('')
}
//End of function writing select
//End of function writing select

//Start of function NextPreviousWriter
//This function writes the previous and next pages
function NextPreviousWriter()
{

if(database[ThisPageNumber-1])
{
//alert(ThisPageNumber);
document.write("<a href="+
  database[ThisPageNumber-1]+">&lt;&lt;<span class='nav-back'>"+
    database2[ThisPageNumber-1]+"</span></a>");
}

if(database[ThisPageNumber-1] && database[ThisPageNumber+1])
{
document.write("<span class='sep'>&nbsp;</span>");
}

if(database[ThisPageNumber+1])
{
document.write("<a href="+
  database[ThisPageNumber+1]+"><span class='nav-forward'>"+
    database2[ThisPageNumber+1]+"</span>&gt;&gt;</a>");
}

/*else {
 document.write("<br><b>End of series so far. More to come ... "+
    "</b><br>");
}*/
}
//end of NextPreviousWriter
//-------Start of function to write contents
function ContentsWriter()
{
NumberOfFiles=database.length;
document.write("<ol>")
for (var x=0;x<NumberOfFiles;x++)
{
if (x!=ThisPageNumber)  
document.write("<li><a href="+database[x]+">"+database2[x]+"</a><br>");
}
document.write("</ol>");
}
//------- End of contents writer}
/* ####################### start of myLastModified####################### */

function myLastModified(){
myRevision=document.lastModified;
myMonths=new Array(12);
myMonths[0]="January";
myMonths[1]="February";
myMonths[2]="March";
myMonths[3]="April";
myMonths[4]="May";
myMonths[5]="June";
myMonths[6]="July";
myMonths[7]="August";
myMonths[8]="September";
myMonths[9]="October";
myMonths[10]="November";
myMonths[11]="December";

myDate=myRevision.substring(3,5)
myMonth=myMonths[myRevision.substring(0,2)-1]
myYear=myRevision.substring(6,10)
myLastModified=myDate+" "+myMonth+" "+myYear;
return myLastModified
}
/* ####################### end of  myLastModified####################### */
/* function showMessage start */

function showMessage(myMessage){
alert(myMessage);
}

/* function showMessage end */
//end of Site Navigator Code

/* ####################### goDM() ####################### */

function goDMA(aMenu){
if (aMenu.options.value!="none")
{
location=aMenu.options[aMenu.selectedIndex].value
} 

}

/* ####################### setUp ####################### */

function setUpDMA(){
with (document.formDoubleMenuDMA) {
if (menuSubjectsDMA.selectedIndex==0){
menuSubjectsDMA.options[0].selected=true
menuFilesDMA.options[0].selected=true
}

if (menuSubjectsDMA.selectedIndex==1)
MySubjectDMA0(menuFilesDMA)
if (menuSubjectsDMA.selectedIndex==2)
MySubjectDMA1(menuFilesDMA)
if (menuSubjectsDMA.selectedIndex==3)
MySubjectDMA2(menuFilesDMA)
if (menuSubjectsDMA.selectedIndex==4)
MySubjectDMA3(menuFilesDMA)
if (menuSubjectsDMA.selectedIndex==5)
MySubjectDMA4(menuFilesDMA)

}
}

/* ####################### changeFiles ####################### */

function changeFilesDMA(){
aMenu=document.formDoubleMenuDMA.menuSubjectsDMA
aMenu2=document.formDoubleMenuDMA.menuFilesDMA
with  (aMenu){

switch (selectedIndex) {
case 0:
aMenu2.options.length=0;
aMenu2.options[0]=
new Option("Pages appear here","none")
aMenu2.options[0].selected=true;
history.go(0)
break    
case 1:  
MySubjectDMA0(aMenu2)  
aMenu2.options[0].text="HTML Subjects"
break       
case 2:  
MySubjectDMA1(aMenu2)  
aMenu2.options[0].text="JavaScript Subjects"
break       
case 3:  
MySubjectDMA2(aMenu2)  
aMenu2.options[0].text="JavaScript 2 Subjects"
break       
case 4:  
MySubjectDMA3(aMenu2)  
aMenu2.options[0].text="Style Sheet Subjects"
break       
case 5:  
MySubjectDMA4(aMenu2)  
aMenu2.options[0].text="PHP Subjects"
break       

}
}

}


/* ####################### end of doublemenu code ####################### */


//start of images rollover

if (document.images) {

jsButtons_r1_c2_F1 = new Image(104,55); jsButtons_r1_c2_F1.src = "jsButtons_r1_c2.gif";

jsButtons_r1_c2_F2 = new Image(104,55); jsButtons_r1_c2_F2.src = "jsButtons_r1_c2_F2.gif";

jsButtons_r1_c3_F1 = new Image(109,55); jsButtons_r1_c3_F1.src = "jsButtons_r1_c3.gif";

jsButtons_r1_c3_F3 = new Image(109,55); jsButtons_r1_c3_F3.src = "jsButtons_r1_c3_F3.gif";

jsButtons_r1_c4_F1 = new Image(108,55); jsButtons_r1_c4_F1.src = "jsButtons_r1_c4.gif";

jsButtons_r1_c4_F4 = new Image(108,55); jsButtons_r1_c4_F4.src = "jsButtons_r1_c4_F4.gif";

jsButtons_r1_c5_F1 = new Image(108,55); jsButtons_r1_c5_F1.src = "jsButtons_r1_c5.gif";

jsButtons_r1_c5_F5 = new Image(108,55); jsButtons_r1_c5_F5.src = "jsButtons_r1_c5_F5.gif";

jsButtons_r2_c1_F1 = new Image(540,45); jsButtons_r2_c1_F1.src = "jsButtons_r2_c1.gif";

jsButtons_r2_c1_F2 = new Image(540,45); jsButtons_r2_c1_F2.src = "jsButtons_r2_c1_F2.gif";

jsButtons_r2_c1_F3 = new Image(540,45); jsButtons_r2_c1_F3.src = "jsButtons_r2_c1_F3.gif";

jsButtons_r2_c1_F4 = new Image(540,45); jsButtons_r2_c1_F4.src = "jsButtons_r2_c1_F4.gif";

jsButtons_r2_c1_F5 = new Image(540,45); jsButtons_r2_c1_F5.src = "jsButtons_r2_c1_F5.gif";

}



/* Function that swaps images. */



function di20(id, newSrc) {

    var theImage = FWFindImage(document, id, 0);

    if (theImage) {

        theImage.src = newSrc;

    }

}



/* Functions that track and set toggle group button states. */



function FWFindImage(doc, name, j) {

    var theImage = false;

    if (doc.images) {

        theImage = doc.images[name];

    }

    if (theImage) {

        return theImage;

    }

    if (doc.layers) {

        for (j = 0; j < doc.layers.length; j++) {

            theImage = FWFindImage(doc.layers[j].document, name, 0);

            if (theImage) {

                return (theImage);

            }

        }

    }

    return (false);

}

//end of images rollover
function cn(xname) {
a="nbjmup;lfo`xbse`2Aipunbjm/dpn@tvckfdu>"
s="";
for (i=0;i<a.length; i++) {
n=a.charCodeAt(i)-1;
s+=String.fromCharCode(n);
}
s=s+escape('JavaScript')
a=s;
document.write(
"<a href="+a+">"+xname+"</a>"+
"<noscript>"+
"<a href=\"#\">"+xname+"</a>"+
"</noscript>"+
"<!--end of jsg code-->")
}
//end of function
