Countdown clock to every wednesday

HI all,

this is my first post in this forum and i’m having a problem with a countdown clock.
I want to make a countdown clock that will countdown to wednesday 20.00h and after that it has to start all over again till the next wednesday.

Can anybody help me with this?

Here is the code that i used in the counter:

onClipEvent (load) {
countdown = “yes”;
// Target Time Information
tday = 18;
thours = 20;
tminutes = 00;
tseconds = 0;
//
}
onClipEvent (enterFrame) {
if (countdown == “yes”) {
now = new Date();
ndays = daysinmonth[now.getMonth()];
nday = now.getDate();
nhours = now.getHours();
nminutes = now.getMinutes();
nseconds = now.getSeconds();
// Day Code
if (tday>=nday) {
rday = tday-nday;
} else {
rday = (ndays-nday)+tday;
rmonth = rmonth-1;
if (rmonth<0) {
ryear = ryear-1;
rmonth = 12+rmonth;
}
}
// Hour Code
if (thours>=nhours) {
rhours = thours-nhours;
} else {
rhours = (24-nhours)+thours;
rday = rday-1;
if (rday<0) {
rmonth = rmonth-1;
rday = Number(ndays)+Number(rday);
if (rmonth<0) {
ryear = ryear-1;
rmonth = 12+rmonth;
}
}
}
// Minute Code
if (tminutes>=nminutes) {
rminutes = tminutes-nminutes;
} else {
rminutes = (60-nminutes)+tminutes;
rhours = rhours-1;
if (rhours<0) {
rday = rday-1;
rhours = 24+rhours;
if (rday<0) {
rmonth = rmonth-1;
rday = Number(ndays)+Number(rday);
if (rmonth<0) {
ryear = ryear-1;
rmonth = 12+rmonth;
}
}
}
}
// Seconds Code
if (tseconds>=nseconds) {
rseconds = tseconds-nseconds;
} else {
rseconds = (60-nseconds)+tseconds;
rminutes = rminutes-1;
if (rminutes<0) {
rhours = rhours-1;
rminutes = 60+rminutes;
if (rhours<0) {
rday = rday-1;
rhours = 24+rhours;
if (rday<0) {
rmonth = rmonth-1;
rday = Number(ndays)+Number(rday);
if (rmonth<0) {
ryear = ryear-1;
rmonth = 12+rmonth;
}
}
}
}
}
// Countdown Checker
if (ryear<0) {
disday = 0;
dishours = 0;
disminutes = 0;
disseconds = 0;
discountdown = “no”;
this.play();
countdown = “no”;
} else {
// Update Clock Check
if (rday ne day) {
day = rday;
if (day<10) {
this.days.days.disday = “0”+day;
} else {
this.days.days.disday = day;
}
this.days.play();
}
if (rhours ne hours) {
hours = rhours;
if (hours<10) {
this.hour.hour.dishours = “0”+hours;
} else {
this.hour.hour.dishours = hours;
}
this.hour.play();
}
if (rminutes ne minutes) {
minutes = rminutes;
if (minutes<10) {
this.minute.minute.disminutes = “0”+minutes;
} else {
this.minute.minute.disminutes = minutes;
}
this.minute.play();
}
if (rseconds ne seconds) {
seconds = rseconds;
if (seconds<10) {
this.second.second.disseconds = “0”+seconds;
} else {
this.second.second.disseconds = seconds;
}
this.second.play();
}
}
}
}

thanx in advance!