<!--Creates a dynamic CSS style file-->

<%
scriptname = Request.ServerVariables ("script_name") 
scriptname = Replace(right(scriptname,len(scriptname)-instrrev(scriptname,"/")),".asp","")
%>

<%
If (upgrade_database <> "true") then
 response.write "<style>"
 response.write "A:link     {color: " & RSPSETTINGS("Link_Color") & ";text-decoration: none}"
 response.write "A:visited  {color: " & RSPSETTINGS("Visited_Link_Color") & ";text-decoration: none}"
 response.write "A:active   {color: " & RSPSETTINGS("Active_Link_Color") & ";text-decoration: none}"
 response.write "A:hover    {color: " & RSPSETTINGS("Hover_Link_Color") & ";text-decoration: none}"
 
 response.write "TD.Comment {BACKGROUND-COLOR: #FFFFCC; COLOR: #000000; FONT-FAMILY: Verdana, Arial; FONT-SIZE: 10px; FONT-WEIGHT: normal; TEXT-ALIGN: left; TEXT-DECORATION: none}"

 If (scriptname = "calendar") then
  set RSCALENDARs = Conn.Execute("SELECT * From Calendar_Settings")    				' required by ASP Lightning

  response.write "a.cal:link     {color: " & RSCALENDARs("Weekday_Font_Color") & ";text-decoration: none}"
  response.write "a.cal:visited  {color: " & RSCALENDARs("Weekday_Font_Color") & ";text-decoration: none}"
  response.write "a.cal:active   {color: " & RSPSETTINGS("Active_Link_Color") & ";text-decoration: none}"
  response.write "a.cal:hover    {color: " & RSCALENDARs("Reservation_Font_Color") & ";text-decoration: none}"

  response.write "a.caltoday:link     {color: " & "#FFFFFF" & ";text-decoration: none}"
  response.write "a.caltoday:visited  {color: " & "#FFFFFF" & ";text-decoration: none}"
  response.write "a.caltoday:active   {color: " & RSPSETTINGS("Active_Link_Color") & ";text-decoration: none}"
  response.write "a.caltoday:hover    {color: " & RSCALENDARs("Reservation_Font_Color") & ";text-decoration: none}"

  ' The opera class is used to suppress link properties on texts which need the title attribute.
  ' The title attribute can only be set on href in Opera, that's why we need a hyperlink to show the title!

  response.write "a.opera:link     {color: " & RSCALENDARs("Reservation_Font_Color") & ";text-decoration: none}"
  response.write "a.opera:visited  {color: " & RSCALENDARs("Reservation_Font_Color") & ";text-decoration: none}"
  response.write "a.opera:active   {color: " & RSCALENDARs("Reservation_Font_Color") & ";text-decoration: none}"
  response.write "a.opera:hover    {color: inherit; background: inherit;}"			' suppress the hover effect
  
  set RSCALENDARs = Nothing
 End if

 response.write ".inputSubmit"
 response.write "{"
 response.write "color: #000000;"
 response.write "background-color: #EEEEEE;"
 response.write "border-color : #000000;"
 response.write "border-top : 1px solid;"
 response.write "border-bottom : 1px solid;"
 response.write "border-left : 1px solid;"
 response.write "border-right : 1px solid;"
 response.write "font-family : Verdana,tahoma,Arial;"
 response.write "font-size : 10px;"
 response.write "font-weight: bold;"
 response.write "}"

 response.write ".inputBox"
 response.write "{"
 response.write "color : #000000;"
 response.write "background : #FFFFFF;"
 response.write "border-color : #000000;"
 response.write "border-top : 1px solid;"
 response.write "border-bottom : 1px solid;"
 response.write "border-left : 1px solid;"
 response.write "border-right : 1px solid;"
 response.write "font-family : Verdana,tahoma,Arial;"
 response.write "font-size : 10px;"
 response.write "}"
 response.write "</style>"
End If
%>