//**********************************
// write home date
function HomeDate()
 {

today=new Date();

document.writeln("<CENTER><FONT CLASS='address'>&copy;1994-"+getFullYear(today)+" Yadav Measurements (P) Ltd. All Rights Reserved.<BR>Last Updated: ");
   
  document.write(months[dateY2K.getMonth() + 1] + ' ' + dateY2K.getDate() + ', ' + y2k(dateY2K.getYear()) + '. ');

 }

  function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this[i + 1] = makeArray.arguments[i]; }

  function getCorrectedYear(year) {
      year = year - 0;
      if (year < 70) return (2000 + year);
      if (year < 1900) return (1900 + year);
      return year;
  }

  function y2k(number) { return (number < 1000) ? number + 1900 : number; }

  var months = new makeArray('January','February','March','April','May','June','July','August','September','October','November','December');

  var date = new Date(document.lastModified);
  var dateY2K = new Date(getCorrectedYear(date.getYear()),date.getMonth(),date.getDate());
  var dateGMT = dateY2K.toGMTString();
  // end home date
//**********************************


//**********************************
// write search date
function SearchDate()
 {

today=new Date();

document.writeln("<CENTER><FONT CLASS='address'>&copy;1994-"+getFullYear(today)+" Yadav Measurements (P) Ltd. All Rights Reserved.<BR><BR>");

 }

  function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this[i + 1] = makeArray.arguments[i]; }

  function getCorrectedYear(year) {
      year = year - 0;
      if (year < 70) return (2000 + year);
      if (year < 1900) return (1900 + year);
      return year;
  }

  function y2k(number) { return (number < 1000) ? number + 1900 : number; }

  var months = new makeArray('January','February','March','April','May','June','July','August','September','October','November','December');

  var date = new Date(document.lastModified);
  var dateY2K = new Date(getCorrectedYear(date.getYear()),date.getMonth(),date.getDate());
  var dateGMT = dateY2K.toGMTString();
  // end search date
//**********************************


//**********************************
// write getFullYear
// fixes a Netscape 2 and 3 bug
function getFullYear(d) { // d is a date object
 yr = d.getYear();
 if (yr < 1000)
  yr+=1900;
 return yr;
}
// end getFullYear
// End hiding -->
//**********************************


// start write date
//**********************************
function initArray() {
 for(i=0;i<initArray.arguments.length; i++)
  this[i] = initArray.arguments[i];
}
var isnMonths=new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
var isnDays= new initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
today=new Date();
hrs=today.getHours();
min=today.getMinutes();
sec=today.getSeconds();
clckh=""+((hrs>12)?hrs-12:hrs); 
clckm=((min<10)?"0":"")+min;
clcks=((sec<10)?"0":"")+sec;
clck=(hrs>=12)?"p.m.":"a.m.";

var stnr="";
var ns="0123456789";
var a="";
// End Hiding -->

<!--Hide JavaScript from Java-Impaired Browsers
// fixes a Netscape 2 and 3 bug
function getFullYear(d) { // d is a date object
 yr = d.getYear();
 if (yr < 1000)
  yr+=1900;
 return yr;
}

// write date
function writeDate()
{
document.write("<FONT CLASS='Txtwhtdate'>"+isnDays[today.getDay()]+", "+isnMonths[today.getMonth()]+" "+today.getDate()+", "+getFullYear(today)+"</FONT>");
}
//  end write

//  end write date
//**********************************

<!-- Begin SH popupwindow
function openSHwindow(){
awindow = window.open("../careers/udaipur/sh.html","UDAIPUR","width=804,height=620,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin UFC popupwindow
function openUFCwindow(){
awindow = window.open("../careers/udaipur/pa2.html","UDAIPUR","width=804,height=623,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin UDP popupwindow
function openUDPwindow(){
awindow = window.open("../careers/udaipur/jm.html","UDAIPUR","width=804,height=620,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin LP popupwindow
function openLPwindow(){
awindow = window.open("../careers/udaipur/lp.html","UDAIPUR","width=804,height=620,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin KU popupwindow
function openKUwindow(){
awindow = window.open("../careers/udaipur/ku.html","UDAIPUR","width=503,height=345,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin PA popupwindow
function openPAwindow(){
awindow = window.open("../careers/udaipur/pa.html","UDAIPUR","width=804,height=570,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin CP popupwindow
function openCPwindow(){
awindow = window.open("../careers/udaipur/cp.html","UDAIPUR","width=804,height=325,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin FS popupwindow
function openFSwindow(){
awindow = window.open("../careers/udaipur/fs.html","UDAIPUR","width=604,height=420,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin ISO popupwindow
function openISOwindow(){
awindow = window.open("../au/iso.html","ISO","width=415,height=602,top=0,left=0,scrollbars=no");
}
// End -->

<!-- Begin OF popupwindow
function openOFwindow(){
awindow = window.open("../au/ofgem.html","ISO","width=334,height=523,top=0,left=0,scrollbars=no");
}
// End -->

//*************************************************

//Start contReady
function contReady(form)
{

//Start Name
 if(form.name) {
 if (isFilled(form.name) == false) {
 alert("Please enter your Name!");
 form.name.focus();
 return false;
 }
 }
//End Name

//Start Company Name
 if(form.company) {
 if (isFilled(form.company) == false) {
 alert("Please enter Name of Company!");
 form.company.focus();
 return false;
 }
 }
//End Company Name

//Start Address 
 if(form.add) {
 if (isFilled(form.add) == false) {
 alert("Please enter your Address!");
 form.add.focus();
 return false;
 }
 }
//End Address 

//Start City
 if(form.city) {
 if (isFilled(form.city) == false) {
 alert("Please enter your City!");
 form.city.focus();
 return false;
 }
 }
//End City Name

//Start Country
 if(form.country) {
 if (isFilled(form.country) == false) {
 alert("Please enter your Country!");
 form.country.focus();
 return false;
 }
 }
//End Country Name

//Start Email
if(form.email) {
if (isemail(form.email) == false) {
alert("Please enter your E-email correctly!");
form.email.focus();
return false;
}
}
//End Email

//Start Phone
if(form.phone) {
if (isphone(form.phone) == false) {
alert("Please enter your Phone No. correctly!");
form.phone.focus();
return false;
}
}
//End Phone

return true;
}
//End contReady

//**********************************

function isemail(field)
{ 
	  
    var strEmail=field.value;

    var index0=strEmail.indexOf(' ');
    if(index0>=0)
    {

        return false;
    }

    var index1=strEmail.indexOf('@');
    if(index1<=0)
    {

        return false;
    }

    var index3=strEmail.indexOf('@',index1+1);
    if(index3>=0)
    {

        return false;
    }

    var index2=strEmail.indexOf('.',index1);
    if((index2-index1)<2)
    {

        return false;
    }

    var length=strEmail.length;
    if(index2==(length-1))
    {

        return false;
    }

    return true;
}

//**********************************

//Start Check Phone
function isphone(field){
  var s = field.value;
  if(s.length == 0) return false;
  for (var i=0; i<s.length; i++){
    var c = s.charAt(i);
    if((c != '-') && (c != ' ') && (c != ')') && (c != '(') &&  ((c < '0') || (c > '9'))){
      field.focus();
      return false;
    }
  }
  return true;
}
//End Check Phone

//**********************************

//Start Filled
function isFilled(elm){
if (elm.value == "" || elm.value == null)
return false;
else return true;
}
//End Filled

//**********************************
