﻿function winpopup(strUrl)
{	
    var strUrl;	
    var newWin=window.open(strUrl,'MyWindow2','x=0,y=0,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=1,copyhistory=no,width=800,height=400,screenX=0,screenY=0,left=110,top=200');	
    newWin.focus();
}

function Submit_onclick()
{
    if (document.getElementById("txtName").value=="")
    alert("user name must be entered");
    else if (document.getElementById("txtPassword").value=="")
    alert("Password must be entered");
    else
    document.form1.submit();
}

function filltxt(opt)
{  
  var name =document.getElementById("txtName");
  var pwd =document.getElementById("txtPassword");          
  if(opt=="1" && name.value=="")
  {
     name.value ="User Name";
     name.focus();
  }
  else if(opt=="2" && pwd.value=="")
  {
     pwd.value ="Password";
     pwd.focus();
  }             
}

function clrtxt(opt)
{  
  var name =document.getElementById("txtName");
  var pwd =document.getElementById("txtPassword");
  if(opt=="1" && name.value=="User Name")
  {
     name.value ="";
     name.focus();
  }
  else if(opt=="2" && pwd.value=="Password")
  {
     pwd.value ="";
     pwd.focus();
  }             
}
