﻿// JScript File
//Shape.aspx Page
function shape1()
 { 
   var f=false;
    var p=document.getElementById("txt1");
    var p1=document.getElementById("TextBox1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Shape Name');
       p.focus();
     }
     else if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Display Name');
       p1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  

//Shape_ED.aspx Page

   function shape2(t)
 {
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Shape Name');
       t.txtclarity.focus();
     }
     else if (t.txtclarity1.value=="")
     {
       alert('Fill Display Name');
       t.txtclarity1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //for color.aspx
   
   function colour1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Color Name');
       p.focus();
     }
       else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //for color_ED
   
   function colour2(t)
 {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Color Name');
       t.txtclarity.focus();
     }
      else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
     }
     
     //function Clarity.aspx
     
     function clarity1()
 {
   var f=false;
   var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Clarity Name');
       p.focus();
     }
      else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
       p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //function Clarity_ED.aspx
   
   function clarity2(t)
 {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Clarity Name');
       t.txtclarity.focus();
     }
      else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }
   
   // function Culet.aspx
    function culet1()
 {
   var f=false;
     var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Culet Name');
       p.focus();
     }
      else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   //for Culet_ED.aspx
   
   function culet2(t)
  {
    var f=false;
    var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Culet Name');
       t.txtclarity.focus();
     }
       else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }    
   
   //For function Polish.aspx
   function Polishgradegradegr1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    var p1=document.getElementById("TextBox1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Polish Name');
       p.focus();
     }
     else if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Display Name');
       p1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
      p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
      p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   // for function Polish_Ed.aspx
   function Polishgradegradegr2(t)
 {
   var f=false;
   var p=t.txtclarity.value;
   var p1=t.TextBox1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Polish Name');
       t.txtclarity.focus();
     }
      else if (t.TextBox1.value=="")
     {
       alert('Fill Display Name');
       t.TextBox1.focus();
     }
    else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
      t.TextBox1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }   
   
   //fro function Symmetry.aspx
   function symm1()
 {
   var f=false;
   var p=document.getElementById("txt1");
    var p1=document.getElementById("TextBox1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Symmentry Name');
       p.focus();
     }
      else if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Display Name');
       p1.focus();
     }
      else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   // for Symmetry_Ed.aspx
   function symm2(t)
 {
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Symmentry Name');
       t.txtclarity.focus();
     }
      else if (t.txtclarity1.value=="")
     {
       alert('Fill Display Name');
       t.txtclarity1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   } 
   //For Cut.aspx

   function cut1()
 {
   var f=false;
   var p=document.getElementById("txt1");
    var p1=document.getElementById("TextBox1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Cut Name');
       p.focus();
     }
      else if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Display Name');
       p1.focus();
     }
      else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   
   //For Cut_Ed.aspx
   
   function cut2(t)  
{
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Cut Name');
       t.txtclarity.focus();
     }
     else if (t.txtclarity1.value=="")
     {
       alert('Fill Display Name');
       t.txtclarity1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }   
   //For Category.aspx
   function cat1()
 {
   var f=false;
   var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Category Name');
       p.focus();
     }
   else if (p.length > 20)
   {
    alert('Enter Maximum 20 Characters !');
    p.focus();
   }

     else
     {
       f=true;
     }
     return f;
   }  
   //For Category_ED.aspx
   
   function cat2(t)
 {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Category Name');
       t.txtclarity.focus();
     }
     else if (p1.length > 20)
   {
   alert('Enter Maximum 20 Characters !');
   t.txtclarity.focus();
   }
     else
     {
       f=true;
     }
     return f;
   }  
   //For Certificate.aspx
   
   function certi1()
 {
    var f=false;
    var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Certificate Name');
       p.focus();
     }
     else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   //For Certificate_ED.aspx
   function certi2(t)
 {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Certificate Name');
       t.txtclarity.focus();
     }
     else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
   } 
   //For Certitype.aspx
   function certity1()
    {
    var f=false;
    var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Certificate Type ');
       p.focus();
     }
     else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   //For Certitype_Ed.aspx
   function certity2(t)
   {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Certificate Type');
       t.txtclarity.focus();
     }
     else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
       t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
   } 
   //For Inclusion.aspx
   function Inclu1()
    {
    var f=false;
    var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Inclusion Name');
       p.focus();
     }
     else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   
   //For Inclusion_Ed.aspx 
   function Inclu2(t)
   {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Inclusion Name');
       t.txtclarity.focus();
     }
     else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
       t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
   } 


   //For Flursn.aspx
   
    function inclus1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    var p1=document.getElementById("TextBox1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Fluorescence Name');
       p.focus();
     }
     else if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Display Name');
       p1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   //For Flursn_ED.aspx 
   
   function inclus2(t)
 
   {
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Fluorescence Name');
       t.txtclarity.focus();
     }
     else if (t.txtclarity1.value=="")
     {
       alert('Fill Display Name');
       t.txtclarity1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   //For index.aspx
   
   function valid(t)
   {
   v=false;
   if(t.txtusername.value=="")
   {
   alert('Please Enter User Name.')
   t.txtusername.focus();
   }
   else if(t.txtpass.value=="")
   {
   alert('Please Enter Password.')
   t.txtpass.focus();
   }
   else if((t.txtpass.value.length)<6 || (t.txtpass.value.length)>20)
   {
   alert('Password should be min 6 and max 20 alphanumeric.')
   t.txtpass.focus();
   }
   else
   {
   v=true;
   }
   return v;
   }
   
   //For Luster.aspx
   
   function luster1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    var p1=document.getElementById("TextBox1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Luster Name');
       p.focus();
     }
     else if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Display Name');
       p1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   
   
   
   //Luster_ED.aspx Page

   function luster2(t)
 {
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Luster Name');
       t.txtclarity.focus();
     }
     else if (t.txtclarity1.value=="")
     {
       alert('Fill Display Name');
       t.txtclarity1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   //For Ci.aspx
   
   function Ci1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    var p1=document.getElementById("TextBox1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill CI Name');
       p.focus();
     }
     else if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Display Name');
       p1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   //Ci_ED.aspx Page

   function Ci2(t)
 {
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill CI Name');
       t.txtclarity.focus();
     }
     else if (t.txtclarity1.value=="")
     {
       alert('Fill Display Name');
       t.txtclarity1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
    //For Ip.aspx
   
   function Ip1(t)
 {
   var f=false;
    var p=t.txt1.value;
    var p1=t.TextBox1.value;
    if (t.txt1.value=="")
     {
       alert('Fill IP Name');
       t.txt1.focus();
     }
     else if (t.TextBox1.value=="")
     {
       alert('Fill Display Name');
       t.TextBox1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txt1.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.TextBox1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   //Ip_ED.aspx Page

   function Ip2(t)
 {
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill IP Name');
       t.txtclarity.focus();
     }
     else if (t.txtclarity1.value=="")
     {
       alert('Fill Display Name');
       t.txtclarity1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //For Natts.aspx
   
   function Natts1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    var p1=document.getElementById("TextBox1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Natts Name');
       p.focus();
     }
     else if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Display Name');
       p1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   //Natts_ED.aspx Page

   function Natts2(t)
 {
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Natts Name');
       t.txtclarity.focus();
     }
     else if (t.txtclarity1.value=="")
     {
       alert('Fill Display Name');
       t.txtclarity1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //For Size.aspx
    
    function size1()
 {
   var f=false;
   var p=document.getElementById("txt1");
    var p1=document.getElementById("txt2");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill Size From!');
       p.focus();
     }
    else if (isNaN(document.getElementById("txt1").value))
     {
       alert('Size From should be Numeric!');
       p.focus();
     }
    else if (document.getElementById("txt2").value=="")
     {
       alert('Fill Size To');
       p1.focus();
     }
       else if (isNaN(document.getElementById("txt2").value))
     {
       alert('Size To should be Numeric!');
       p1.focus();
     }
     else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
      p.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     p1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   }  
   
   //For Size_ED.aspx
   
   function size2(t)
 {
   var f=false;
    var p=t.txtclarity.value;
    var p1=t.txtclarity1.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill Size From!');
       t.txtclarity.focus();
     }
    else if (isNaN(t.txtclarity.value))
     {
       alert('Size From should be Numeric!');
       t.txtclarity.focus();
     }
    else if (t.txtclarity1.value=="")
     {
       alert('Fill Size To!');
       t.txtclarity1.focus();
     }
      else if (isNaN(t.txtclarity1.value))
     {
       alert('Size From should be Numeric!');
       t.txtclarity1.focus();
     }
    else if (p.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
     t.txtclarity.focus();
    }
     else if (p1.length > 20)
    {
     alert('Enter Maximum 20 Characters !');
      t.txtclarity1.focus();
    } 
     else
     {
       f=true;
     }
     return f;
   } 
   
   
   //for TabIncl.aspx
   
   function TabIncl1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill TabIncl Name');
       p.focus();
     }
       else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //for TabIncl_ED.aspx
   
   function TabIncl2(t)
 {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill TabIncl Name');
       t.txtclarity.focus();
     }
      else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
     }
     
     
    //for InclPattern.aspx
   
   function InclPat1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill InclPattern Name');
       p.focus();
     }
       else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //for InclPattern_Ed.aspx
   
   function InclPat2(t)
 {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill InclPattern Name');
       t.txtclarity.focus();
     }
      else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
     } 
     
     
     //for BIC.aspx
   
   function BIC1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill BIC Name');
       p.focus();
     }
       else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //for BIC_Ed.aspx
   
   function BIC2(t)
 {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill BIC Name');
       t.txtclarity.focus();
     }
      else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
     } 
     
     
     //for BIS.aspx
   
   function BIS1()
 {
   var f=false;
    var p=document.getElementById("txt1");
    if (document.getElementById("txt1").value=="")
     {
       alert('Fill BIS Name');
       p.focus();
     }
       else if (p.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      p.focus();
     }
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //for BIS_Ed.aspx
   
   function BIS2(t)
 {
   var f=false;
   var p1=t.txtclarity.value;
    if (t.txtclarity.value=="")
     {
       alert('Fill BIS Name');
       t.txtclarity.focus();
     }
      else if (p1.length > 20)
     {
      alert('Enter Maximum 20 Characters !');
      t.txtclarity.focus();
     }
     else
     {
       f=true;
     }
     return f;
     } 
     
     //For Quoteday.aspx
    
    function Qday()
 {
   var f=false;
   var p=document.getElementById("TextBox1");
   
    if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Days');
       p.focus();
     }
    else if (isNaN(document.getElementById("TextBox1").value))
     {
       alert('Days should be Numeric!');
       p.focus();
     }
   
     else
     {
       f=true;
     }
     return f;
   }  
   
   
   //For Timeframe.aspx
    
    function Tframe()
 {
   var f=false;
   var p=document.getElementById("TextBox1");
   
    if (document.getElementById("TextBox1").value=="")
     {
       alert('Fill Days');
       p.focus();
     }
    else if (isNaN(document.getElementById("TextBox1").value))
     {
       alert('Days should be Numeric!');
       p.focus();
     }
   
     else
     {
       f=true;
     }
     return f;
   } 
   


