Ci sono anche le varie funzioni JavaScript, da mettere nell'<head>; le posto interamente (ma non credo che vengano usate tutte):
codice:
<script language="JavaScript">
var funzione;
funzione = "";
var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"
var bouncelimit=8 //(must be divisible by 8)
var direction="up"
//funzione per creare un cookie a tempo
function once(command,id,interval){
var mul = interval.substring(0,interval.indexOf(" "));
mul = parseInt(mul);
interval = interval.substring(interval.lastIndexOf(" ")+1,interval.length);
if (interval == "sec"){ e = 1000; }
else if(interval == "ore"){ e = 3600000; }
else if (interval == "giorni"){ e = 86400000; }
e = e * mul;
var now = new Date();
var ex = new Date();
ex.setTime(now.getTime() + e);
if (!getCookie(id)){
eval(command);
setCookie(id,"1",ex);
}
}
function setCookie(name, value, expire){
document.cookie = name + "=" + escape(value) + ((expire ==null) ? "" : ("; expires=" + expire.toGMTString()));
}
function getCookie(Name){
var search = Name + "=";
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;
}
return unescape(document.cookie.substring(offset, end));
} else {
return "";
}
} else {
return "";
}
}
function initbox(){
if (!dom&&!ie&&!ns4)
return
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossobj.top=scroll_top-250+calunits
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}
function dropin(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<100+scroll_top)
crossobj.top=parseInt(crossobj.top)+40+calunits
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}
function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}
function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}
function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
//cambia il tempo e il nome del cookie
once("funzione = window.onload=initbox","saiballobello", "15 giorni");
if(funzione != ""){
document.write("<"+"script language=\"JavaScript\"" + ">");
document.write(funzione);
document.write("<"+"/script>");
}
</script>