function showPassInput() {
//bg
  var bgObj=document.getElementById("bgDiv");
  bgObj.style.width = document.body.offsetWidth + "px";
  bgObj.style.height = screen.height + "px";
  bgObj.style.display="";

//window
  var msgObj=document.getElementById("msgDiv");
  msgObj.style.marginTop = -75 +  document.documentElement.scrollTop + "px";
  msgObj.style.display="";
}

function showPassInput(obj) {
//bg
  var bgObj=document.getElementById("bgDiv");
  bgObj.style.width = document.body.offsetWidth + "px";
  bgObj.style.height = screen.height + "px";
  bgObj.style.display="";

//window
  var msgObj=document.getElementById("msgDiv");
  msgObj.style.marginTop = -75 +  document.documentElement.scrollTop + "px";
  msgObj.style.display="";
  document.getElementById("photoGroupID").value=obj;
}

function CloseInput()
{
    var bgObj=document.getElementById("bgDiv");
    var msgObj=document.getElementById("msgDiv");
    var tipObj=document.getElementById("qd");
    bgObj.style.display = msgObj.style.display = "none";
    msgObj.style.display = bgObj.style.display = "none";
    tipObj.innerHTML="";
}

function checkpassInput(obj)
{
    var myobj=document.getElementById(obj);
    var myform=document.getElementById('Inputpass');
    if(myobj.value.length==0)
    {
        alert('NOT null!');
    }else
    {
        myform.submit();
    }
}

function ajaxsendpass(g,u,p)
{
    var xmlHttp;
    var gg=document.getElementById(g).value;
    var uu=document.getElementById(u).value;
    var pp=document.getElementById(p).value;
    try
    {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(e)
    {
        xmlHttp = new XMLHttpRequest();
    }
    var url="../jsAction.ashx?ActionType=jsAction_setphotopass&photoGroupID="+gg+"&requestUser_ID="+uu+"&requestPass="+pp;
    xmlHttp.open("get",url,true);
    xmlHttp.onreadystatechange = function()
    {
        if(xmlHttp.readyState == 4)
        {
            if(xmlHttp.status == 200)
            {
                if(xmlHttp.responseText=="1")
                {
                    location.reload();
                }
                else
                {
                    alert('Not null');
                }
            }
        }
     }
     xmlHttp.send(null);
}
