﻿// JScript File
// JScript File

  function GetDate(CtrlName)

    {

  

        ChildWindow = window.open('serartist.aspx?FormName=' + document.forms[0].name  + '&CtrlName=' + CtrlName, "PopUpCalendar", "width=300,height=250,top=100,left=200,toolbars=no,scrollbars=no,status=no,resizable=no");

    }

 

   function CheckWindow()

   {

      ChildWindow.close();

   }

   





function newlocation()
{
//window.location="Studio/artist.aspx";
//txtartistname.value=HiddenField1.value;
//javascript:self.close();
//alert('asdasd');
window.close();

}

function newWindow(mypage,myname,w,h,features)
{
  if(screen.width){
  var winl = (screen.width-w)/740;
  var wint = (screen.height-h)/502;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

function newWinClose(mypage,myname,w,h,features) { 
  window.close();    
}

function validtxt(t)
    {
   v=false;
   if (t.txtfname.value=="")
    {
    alert("Enetr First Name!");
    t.txtfname.focus();
    }
    else if (t.txtphno.value=="")
    {
    alert("Enetr Phone No.!");
    t.txtphno.focus();
    }
    else if (!(t.txtphno.value < 5 || t.txtphno.value>9))
    {
    alert("Please Enter Numeric Value !");
    t.txtphno.focus();
    }
    else if (t.txtmail.value=="")
    {
    alert('Enter Email Id. !')
    t.txtmail.focus();
    }    
     else if (!(t.txtmail.value=="" || t.txtmail.value==null))
    {    
            apos=t.txtmail.value.indexOf("@"); 
            dotpos=t.txtmail.value.lastIndexOf(".");
            lastpos=t.txtmail.value.length-1;
            if (apos<1 || dotpos<3 || lastpos<5 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2)
            {  
             alert('Incorrect Email Id !'); 
           }              
            else
            {                
                v=true;
            }    
         
    }   
    return v;
    }         

function clearTex(t)
    {
    //alert('asd');     
    var ob=document.getElementById("ImageButton1")
    if (window.event.keyCode<48 || window.event.keyCode>57)
    {
    alert('Please Enter Numeric Values !');    
    ob.focus();
    }
    }    
    
  function validtxt(t)
    {
   //alert('sdf'); 
   v=false;
   if (t.txtmsg.value=="")
    {
    alert("Enetr First Name!");    
    }     
    else
    {
    v=true;
    }    
    return v;
    }         