<!--- Fetch a listing of current films from the database --->
<CFQUERY NAME="GetFilms" DATASOURCE="#REQUEST.DataSource#"
  CACHEDWITHIN="#CreateTimeSpan(0,0,10,0)#">
  SELECT FilmID, MovieTitle
  FROM Films
  ORDER BY MovieTitle
</CFQUERY>

<!--- Fetch a listing of current actors from the database --->
<CFQUERY NAME="GetActors" DATASOURCE="#REQUEST.DataSource#"
  CACHEDWITHIN="#CreateTimeSpan(0,0,10,0)#">
  SELECT ActorID, NameFirst, NameLast, Gender
  FROM Actors
  WHERE IsTotalBabe = 1
</CFQUERY>

<!--- Use Query-of-queries to extract just the female actors --->
<CFQUERY NAME="GetFemaleActors" DBTYPE="Query">
  SELECT ActorID, NameFirst, NameLast
  FROM GetActors
  WHERE Gender = 'F'
  ORDER BY NameLast, NameFirst
</CFQUERY>

<!--- Use Query-of-queries to extract just the male actors --->
<CFQUERY NAME="GetMaleActors" DBTYPE="Query">
  SELECT ActorID, NameFirst, NameLast
  FROM GetActors
  WHERE Gender = 'M'
  ORDER BY NameLast, NameFirst
</CFQUERY>

<!--- Create formatting structure --->
<CFSET Formatting = StructNew()>
<CFSET Formatting.bgcolor = "##F5DEB3">
<CFSET Formatting.btncolor = "##FF8C00">
<CFSET Formatting.btnhicolor = "##FFA500">

<TABLE>
<TR>
  <TD>
    <IMG SRC="../images/logo_c.gif" WIDTH="101" HEIGHT="101" ALT="" BORDER="0">
  </TD>
  <TD>
    <!--- Include Navigation Bar component, from Flash Component Kit --->
    <CF_uihnavbar
      WIDTH="500"
      HEIGHT="70"
      DROPSPEED="99"
      SUBSTEP="25"
      ARROWCOLOR="##FFFF00"
      ARROWBGCOLOR="##FF0000"
      BGCOLOR="##FF0000"
      TOPHEIGHT="25"
      BOTTOMHEIGHT="45"
      stFORMATTING="#Formatting#">
    
      <!--- Include Top-Level navigation choice --->
      <CF_uihnavbaroption NAME="Orange Whip Studios" WIDTH="200">
        <!--- Include Second-Level navigation choice --->
        <CF_uihnavbaroptionitem
          NAME="Home"
          URL="../"
          WIDTH="100">  
        <!--- Include Second-Level navigation choice --->
        <CF_uihnavbaroptionitem
          NAME="Store"
          URL="../29/Store.cfm"
          WIDTH="100">  
      </CF_uihnavbaroption>
      
      
      <!--- Include Top-Level navigation choice for Films --->
      <CF_uihnavbaroption NAME="Films" WIDTH="100">
        <!--- For each Film --->
        <CFLOOP QUERY="GetFilms">
          <!--- URL to send user to if they click on this film --->
          <CFSET LinkURL = "ShowFilm.cfm?FilmID=#GetFilms.FilmID#">
          <!--- Calculate appropriate width, based on length of film title --->
          <CFSET LinkWidth = 30 + (Len(GetFilms.MovieTitle) * 6)>
          <!--- Include Second-Level navigation choice for this film --->
          <CF_uihnavbaroptionitem
            NAME="#GetFilms.MovieTitle#"
            URL="#LinkURL#"
            WIDTH="#LinkWidth#">  
        </CFLOOP>
      </CF_uihnavbaroption>
    
      <!--- Include Top-Level navigation choice for Actors (Female) --->
      <CF_uihnavbaroption NAME="Hot Actresses" WIDTH="100">
        <!--- For each Film --->
        <CFLOOP QUERY="GetFemaleActors">
          <CFSET FullName = NameFirst & " " & NameLast>
          <!--- URL to send user to if they click on this film --->
          <CFSET LinkURL = "ShowActor.cfm?ActorID=#GetFemaleActors.ActorID#">
          <!--- Calculate appropriate width, based on length of FullName --->
          <CFSET LinkWidth = 30 + (Len(FullName) * 6)>
          <!--- Include Second-Level navigation choice for this Actor --->
          <CF_uihnavbaroptionitem
            NAME="#FullName#"
            URL="#LinkURL#"
            WIDTH="#LinkWidth#">  
        </CFLOOP>
      </CF_uihnavbaroption>
      
      <!--- Include Top-Level navigation choice for Actors (Male) --->
      <CF_uihnavbaroption NAME="Hot Actors" WIDTH="100">
        <!--- For each Film --->
        <CFLOOP QUERY="GetMaleActors">
          <CFSET FullName = NameFirst & " " & NameLast>
          <!--- URL to send user to if they click on this film --->
          <CFSET LinkURL = "ShowActor.cfm?ActorID=#GetMaleActors.ActorID#">
          <!--- Calculate appropriate width, based on length of FullName --->
          <CFSET LinkWidth = 30 + (Len(FullName) * 6)>
          <!--- Include Second-Level navigation choice for this Actor --->
          <CF_uihnavbaroptionitem
            NAME="#FullName#"
            URL="#LinkURL#"
            TXTCOLOR="##FF0000"
            WIDTH="#LinkWidth#">  
        </CFLOOP>
      </CF_uihnavbaroption>
    
    </CF_uihnavbar>

  </TD>
</TR>
</TABLE>
