[ Psyche @ 19.03.2005. 21:11 ] @
Naime imam neku skripticu koja treba da mi prikaze neko pop-up przorce - zapravo layercic, ali ja zelim da to bude samo za odredjeni period npr izmedju 20. 03. u 00 i 25. 03. u 00. Problem je sto mi komp tada nece biti dostupan, a ne zelim da posetioci sajta dobiju to obavestenje pre i posle ovoga termina. Da li je to moguce izvesti, odnosno sta treba da dodam ovde? Code: <SCRIPT type="text/javascript"> /*********************************************** * Sticky Note script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * Go to http://www.dynamicdrive.com/ for full source code ***********************************************/ var displaymode="always" //(always or oncepersession) var enablefade="no" //("yes" to enable fade in effect, "no" to disable) var autohidebox=["yes", 15] //Automatically hide box after x seconds? [yes/no, if_yes_hide_after_seconds] var showonscroll="yes" //Should box remain visible even when user scrolls page? ("yes"/"no) ////////No need to edit beyond here/////////// if (parseInt(displaymode)!=NaN) var random_num=Math.floor(Math.random()*displaymode) function displayfadeinbox(){ var ie=document.all && !window.opera var dom=document.getElementById iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body objref=(dom)? document.getElementById("fadeinbox") : document.all.fadeinbox var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset var docwidth=(ie)? iebody.clientWidth : window.innerWidth docheight=(ie)? iebody.clientHeight: window.innerHeight var objwidth=objref.offsetWidth objheight=objref.offsetHeight objref.style.left=docwidth/2-objwidth/2+"px" objref.style.top=scroll_top+docheight/2-objheight/2+"px" if (showonscroll=="yes") showonscrollvar=setInterval("staticfadebox()", 50) objref.style.visibility="visible" if (objref.style.MozOpacity){ mozfadevar=setInterval("mozfadefx()", 90) } else controlledhidebox() } function staticfadebox(){ var ie=document.all && !window.opera var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset objref.style.top=scroll_top+docheight/2-objheight/2+"px" } function hidefadebox(){ objref.style.visibility="hidden" if (typeof showonscrollvar!="undefined") clearInterval(showonscrollvar) } function controlledhidebox(){ if (autohidebox[0]=="yes"){ var delayvar=(enablefade=="yes" && objref.filters)? (autohidebox[1]+objref.filters[0].duration)*1000 : autohidebox[1]*1000 setTimeout("hidefadebox()", delayvar) } } function initfunction(){ setTimeout("displayfadeinbox()", 100) } function get_cookie(Name) { var search = Name + "=" var returnvalue = "" if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { offset += search.length end = document.cookie.indexOf(";", offset) if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } if (displaymode=="oncepersession" && get_cookie("fadedin")=="" || displaymode=="always" || parseInt(displaymode)!=NaN && random_num==0){ if (window.addEventListener) window.addEventListener("load", initfunction, false) else if (window.attachEvent) window.attachEvent("onload", initfunction) } </SCRIPT> |