Themes til hjemmeside
Hej EXP.dkJeg er meget fasinerert af tv2.dk script, da den vælger farver og opsætning ud fra adressen.!
Kan man lave noget der ligner dette...?
function Theme() {
this.name="";
var p="http://lib.minside.dk/";
this.logoafile=p+"logo.gif";
this.logobfile=p+"logo.gif";
this.topflash=p+"top.swf";
this.topstatic=p+"top.jpg";
this.bgcolor="740000";
this.hovercolor="A72600";
this.bodycolor="FFFFFF";
this.width=760;
this.site=window.location.hostname;
this.set=Theme_set;
this.setupFiles=Theme_setupFiles;
this.topwidth2=0;
}
function Theme_set(name) {
this.name="_"+name;
this.setupFiles();
switch (name) {
case "test0":
this.bgcolor="003265";
this.hovercolor="215197";
break;
case "test1":
this.bgcolor="0E672D";
this.hovercolor="188E3B";
break;
case "test2":
this.bgcolor="478F02";
this.hovercolor="5CB030";
break;
case "test3":
this.bgcolor="ED8216";
this.hovercolor="F59836";
break;
default:
this.name=name;
this.setupFiles();
this.bgcolor="740000";
this.hovercolor="A72600";
}
}
function Theme_setupFiles() {
var pf=(arguments.length==1?arguments[0]:(this.width==580?"_small":""));
var p="http://lib.minside.dk/";
this.logoafile=p+"logo"+this.name+".gif";
this.topflash=p+"top"+this.name+pf+".swf";
this.topstatic=p+"top"+this.name+pf+".jpg";
}
cbadk
