// 2000 created for ceco - buero fuer design | by konstantin weiss (kon@konnexus.de)



// cookie functions

function saveCookie(name,value,days) {

        if (days) {

                var date = new Date();

                date.setTime(date.getTime()+(days*24*60*60*1000))

                var expires = "; expires="+date.toGMTString()

        }

        else expires = ""

        document.cookie = name+"="+value+expires+"; path=/"

}

function readCookie(name) {

        var nameEQ = name + "="

        var ca = document.cookie.split(';')

        for(var i=0;i<ca.length;i++) {

                var c = ca[i];

                while (c.charAt(0)==' ') c = c.substring(1,c.length)

                if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length)

        }

        return null

}

function deleteCookie(name) {

        saveCookie(name,"",-1)

}



//bestellung

function bestellung(prod) {

   if (pageLoaded) {

       vorhListe = readCookie ('bestellListe')

       if (vorhListe != null) {

           if ( vorhListe.indexOf(prod) < 0 ) {

               prod = vorhListe+", "+prod

           }else{

               prod = vorhListe

           }

       }

       saveCookie('bestellListe',prod)

       document.location.href = "../../cgi-bin/muster.pl"

   }

}

//preload images

imgVerz = '../images/'



function downloadPdf() {

  if (pageLoaded) {

    w = (screen.width - 20)

    h = (screen.height - 50)

    url = '../../pdf/'+pdfDat+'.pdf'

    eval('pdfWindow=open(url,"pdf","status=yes,resizable=yes,toolbar=no,scrollbars=no,width='+w+',height='+h+'")');

  pdfWindow.moveTo(screen.width/2 - w/2, screen.height/2 - h/2-30);

  pdfWindow.focus();

  }

}

//für vis-navigation

arrowAbstand = 22

function arrow(i) {

  if (pageLoaded) {

      if ( i != null ) {

        ypos = 335 + (i * arrowAbstand)

        arrowButton.moveTo(185,ypos)

        arrowButton.show()

      }else{

        arrowButton.hide()

      }

    }

}