﻿// JScript File
////*********************************************
//function stateChanged()
//{
//if (xmlhttp.readyState==4)
//  {
//  document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
//  }
//}

//function GetXmlHttpObject()
//{
//if (window.XMLHttpRequest)
//  {
//  // code for IE7+, Firefox, Chrome, Opera, Safari
//  return new XMLHttpRequest();
//  }
//if (window.ActiveXObject)
//  {
//  // code for IE6, IE5
//  return new ActiveXObject("Microsoft.XMLHTTP");
//  }
//return null;
//}

//function showCustomer1(str)
//{
//xmlhttp=GetXmlHttpObject();
//if (xmlhttp==null)
//  {
//  alert ("Your browser does not support AJAX!");
//  return;
//  }
//var url="Sendmail.aspx";
//url=url+"?to="+document.getElementByID("txtto").value+"-"+document.getElementByID("txtmsg").value+"-"+document.getElementByID("txtname").value+"-"+document.getElementByID("txtemail").value;
////url=url+"&sid="+Math.random();
//xmlhttp.onreadystatechange=stateChanged;
//xmlhttp.open("GET",url,true);
//xmlhttp.send(null);
//}
//********************For Forgotpassword page
 function valid1()
{
  var f=false;
 if(document.getElementById("txtEmail").value=="")
 {
  alert('Please enter the email Id !');
   document.getElementById("txtEmail").focus();
 } 
else if (!isValidEmail(document.getElementById("txtEmail").value))
//else if (!isValidEmail(txtEmail.value))
 {
 alert('Please Enter Proper Email Id!');
 document.getElementById("txtEmail").focus();
 }
 else
 {
 f=true;
 }
 return f;
}
 
   
   function isValidEmail(email){ 
    var RegExp = /^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/
    if(RegExp.test(email)){ 
        return true; 
    }else{ 
        return false; 
        }
    }  

function ImgPrt()
{
if(document.getElementById("IMPRINT").style.display=='none')
{
document.getElementById("IMPRINT").style.display='block';
}
else 
{
document.getElementById("IMPRINT").style.display='none';
}
}
function certmail()
{
if(document.getElementById("txtTomail").value=="")
{
alert('Please fill the email Id');
document.getElementById("txtTomail").focus();
return false;
}
if(!isValidEmail(document.getElementById("txtTomail").value))
{
alert('Please fill the proper email Id');
document.getElementById("txtTomail").focus();
return false;
}
if(document.getElementById("txtmailcc").value=="")
{
alert('Please fill the email Id');
document.getElementById("txtmailcc").focus();
return false;
}
if(!isValidEmail(document.getElementById("txtmailcc").value))
{
alert('Please fill the proper email Id');
document.getElementById("txtmailcc").focus();
return false;
}
if(document.getElementById("txtsub").value=="")
{
alert('Please fill the subject');
document.getElementById("txtsub").focus();
return false;
}
}
//********For GIA request mail***********************
function ImgPrt1()
{
if(document.getElementById("div_senReq").style.display=='none')
{
document.getElementById("div_senReq").style.display='block';
}
else 
{
document.getElementById("div_senReq").style.display='none';
}
}
function sendmail()
{
alert('Are you sure want to request the certificate mail');
return true;
}