<!--
function oc(nd,op,cl,no){
//op+=60; cl+=60; no+=60
var tm = (nd.getHours()*60)+nd.getMinutes()
if (tm<op) {tm=op-tm; return 'We will open in '+ hm(tm) + spec(nd.getDay())}
else if (tm>cl) return 'We will open in '+ hm(no-tm) + spec(nd.getDay()+1)
else {tm=(cl-tm); return 'We will close in '+ hm(tm) + spec(nd.getDay())}
}
function hm(tm){
th = Math.floor(tm/60)
tm = tm-(th*60)
if (th>1) hs = "s"
else hs = ""
if (tm>1) ms = "s"
else ms = ""
if ((th>0)&&(tm>1)) return th + ' hour' + hs + ' and ' + tm + ' minute' + ms + '.'
else if (tm<2) return th + ' hour' + hs + '.'
else return tm + ' minute' + ms + '.'
}
function spec(dn) {
cdow = new Array('Sun','Mon','Tues','Wednes','Thurs','Fri','Satur','Sun','Mon','Tues','Wednes','Thurs','Fri','Satur','Sun','Mon','Tues','Wednes','Thurs','Fri','Satur','Sun','Mon','Tues','Wednes','Thurs','Fri')
mspec = " Rent a movie when you return one and get 50c credit, e-mail customers also get an extra free rental day!"
mspec+= "<hr>" + cdow[dn] + "day's rental special is"
if ((dn>0)&&(dn<4)) mspec+= " two movies for $3.92 due back " + cdow[dn+2] + "day or rent three for $6.00 and they are due back on " + cdow[dn+3] + "day <small>(LaserDiscs due the following " + cdow[dn+8] + "day)</small>"
else mspec+= " three movies for $6.00 due back on " + cdow[dn+3] + "day <small>(LaserDiscs due the following " + cdow[dn+8] + "day)</small> and FREE popcorn"
if ((dn==5)||(dn==6)) mspec+= ", or rent four movies for $8.08 due back on " + cdow[dn+4] + "day <small>(LaserDiscs due the following " + cdow[dn+9] + "day)</small>."
else mspec+= "."
return mspec + "<br>LaserDisc rentals are always at least seven day rentals <small>(a single LaserDisc rental is due back on " + cdow[dn+7] + "day)</small>."
}
function cd() {
var td = new Date()
var testDate = td.toLocaleString()
if (testDate) {
//alert(testDate)
testDate = new Date(testDate)
dateError = testDate.getTime() - td.getTime()
}
else dateError = 0

var sds = new Date(td.getYear()+1900,2,31,1,59,59)
var t = 7-sds.getDay()
sds = new Date(sds.getTime()+(t* 1000 * 60 * 60 * 24));
//alert(sds)

var eds = new Date(td.getYear()+1900,10,7,2,0,0)
//alert(eds+'....'+eds.getDay())
t = 7+eds.getDay()
eds = new Date(eds.getTime()-(t* 1000 * 60 * 60 * 24));
//alert(eds)

if ((td>sds)&&(td<eds))
  var nd = (td.getTimezoneOffset() - 420)*60000 //was 480 daylight savings time
else
  var nd = (td.getTimezoneOffset() - 480)*60000  //was 540
nd = new Date(td.getTime() - dateError - nd)

if (nd.getDay()== 0) return oc(nd,720,1200,2100)
else return oc(nd,720,1320,2160)
//else if (nd.getDay()== 6) return oc(nd,660,1320,2160)
//else if (nd.getDay()<5) return oc(nd,660,1260,2100)
//else return oc(nd,660,1320,2100)
}
function pp(mprice,msign,mspec){
var mtemp=""
if (msign.indexOf("$$")>-1) mtemp+= "This title may not be available for rental."
else{ mtemp+= "This title is available for rental"
if (mprice>99) mtemp+= ", it rents as two movies"
if (msign.indexOf(".5")>-1) mtemp+= " at 1/2 price"
mtemp+= ". " + cd()
}

if (msign.indexOf("P")>-1) mtemp+= "<BR> PreViewed discs are on sale for 40, 50, 60 and 70% off. This title lists for $ " + mprice + ", 40%=$" + formatMoney(mprice*.6) + ", 50%=$" + formatMoney(mprice*.5) + ", 60%=$ " + formatMoney(mprice*.4) + " and 70%=$ " + formatMoney(mprice*.3) +" plus tax. Click Help for more details."
else if (mspec>0) mtemp+= "<BR> The list price is $" + mprice + " our sale price is $" + formatMoney(mspec) + " plus tax, you save over $" + formatMoney(mprice-mspec)
else if (msign.indexOf('R') == -1) mtemp+= "<BR> The list price is $" + mprice + ", if it's not out of print our discounted price is $" + formatMoney(mprice*.8) + " plus tax."
mtemp+= "<hr>To purchase this disc check the box on the left."
awin("<H3>"+mtemp)}
function formatMoney(A) {
  var WGdc="."; var WGgc=","; var WGnc="(";
  var N=Math.abs(Math.round(A*100));
  var S=((N<10)?"00":((N<100)?"0":""))+N;
  S=((A<0)?WGnc:"")+Group(S.substring(0,(S.length-2)))+WGdc+
    S.substring((S.length-2),S.length)+((A<0&&WGnc=="(")?")":"");
  return S;
}
function Group(S) {
  return (S.length<4)?S:(Group(S.substring(0,S.length-3))+
    WGgc+S.substring(S.length-3,S.length));
}
// -->
