/*
 * Ext JS Library 2.1
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 *
 * http://extjs.com/license
 */
window.onload = passBox //begin the initialization when window loads
var pword = false;
var urlCancel = "index.php";

function passBoxCheck() {
    if (pword == false){
    passBox();}
    }

function passBox()
{
  Ext.MessageBox.prompt('Password', 'Please enter the Password:',
    function(btn, text)
    {
       if (btn == 'ok')
       {
            if (text != 'gallery'){
                pword = false;
                passBoxCheck();
                }

            if (text == 'gallery'){
                pword = true;
                }
            }
        if (btn == 'cancel'){
            urlCancel = document.referrer;
            window.location.replace(urlCancel);}}
  );
if (pword == true){
          Ext.MessageBox.alert('Status', 'You are already logged in');
          }
                document.uploadForm.myimages.value='';
                document.uploadForm.mythumbs.value='';
}
