// KKadMatrix.js
// Custom ad-serving script for CTE
// Revised MON 12/24/07 @ 05:00pm by ch 
var pageURL = unescape(window.location.href);
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
if((pageURL == "http://www.kunstkatzen.com") || (pageURL == "http://www.kunstkatzen.com/index.html")) {
Pic[0] = '/ads/hu_natl.jpg'
Pic[1] = '/ads/bud_szep.jpg'
Pic[2] = '/ads/txl_hamburger.jpg'
Pic[3] = '/ads/istanbulmod.jpg'
Pic[4] = '/ads/prg_natl.jpg'
}

if(pageURL == "http://www.kunstkatzen.com/kk_search_db.html") {
Pic[0] = '/ads/at_kh.jpg'
Pic[1] = '/ads/cdg_pp.jpg'
Pic[2] = '/ads/louvre.jpg'
Pic[3] = '/ads/cdg_picasso2.jpg'
Pic[4] = '/ads/acad_venezia.jpg'
}

if(pageURL == "http://www.kunstkatzen.com/kk_museum_news.html") {
Pic[0] = '/ads/ru_outsider.jpg'
Pic[1] = '/ads/boston_mfa.jpg'
Pic[2] = '/ads/dahesh.jpg'
Pic[3] = '/ads/brooklyn.jpg'
Pic[4] = '/ads/cooperhewitt.jpg'
}

if(pageURL == "http://www.kunstkatzen.com/kk_artist_news.html") {
Pic[0] = '/ads/kruger.jpg'
Pic[1] = '/ads/manray.jpg'
Pic[2] = '/ads/nevelson.jpg'
Pic[3] = '/ads/duchamp.jpg'
Pic[4] = '/ads/fluxus.jpg'
}

if(pageURL == "http://www.kunstkatzen.com/kk_exhibits.html") {
Pic[0] = '/ads/br_mam.jpg'
Pic[1] = '/ads/wexner.jpg'
Pic[2] = '/ads/it_pam.jpg'
Pic[3] = '/ads/be_foto.jpg'
Pic[4] = '/ads/valencia.jpg'
}

if(pageURL == "http://www.kunstkatzen.com/kk_misc.html") {
Pic[0] = '/ads/aic01.jpg'
Pic[1] = '/ads/mettimeline.jpg'
Pic[2] = '/ads/picassobcn.jpg'
Pic[3] = '/ads/be_foto.jpg'
Pic[4] = '/ads/museothyssen.jpg'
}


var Pic2 = new Array();
Pic2[0] = 'skyscraper01.jpg'
Pic2[1] = 'skyscraper02.jpg'
Pic2[2] = 'skyscraper03.jpg'
Pic2[3] = 'skyscraper04.jpg'
Pic2[4] = 'skyscraper05.jpg'
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}

function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
changeLink(j);
}