////////Event.aspx///

function Event()
   {
   v=false;
   if(document.getElementById("txtename").value=="")
   {
   alert('Please Enter Event Name.')
   document.getElementById("txtename").focus();
   }
   
   else
   {
   v=true;
   }
   return v;
   }
   
//****************For Admin Page***************Admin.aspx**********
function admin()
{
if(document.getElementById("txtusername").value=="")
{
alert('Please fill the User name');
document.getElementById("txtusername").focus();
return false;
}
if(document.getElementById("txtpass").value=="")
{
alert('Please fill the Password');
document.getElementById("txtpass").focus();
return false;
}
}   


// For Forgotpwd.aspx
   
   function valid1()
   {
   var f=false;
  
  var Cemail=document.getElementById("txtEmail");//
  

  if(document.getElementById("txtEmail").value=="")
 {
  alert('Please Enter Email Id!');
  Cemail.focus();
 } 
 else if(!isValidEmail(Cemail.value))
//else if (document.getElementById("txtemail").value=="")//(!isValidEmail(document.getElementById("txtEmail").value))
//else if (!isValidEmail(txtEmail.value))
 {
 alert('Please Enter Proper Email Id!!');
 Cemail.focus();
 //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; 
        }
    }  
    
    
    
    
    //For changepwd.aspx
   
   function chpwd()
   {
   v=false;
   if(document.getElementById("txtnewpass").value=="")
   {
   alert('Please Enter New Password.')
   document.getElementById("txtnewpass").focus();
   }
   else if(document.getElementById("txtConfpass").value=="")
   {
   alert('Please Enter Confirm Password.')
   document.getElementById("txtConfpass").focus();
   }
   else if((document.getElementById("txtConfpass").value.length)<6 || (document.getElementById("txtConfpass").value.length)>20)
   {
   alert('Password should be min 6 and max 20 alphanumeric.')
   document.getElementById("txtConfpass").focus();
   }
   
//   else if(t.txtConfpass.value=="")
//				{
//				alert('Please enter the confirm password');
//				confirmpass.focus();
//				}	
//				else
else if(!(document.getElementById("txtnewpass").value==document.getElementById("txtConfpass").value))
				{
				alert('Confirm password should be match from your new password');
				document.getElementById("txtConfpass").focus();
				}	

   
   else
   {
   v=true;
   }
   return v;
   }
   
   
   
   /////////// CImgzoom.aspx /////////////////
function ImgPrt()
{
//alert('hhhh');
if(document.getElementById("IMPRINT").style.display=='none')
{
document.getElementById("IMPRINT").style.display='block';
}
else //if(document.getElementById("disp").style.display='block')
{
document.getElementById("IMPRINT").style.display='none';
}
}




//////////////////////////RSearch.aspx//////////
function carat()
{
if(document.getElementById("txtFsize").value=="")
{
alert('Carat Should not be Blank');
document.getElementById("txtFsize").focus();
return false;
}
//if(document.getElementById("txtFsize").value=="")
//{
//alert('Carat Should not be Blank');
//document.getElementById("txtTsize").focus();
//return false;
//}
}   

  
   