%OPTIONS%
filter="HTML Files|*.html;*.htm"
encoding="UTF8"
replace=""&gt;<->"'>"
replace="&lt;link <-><span class='pvdlink' title='pvdlink "
replace="&lt;/link&gt;<-></span>"
replace="><->&gt;"
replace="<<->&lt;"
replace="'<->&#039;"
replace="&<->&amp;"
copyfile="HTML Frames\empty.html<->%fname%_files\empty.html"
copyfile="HTML Frames\frame.css<->%fname%_files\css\frame.css"
copyfile="HTML Frames\main.css<->%fname%_files\css\main.css"
copyfile="HTML Frames\frame.js<->%fname%_files\javascript\frame.js"
copyfile="HTML Frames\filter.js<->%fname%_files\javascript\filter.js"
copyfile="HTML Frames\filterfunc.js<->%fname%_files\javascript\filterfunc.js"
copyfile="HTML Frames\filterfunc.ptx<->%fname%_files\pimpHTMLframesExport\filterfunc.ptx"
copyfile="HTML Frames\pimpHTMLframesExport.exe<->%fname%_files\pimpHTMLframesExport\pimpHTMLframesExport.exe"
copyfile="HTML Frames\charcodes.txt<->%fname%_files\pimpHTMLframesExport\charcodes.txt"
copyfile="HTML Frames\actors.ptx<->%fname%_files\pimpHTMLframesExport\actors.ptx"
copyfile="HTML Frames\category.ptx<->%fname%_files\pimpHTMLframesExport\category.ptx"
copyfile="HTML Frames\country.ptx<->%fname%_files\pimpHTMLframesExport\country.ptx"
copyfile="HTML Frames\language.ptx<->%fname%_files\pimpHTMLframesExport\language.ptx"
copyfile="HTML Frames\directors.ptx<->%fname%_files\pimpHTMLframesExport\directors.ptx"
copyfile="HTML Frames\writers.ptx<->%fname%_files\pimpHTMLframesExport\writers.ptx"
copyfile="HTML Frames\composers.ptx<->%fname%_files\pimpHTMLframesExport\composers.ptx"
copyfile="HTML Frames\producers.ptx<->%fname%_files\pimpHTMLframesExport\producers.ptx"
copyfile="HTML Frames\readme.txt<->%fname%_files\pimpHTMLframesExport\readme.txt"
copyfile="HTML Frames\genre.ptx<->%fname%_files\pimpHTMLframesExport\genre.ptx"
recordtemplate="HTML Frames\movieiframe.ptm"
recordfilename="%fname%_files\movie%id%.html"
imagepath="%fname%_files\images\"
%OPTIONS%
%HEAD%<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Script-Type" content="text/javascript; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <link rel="stylesheet" type="text/css" href="./{%value=233}_files/css/main.css">
  <title>Video Database ({%value=205})</title>
</head>
<body onclick="hideall();">
  <h1>Video Database ({%value=205})</h1>
  <div id="list">
    <ul>
