﻿// JScript File

function getURL(sName, sEmail)
{
//debugger

window.location ="webmail.aspx?name="+sName+"&email="+sEmail;

}





function EmailValid()
{                
s=document.form1.Txt_Login.value;
p1=s.indexOf('@');
p2=s.indexOf('.');
d=p2-p1;
if (p1==-1 || p1==0 || p2==-1 || d<=1 ||  s=="")
{
alert("Invalid EmaiId");
document.form1.Txt_Login.focus();
}
}

function Blank_Password()
{
    s = document.form1.Txt_Password.value;
    if (s=="")
    {
        alert("Please Insert Password")
    }
    }
    
    function Close()
{
window.close();
};




//Email validation
function EmailValid(str,str2,str3,str4,str5)
{
var val=str.id ;
var ss="";
var CountVal="";
gy = val.split(",");

for (i=0;i<gy.length;i++) {
ft = gy[i].split(",");

var s=document.getElementById(ft).value; 
p1=s.indexOf('@');
p2=s.indexOf('.');
d=p2-p1;
if (p1==-1 || p1==0 || p2==-1 || d<=1 ||  s=="")
{
ss=ft ;
CountVal=1;

}
}
if (!(CountVal==""))
{
document.getElementById(ss).focus(); 
alert("Invalid E-mailId");
}
}


//get blacnk Field
function Blank (str,str2,str3,str4,str5)
{
//debugger
var val=str.id;
var ss="";
var CountVal="";
gy = val.split(",");

for (i=0;i<gy.length;i++)
 {
ft = gy[i].split(",");
var s=document.getElementById(ft).value
if (s=="")
{
CountVal=1;
}

}
if (!(CountVal==""))
{
alert("Can not be blank any field");
}
}


//get blacnk Field
function Phone_No (str,str2,str3,str4,str5)
{
//debugger
var val=str.id;
var ss="";
var CountVal="";
gy = val.split(",");

for (i=0;i<gy.length;i++)
 {
ft = gy[i].split(",");
var s=document.getElementById(ft).value
if (s=="")
{
CountVal=1;
}

}
if (!(CountVal==""))
{
alert("Can not be blank any field");
}
}



//debugger

 function PasswordMatch(t1, t2)
    {
      
        if ( t1.value!= t2.value)
        {
        
            alert("Password Missmatch");
            t2.value="";
         }
    }
    
    
function EmailValid(EmailTextbox)
{                
    var s=EmailTextbox.value;
    var p1=s.indexOf('@');
    var p2=s.indexOf('.');
    d=p2-p1;
    if (p1==-1 || p1==0 || p2==-1 || d<=1 ||  s=="")
    {
        alert("Invalid EmaiId");
        EmailTextbox.focus();
    }
}



function TxtBlnk(AnyTxtBx1, AnyTxtBx2, AnyTxtBx3)
{                
    if ((AnyTxtBx1.value = "") || (AnyTxtBx2.value = "")|| (AnyTxtBx3.value = ""))
    {
        alert ("Please Fill Up All Mandatory Fields");
       
    }
   
   
}

