var timeout = 3000; var timeout_count = 0; var timeout_lastcall = 0; var timeout_jobs = []; // register further jobs function img_act(imgName) { if (document.images != null) { imgOn = eval(imgName + "on.src"); document[imgName].src = imgOn; } } function img_inact(imgName) { if (document.images != null) { imgOff = eval(imgName + "off.src"); document[imgName].src = imgOff; } } var content_top_offset = 0; var content_topright_offset = 0; var content_offset = 0; var content_numdisplay = 0; function Content(id, file, url, title) { this.id = id; this.file = file; this.url = url; this.image = null; this.title = title; } var content_top = null; var content_topright = null; var allContent = null; function content_open (pos) { if(allContent != null) { var myContent = allContent[(pos + content_offset) % allContent.length]; if(myContent.url != '') window.open(myContent.url); // if(myContent.url != '') document.location=myContent.url; } } function content_change () { var now = new Date(); if((now.getTime() - timeout_lastcall) * 2 < timeout) return; timeout_lastcall = now.getTime(); timeout_count++; if(content_top != null && (timeout_count % 3) == 0) { if(++content_top_offset >= content_top.length) content_top_offset = 0; if(document['content_top'] != null) document['content_top'].src = content_top[content_top_offset].image.src; } if(content_topright != null && (timeout_count % 4) == 0) { if(++content_topright_offset >= content_topright.length) content_topright_offset = 0; if(document['content_topright'] != null) document['content_topright'].src = content_topright[content_topright_offset].image.src; } if(allContent != null && (timeout_count % 3) == 0) { if(++content_offset >= allContent.length) content_offset = 0; var foo=0 for(var i=0; i < content_numdisplay; i++) { if(document['myContent'+i] != null) { document['myContent'+i].src = allContent[(i + content_offset) % allContent.length].image.src; document['myContent'+i].title = allContent[(i + content_offset) % allContent.length].title; } } } for(var i = 0; i < timeout_jobs.length; i++) if(0 == (timeout_count % timeout_jobs[i].period)) { timeout_jobs[i].action(timeout_jobs[i]); } } function print_open (url) { if(url != '') open(url, '_blank', 'width=530,resizable=yes,scrollbars=yes'); } function create_image(src) { rslt = new Image(); rslt.src = src; return rslt; } var preload_hooks = new Array(); var preload_flag = false; function loaded() { if(document.images != null) { for(var i=0; content_top != null && i < content_top.length; i++) { content_top[i].image = create_image(content_top[i].file); if(i == 0 && document['content_top'] != null) document['content_top'].src = content_top[i].image.src; } for(var i=0; content_topright != null && i < content_topright.length; i++) { content_topright[i].image = create_image(content_topright[i].file); if(i == 0 && document['content_topright'] != null) document['content_topright'].src = content_topright[i].image.src; } if(allContent != null) { for(var i=0; i < allContent.length; i++) { allContent[i].image = create_image(allContent[i].file); if(i < content_numdisplay && document['myContent' + i] != null) { document['myContent'+i].src = allContent[i].image.src; document['myContent'+i].title = allContent[i].title; } } for(var i=allContent.length; i < content_numdisplay; i++) { if(document['myContent'+i] != null) document['myContent'+i].src = allContent[i % allContent.length].image.src; } } if(preload_hooks.length > 0) { for(var i=0; i < preload_hooks.length; i++) preload_hooks[i](); } preload_flag = true; window.setInterval('content_change()', timeout); } } function open_eatsleep_popup(url) { var popup = true; var cookie_name = 'eatsleep'; if(document.cookie) { var cookie = document.cookie; while (cookie.length > 0) { var index_start = cookie.indexOf("="); if(index_start > 0) { var name = cookie.substring(0, index_start); var index_end = cookie.indexOf(";"); if(index_end == -1) index_end = cookie.length; if(name == 'display_' + cookie_name) { value = cookie.substring(index_start + 1, index_end); if(cookie.substring(index_start + 1, index_end) == '1') popup = false; break; } else { cookie = cookie.substring(index_end + 1, cookie.length); while(cookie.length > 0 && cookie.indexOf(' ') == 0) cookie = cookie.substring(1, cookie.length); } } else break; } } if(popup) { var now = new Date(); var timeout = new Date(now.getTime() + 1000*60*60*24*120); var win = window.open(url, '_blank', 'width=360,height=360,scrollbars=no'); if(win) document.cookie = "display_" + cookie_name + "=1;expires=" + timeout.toGMTString() + ";path=/"; } } content_numdisplay=9; var myContent0=new Image(151, 93); var myContent1=new Image(151, 93); var myContent2=new Image(151, 93); var myContent3=new Image(151, 93); var myContent4=new Image(151, 93); var myContent5=new Image(151, 93); var myContent6=new Image(151, 93); var myContent7=new Image(151, 93); var myContent8=new Image(151, 93); allContent=new Array( new Content(0, "/client/client_271.jpg", "https://podcasts.apple.com/ca/podcast/art-world-whitehot-magazine-with-noah-becker/id1551013809","PODCAST"), new Content(1, "/client/client_272.jpg", "https://whitehotmagazine.com/documents/contact","CONTACT"), new Content(2, "/client/client_273.jpg", "https://whitehotmagazine.com/contributors/donald-kuspit/947","Kuspit"), new Content(3, "/client/client_277.jpg", "https://www.artbasel.com/paris?lang=en","Paris Basel"), new Content(4, "/client/client_280.jpg", "https://www.moma.org","Moma"), new Content(5, "/client/client_287.jpg", "https://www.barnesandnoble.com/w/the-best-art-in-the-world-noah-becker/1146545937","Book"), new Content(6, "/client/client_291.jpg", "http://www.noahbeckerart.com","Noah Becker"), new Content(7, "/client/client_292.jpg", "https://youtu.be/diN1cYP7vV8?si=D-60e23k_atSyRVT","Whitehot Art Vlog"), new Content(8, "/client/client_279.jpg", "https://whitney.org","whitney") );