/*
apb.js - JavaScripts for Atom PhotoBlog
Copyright (C) 2007 by Sascha Tayefeh
http://www.tayefeh.de/

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

function showCommentForm() {
   document.getElementById("apbCommentHide").style.display="block";
}

var blink_speed=500;
var i=0;


function showPendingSignal() {
   var bodyNode= document.getElementsByTagName("body");
   var javascriptMessage= document.getElementById("javascriptMessage");
   var mainDiv= document.getElementById("apbMainContainer");
   var x =0;
   var y =0;
   mainDiv.style.display="none";
   mainDiv.style.visibility="hidden";
   javascriptMessage.innerHTML="<p>UPLOADING FILES<br/>this may take some time, please wait</p>";
// In this special case, we want to be independent of the style sheet ;-)
   javascriptMessage.innerHTML="<p> UPLOADING FILES<br/>this may take some time, please wait</p>";
   javascriptMessage.style.background="#e8e8e8";
   javascriptMessage.style.fontSize="x-large";
   javascriptMessage.style.color="#090";
   javascriptMessage.style.border="2px solid";
   javascriptMessage.style.borderColor="#0c0";
   javascriptMessage.style.textAlign="center";
   javascriptMessage.style.padding="1em";
   javascriptMessage.style.margin="0px";
   javascriptMessage.style.width="100%";
   javascriptMessage.style.left="0px";

   if(i%2==0)
   { javascriptMessage.style.visibility="visible";
   } else
   { javascriptMessage.style.visibility="hidden";
   }

   if(i<1)
   { i++; } 
   else
   { i-- }
   setTimeout("showPendingSignal()",blink_speed);
}




function addUploadForm() {
   var formNode;
   var lastDL;
   var newDL;
   var newDLInputs;

   formNode=document.getElementById("uploadForm");
   lastDL=formNode.lastChild;
   newDL=lastDL.cloneNode(true);
   newDLInputs= newDL.getElementsByTagName("input");

   formNode.appendChild(newDL);


}