%HEAD%      <li>{#StringReplace '{#StringReplace '{%value=loan}' '0' ''}' '-1' '<span style="color:#FF6666;font-weight:bold;" title="loaned since {%value=loandate}">&bull;&nbsp;</span>'}{#StringReplace '{#StringReplace '{%value=wish}' '0' ''}' '-1' '<span style="color:#6666FF;font-weight:bold;" title="on wishlist">&bull;&nbsp;</span>'}<a href="{%value=233}_files/movie{%value=mid}.html" target="movie"><span class="mtitle">{%value=title}</span><span class="otitle"> ({%value=origtitle})</span>{#StringReplace '{#StringReplace {%value=series}' '0' ''}' '-1' '<span class="series"> (Series)</span>'}{#StringReplace '{#StringReplace '{%value=year}' '{%value=year}' '<span class="year"> ('}{#ConditionAdd > '0' '{%value=year}' ')</span>'}' '<span class="year"> (0' ''}<span class="dateadded"> (added on {%value=dateadded})</span></a></li>
%FOOT%    </ul>
  </div>
  <div id="mcount">
    <script type="text/javascript">
    <!--
     document.write('<form action="#">')
     document.write('<div class="select"><input type="radio" class="radiobutton" name="newest" value="all" checked onclick="isgoodclick=true; showall();">&nbsp;show all entries</div>')
     document.write('<div class="select"><input type="radio" class="radiobutton" name="newest" value="25" onclick="isgoodclick=true; shownewest();">&nbsp;show newest 25 entries</div>')
     document.write('</form>')
     
     var nw = 25;
     var cdatenum = -1; // wird erst in cdatenum gesetzt!
     var issortmenuactive = false;
     var isotitleactive = false;
     var isgoodclick = false;

     function hideall()
     {
       var t=setTimeout("hideallx();",10);
     }

     function hideallx()
     {
       if (isgoodclick)
       {
         isgoodclick = false;
         return;
       }
       else
       {
         if (issortmenuactive) {sortmenu();}
       }
     }

     function swaptitleotitlex()
     {
       var i, j;
       var lis = document.getElementById("list").getElementsByTagName("li");
       var ul = document.createElement("ul");
       var slis;
       var s, d;
       var temp;
       var ok;
       xs = new Array();
       siz=lis.length;
       for (var i=siz-1; i>=0; i--)
       {xs.push(lis[i]);}
       document.getElementById("list").removeChild(document.getElementById("list").firstChild);
       for (i=0; i<siz; i++)
       {
         slis = xs[xs.length-1].getElementsByTagName("span");
         ok = true;
         j=0;
         while (j<slis.length && slis[j].className!="mtitle")
         {j++;}
         if (slis[j].className=="mtitle")
         {d=slis[j];}
         else
         {ok=false;}
         j=0;
         while (j<slis.length && slis[j].className!="otitle")
         {j++;}
         if (slis[j].className=="otitle")
         {s=slis[j];}
         else
         {ok=false;}
         if (ok && s.firstChild.data.length>3 && s.firstChild.data.charAt(1)=='(' && s.firstChild.data.charAt(s.firstChild.data.length-1)==')' && s.firstChild.data.charAt(0)==' ')
         {
           temp = s.firstChild.data.substring(2,s.firstChild.data.length-1);
           if (temp.length>0)
           {
             s.firstChild.data = " (" + d.firstChild.data + ")";
             d.firstChild.data = temp;
           }
         }
         ul.appendChild(xs.pop());
       }
       document.getElementById("list").appendChild(ul);
       var w = document.getElementById("wait");
       if (w) {w.style.display="none";}
     }

     function swaptitleotitle(x)
     {
       var w = document.getElementById("wait");
       if (w) {w.style.display="block";}
       if (issortmenuactive) {sortmenu();}
       if (!isotitleactive && x==1 || isotitleactive && x==2)
       {
         if (w) {w.style.display="none";}
         return;
       }
       isotitleactive = !isotitleactive;
       var t=setTimeout("swaptitleotitlex();",200);
     }

     function showorhideradios()
     {
       var ls = document.getElementById("list").getElementsByTagName("li");
       if (ls.length<=nw)
       {
         ls = document.getElementById("mcount").getElementsByTagName("form");
         ls[0].style.display = "none";
       }
     }

     function getdatenum(x)
     {
       var i;
       var dstr;
       var os = x.getElementsByTagName("span");
       for (i=0; i<os.length; i++)
       {
        if (os[i].className=="dateadded")
        {
          if (os[i].firstChild.data.length<=12 || os[i].firstChild.data.charAt(17)=='0')
          {return 0;}
          else
          {
            dstr = os[i].firstChild.data.substring(17,21);
            dstr += os[i].firstChild.data.substring(14,16);
            dstr += os[i].firstChild.data.substring(11,13);
            dstr += os[i].firstChild.data.substring(22,24);
            dstr += os[i].firstChild.data.substring(25,27);
          }
          i=os.length;
        }
       }
       return parseInt(dstr);
     }

     function numcomp(a, b) // für absteigende Sortierung
     {return b-a;}

     function setcdatenum()
     {
       var lis = document.getElementById("list").getElementsByTagName("li");
       var i;
       ds = new Array();
       for (i=0; i<lis.length; i++)
       {
         ds.push(getdatenum(lis[i]));
       }
       ds.sort(numcomp);
       if (ds.length>=nw)
       {cdatenum=ds[nw-1];}
       else if (ds.length>0)
       {cdatenum=ds[ds.length-1];}
       else
       {cdatenum=0;}
       ds.splice(0,ds.length); // free memory
     }
     
     function showallx()
     {
       var i;
       var lis = document.getElementById("list").getElementsByTagName("li");
       var ul = document.createElement("ul");
       xs = new Array();
       siz=lis.length;
       for (var i=siz-1; i>=0; i--)
       {xs.push(lis[i]);}
       document.getElementById("list").removeChild(document.getElementById("list").firstChild);
       for (i=0; i<siz; i++)
       {
         xs[xs.length-1].style.display="block";
         ul.appendChild(xs.pop());
       }
       document.getElementById("list").appendChild(ul);
       var w = document.getElementById("wait");
       if (w) {w.style.display="none";}
     }

     function showall()
     {
       var w = document.getElementById("wait");
       if (w) {w.style.display="block";}
       if (issortmenuactive) {sortmenu();}
       resetfilters(-1);
       var t=setTimeout("showallx();",200);
     }

     function resetradios()
     {
       var radios = document.getElementById("mcount").getElementsByTagName("input");
       if (radios[1].checked==true || radios[0].checked==false)
       {
         radios[0].checked = true;
         radios[1].checked = false;
         showall();
       }
       radios = document.getElementById("swaptitle").getElementsByTagName("input");
       if (radios && radios.length>1)
       {
         if (!isotitleactive)
         {
           radios[0].checked = true;
           radios[1].checked = false;
         }
         else
         {
           radios[1].checked = true;
           radios[0].checked = false;
         }
       }
     }
     
     function resetfilters(exceptx)
     {
       var i;
       var j;
       var ids = new Array("filtergenre", "filtercategory", "filterlanguage");
       var radios, menu;
       for (j=0; j<3; j++)
       {
         menu = document.getElementById(ids[j]);
         if (menu) {radios=menu.getElementsByTagName("input");}
         if (radios && exceptx!=j)
         {
           for (i=0; i<radios.length-1; i++)
           {radios[i].checked = false;}
           radios[i].checked = true;
         }
       }
     }

     function shownewestx()
     {
       var i;
       var j;
       if (cdatenum<0) {setcdatenum();}
       var lis = document.getElementById("list").getElementsByTagName("li");
       var ul = document.createElement("ul");
       xs = new Array();
       siz=lis.length;
       for (var i=siz-1; i>=0; i--)
       {xs.push(lis[i]);}
       document.getElementById("list").removeChild(document.getElementById("list").firstChild);
       for (i=0; i<siz; i++)
       {
         if (getdatenum(xs[xs.length-1])<cdatenum || j>=nw)
         {
           xs[xs.length-1].style.display="none";
         }
         else 
         {j++;}
         ul.appendChild(xs.pop());
       }
       document.getElementById("list").appendChild(ul);
       var w = document.getElementById("wait");
       if (w) {w.style.display="none";}
     }
     
     function shownewest()
     {
       var w = document.getElementById("wait");
       if (w) {w.style.display="block";}
       if (issortmenuactive) {sortmenu();}
       var t=setTimeout("shownewestx();",200);
     }

     function isnormalchar(c)
     {
       if ((c<'a' && c!=' ' && (c<'0' || c>'9')) || c>'z')
       {return false;}
       return true;
     }

     var nchrfrom = new Array('à','á','â','ã','ä','å','æ', 'ç','é','è','ê','ë','ï','î','ì','í','ñ','ô','ö','ò','ó','õ','ø','œ', 'û','ü','ù','ú','û','ÿ','ý','ß' ,'ž','"','#','§','$','%','&','\'','(',')','*','+',',','-','.','/',':',';','<','=','>','?','@','[','\\',']','^','_','`','´','{','|','}','~','!','¡','¢','£','¤','¥','²','³');
     var nchrchto = new Array("a","a","a","a","a","a","ae","c","e","e","e","e","i","i","i","i","n","o","o","o","o","o","o","oe","u","u","u","u","u","y","y","ss","z","!","!","!","!","!","!","!", "!","!","!","!","!","!","!","!","!","!","!","!","!","!","!","!","!", "!","!","!","!","!","!","!","!","!","!","!","c","!","!","y","2","3");

     function makenormalchar(s,i)
     {
       for (var j=0; j<nchrfrom.length; j++)
       {
         if (s.charAt(i)==nchrfrom[j])
         {return s.substr(0,i).concat(nchrchto[j].concat(s.substr(i+1)));}
       }
       return s;
     }

     function getspandata(o,cn)
     {
       spans = o.getElementsByTagName("a")[0].getElementsByTagName("span");
       for (var i=0; i<spans.length; i++)
       {
         if (spans[i].className==cn) {return spans[i].firstChild.data;}
       }
       return "";
     }
     
     function ord(a, b)
     {
       a = a.toLowerCase();
       b = b.toLowerCase();
       var l = Math.min(a.length,b.length);
       for (var i=0; i<l; i++)
       {
         if (a.charAt(i)!=b.charAt(i))
         {
          if (!isnormalchar(a.charAt(i)))
          {a=makenormalchar(a,i);}
          if (!isnormalchar(b.charAt(i)))
          {b=makenormalchar(b,i);}
          if (a.charAt(i)>b.charAt(i)) {return 1;}
          else if (a.charAt(i)<b.charAt(i)) {return -1;}
          l = Math.min(a.length,b.length);
         }
       }
       if (a.length>b.length) {return 1;}
       else if (a.length<b.length) {return -1;}
       return 0;
     }

     function ordnewest(a, b)
     {
       var x = -ord(getspandata(a,"year"),getspandata(b,"year"));
       if (x==0) {return ord(getspandata(a,"mtitle"),getspandata(b,"mtitle"));}
       return x;
     }
     
     function ordtitle(a, b)
     {
       var x = ord(getspandata(a,"mtitle"),getspandata(b,"mtitle"));
       if (x==0) {return ord(getspandata(a,"year"),getspandata(b,"year"));}
       return x;
     }
     
     function ordnewestadded(a, b)
     {
       var x = getdatenum(a);
       var y = getdatenum(b);
       if (x>y) {return -1;}
       else if (x<y) {return 1;}
       return ordtitle(a,b);
     }

     function resortx(how)
     {
       var ls = document.getElementById("list").getElementsByTagName("li");
       var ul = document.createElement("ul");
       xs = new Array();
       siz=ls.length;
       for (var i=0; i<siz; i++)
       {xs.push(ls[i]);}
       document.getElementById("list").removeChild(document.getElementById("list").getElementsByTagName("ul")[0]);
       if (how==1) {xs.sort(ordtitle);}
       else if (how==2) {xs.sort(ordnewest);}
       else if (how==3) {xs.sort(ordnewestadded);}
       xs.reverse();
       for (var i=0; i<siz; i++)
       {ul.appendChild(xs.pop());}
       document.getElementById("list").appendChild(ul);
       var w = document.getElementById("wait");
       if (w) {w.style.display="none";}
     }

     function resort(how)
     {
       var w = document.getElementById("sort");
       if (w)
       {
         w.style.display="none";
         issortmenuactive=false;
       }
       w = document.getElementById("wait");
       if (w) {w.style.display="block";}
       var t=setTimeout("resortx("+how+");",200);
     }

     function sortmenu()
     {
       var w1 = document.getElementById("sort");
       var w2 = document.getElementById("filtergenre");
       var w3 = document.getElementById("filterlanguage");
       var w4 = document.getElementById("filtercategory");
       if (w1)
       {
         if (!issortmenuactive)
         {
           w1.style.display="block";
           issortmenuactive=true
         }
         else
         {
           w1.style.display="none";
           if (w2) {w2.style.display="none";}
           if (w3) {w3.style.display="none";}
           if (w4) {w4.style.display="none";}
           issortmenuactive=false;
         }
       }
     }
     
     function focuslink(hrefinlink)
     {
       var als = document.getElementById("list").getElementsByTagName("a");
       var i;
       for (i=0; i<als.length; i++)
       {
         if (als[i].getAttribute('href')==hrefinlink && als[i].parentNode && (!als[i].parentNode.style.display || als[i].parentNode.style.display!='none')) {als[i].focus();}
       }
     }
     
     document.write('<form action="#">')
     document.write('<div class="sortbutton"><input type="button" name="sort" value="Further options..." onclick="isgoodclick=true; sortmenu();"></div>')
     document.write('</form>')
    //-->
    </script>
    <div class="count">({%value=231}: {%value=200} movies)</div>
  </div>
  <script type="text/javascript">
  <!--
   document.write('<div id="wait">')
   document.write('Rebuilding list...')
   document.write('</div>')
   document.write('<div id="sort" onclick="isgoodclick=true;">')
   document.write('<form action="#">')
   document.write('<div class="sortinfo">Sort list by...<br>&nbsp;</div>')
   document.write('<div class="sort"><input type="radio" class="radiobutton" name="sort" value="all" onclick="isgoodclick=true; resort(1);">&nbsp;Title (alphabetical)</div>')
   document.write('<div class="sort"><input type="radio" class="radiobutton" name="sort" value="year" onclick="isgoodclick=true; resort(2);">&nbsp;Year (newest first)</div>')
   document.write('<div class="sort"><input type="radio" class="radiobutton" name="sort" value="added" onclick="isgoodclick=true; resort(3);">&nbsp;Date added (newest first)</div>')
   document.write('</form>')
   document.write('<form action="#" id="swaptitle">')
   document.write('<div class="swaptitleinfo">Display...<br>&nbsp;</div>')
   document.write('<div class="swaptitle"><input type="radio" class="radiobutton" name="swaptitle" value="mtitle" onclick="isgoodclick=true; swaptitleotitle(1);" selected>&nbsp;Title</div>')
   document.write('<div class="swaptitle"><input type="radio" class="radiobutton" name="swaptitle" value="otitle" onclick="isgoodclick=true; swaptitleotitle(2);">&nbsp;Original title</div>')
   document.write('</form>')
  //-->
  </script>
  <script src="./{%value=233}_files/javascript/filter.js" type="text/javascript"></script>
  <script type="text/javascript">
  <!--
   document.write('</div>')
   showorhideradios();
   resetradios();
  //-->
  </script>
  <script src="./{%value=233}_files/javascript/filterfunc.js" type="text/javascript"></script>
  <div id="movie">
    <iframe id="frame" name="movie" src="{%value=233}_files/empty.html" width="100%" height="100%" scrolling="auto" marginheight="0" marginwidth="0" frameborder="0">
      <p>
        This layout relies on iframes. Your browser does not support iframes.
      </p>
    </iframe>
  </div>
  <script type="text/javascript">
  <!--
   if (window.location.search!="")
   {
     if (window.location.search.length>5 && window.location.search.substr(window.location.search.length-4,4)=="html")
     {
       focuslink(window.location.search.substr(1));
       movie.location.href = window.location.search.substr(1);
     }
     else if (window.location.search.length>1 && window.location.search.substr(1)==String(parseInt(window.location.search.substr(1))))
     {
       movie.location.href = "./{%value=233}_files/movie" + window.location.search.substr(1) + ".html";
       focuslink("{%value=233}_files/movie" + window.location.search.substr(1) + ".html");
     }
   }
  //-->
  </script>
</body>
</html>
%FOOT%
