function test(item,x,y){
  if(item){
    var ih=item.height;
    var iw=item.width;
    if(iw>x)
      item.width=x;
    if(ih>y)
      item.height=y;  
  }
} 
  
function confirmDelete(action,information) {
  var check = window.confirm(information);
  if (check == true) {
    document.location.href = action; 
    return true;
  }
}

function display(myimage) {
  html = '<HTML><HEAD><TITLE>Photo</TITLE></HEAD><BODY LEFTMARGIN=10 MARGINWIDTH=10 TOPMARGIN=10 MARGINHEIGHT=10>'
  + '<table align="center"><tr><td>' 
  + "<IMG style=\"cursor:pointer;\" SRC='" + myimage + "' BORDER=0 NAME=image " 
  + "onload='window.resizeTo(document.image.width+35,document.image.height+75)' "
  + "onclick='window.close()' >"
  + "</td></tr></table>" 
  + "</BODY></HTML>";
  popup=window.open('','image','height=1,width=1,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,status=0,resizable=1');
  popup.document.open();
  popup.document.write(html);
};

function changeFocus(){
  document.getElementById("passid").focus();
}

function loginTypeChange(){
	document.getElementById("passwordbox").innerHTML = "<input id=\"passid\" class=\"loginInputText\" type=\"password\" name=\"password\" />";
	setTimeout("changeFocus();",100)
}