function runSlideShow2() {
if (document.all) {
document.images.SlideShow2.style.filter="blendTrans(duration=2)";
document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow2.filters.blendTrans.Apply();
}
document.images.SlideShow2.src = preLoad2[j].src;
if (document.all) {
document.images.SlideShow2.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow2()', slideShowSpeed);
}


var tX;
var tX2;

var slideShowSpeed = 5000;
// Set slideShowSpeed for SlideShow2 (milliseconds : 1000 milliseconds = 1 second)
var slideShowSpeed2 = 5000;
// Set slideShowSpeed for SlideShow3 (milliseconds)

function runSlideShowX() {
if (document.all) {
document.images.SlideShow2.style.filter="blendTrans(duration=2)";
document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow2.filters.blendTrans.Apply();
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow2.src = preLoad2[j].src;
document.images.SlideShow.src = preLoad[j].src;

if (document.all) {
document.images.SlideShow2.filters.blendTrans.Play();
document.images.SlideShow.filters.blendTrans.Play();
// changeLink();

}
j = j + 1;
if (j > (p - 1)) j = 0;
tX = setTimeout('runSlideShow2()', slideShowSpeed2);
tX2 = setTimeout('runSlideShow()', slideShowSpeed);
// changeLink();
}


var preLoad2 = new Array();
for (i = 0; i < p; i++) {
preLoad2[i] = new Image();
preLoad2[i].src = Pic2[i];
}

function changeLink(j)
{
if((pageURL == "http://www.kunstkatzen.com") || (pageURL == "http://www.kunstkatzen.com/index.html")) {
if (j == 0) {
document.getElementById('myAnchor').href="http://www.ngprague.cz/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/prg_natl/');";
}
if (j == 1) {
document.getElementById('myAnchor').href="http://www.hnm.hu/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/hu_natl/');";
}
if (j == 2) {
document.getElementById('myAnchor').href="http://www.szepmuveszeti.hu/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/bud_szep/');";
}
if (j == 3) {
document.getElementById('myAnchor').href="http://www.hamburgerbahnhof.de/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/txl_hamburger/');";
}
if (j == 4) {
document.getElementById('myAnchor').href="http://www.istanbulmodern.org/en/f_index.html";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/istanbulmod/');";
}
}


if(pageURL == "http://www.kunstkatzen.com/kk_search_db") {
if (j == 0) {
document.getElementById('myAnchor').href="http://web.tiscali.it/wwwart/accademia/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/acad_venezia/');";
}
if (j == 1) {
document.getElementById('myAnchor').href="http://www.khm.at/homeE/homeE.html";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/at_kh/');";
}
if (j == 2) {
document.getElementById('myAnchor').href="http://www.centrepompidou.fr/Pompidou/Accueil.nsf/tunnel?OpenForm";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/cdg_pp/');";
}
if (j == 3) {
document.getElementById('myAnchor').href="http://www.louvre.fr/llv/commun/home.jsp";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/louvre/');";
}
if (j == 4) {
document.getElementById('myAnchor').href="http://www.musee-picasso.fr/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/cdg_picasso/');";
}
}

if(pageURL == "http://www.kunstkatzen.com/kk_museum_news.html") {
if (j == 0) {
document.getElementById('myAnchor').href="http://www.cooperhewitt.org/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/cooperhewitt/');";
}
if (j == 1) {
document.getElementById('myAnchor').href="http://www.museum.ru/museum/outsider/default.htm";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/ru_outsider/');";
}
if (j == 2) {
document.getElementById('myAnchor').href="http://www.mfa.org/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/bostonmfa/');";
}
if (j == 3) {
document.getElementById('myAnchor').href="http://www.daheshmuseum.org/index.php";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/dahesh/');";
}
if (j == 4) {
document.getElementById('myAnchor').href="http://www.brooklynmuseum.org/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/brooklyn/');";
}
}

if(pageURL == "http://www.kunstkatzen.com/kk_artist_news.html") {
if (j == 0) {
document.getElementById('myAnchor').href="http://www.fluxus.org/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/fluxus/');";
}
if (j == 1) {
document.getElementById('myAnchor').href="http://www.pbs.org/art21/artists/kruger/index.html#";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/barbarakruger/');";
}
if (j == 2) {
document.getElementById('myAnchor').href="http://www.manraytrust.com/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/manraytrust/');";
}
if (j == 3) {
document.getElementById('myAnchor').href="http://www.louisenevelsonfoundation.org/id22.html";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/nevelson/');";
}
if (j == 4) {
document.getElementById('myAnchor').href="http://www.understandingduchamp.com/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/duchamp/');";
}
}

if(pageURL == "http://www.kunstkatzen.com/kk_exhibits.html") {
if (j == 0) {
document.getElementById('myAnchor').href="http://www.ivam.es/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/valencia/');";
}
if (j == 1) {
document.getElementById('myAnchor').href="http://www.mam.org.br/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/br_mam/');";
}
if (j == 2) {
document.getElementById('myAnchor').href="http://www.wexarts.org/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/wexner/');";
}
if (j == 3) {
document.getElementById('myAnchor').href="http://www.palazzomagnani.it/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/it_pam/');";
}
if (j == 4) {
document.getElementById('myAnchor').href="http://www.fotomuseum.be/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/be_foto/');";
}
}


if(pageURL == "http://www.kunstkatzen.com/kk_misc.html") {
if (j == 0) {
document.getElementById('myAnchor').href="http://www.museothyssen.org/thyssen/#";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/museothyssen/');";
}
if (j == 1) {
document.getElementById('myAnchor').href="http://www.artic.edu/aic/index.php";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/aic/');";
}
if (j == 2) {
document.getElementById('myAnchor').href="http://www.metmuseum.org/toah/splash.htm";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/met/');";
}
if (j == 3) {
document.getElementById('myAnchor').href="http://www.museupicasso.bcn.es/eng/index_eng.htm";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/picassobcn/');";
}
if (j == 4) {
document.getElementById('myAnchor').href="http://www.tate.org.uk/modern/";
document.getElementById('myAnchor').onclick="javascript:urchinTracker('/bannerads/tatemodern/');";
}
}

}
