function frmvalidator(theForm)
{
  if (theForm.txtName.value.length < 1)
  {
    alert("Please enter your full name .");
    theForm.txtName.focus();
    return (false);
  }
  if (theForm.txtCity.value.length < 1)
  {
    alert("Please enter City ");
    theForm.txtCity.focus();
    return (false);
  }
  if (theForm.txtState.value.length < 1)
  {
    alert("Please enter state ");
    theForm.txtState.focus();
    return (false);
  }
  if (theForm.txtZip_Code.value.length < 4)
  {
    alert("Please enter valid  zip code ");
    theForm.txtZip_Code.focus();
    return (false);
  }
   if (theForm.txtAddress.value.length < 4)
  {
    alert("Please enter address ");
    theForm.txtAddress.focus();
    return (false);
  }
 
  // E-mail Validator Code
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmail.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Invalid E-mail Address! Please re-enter.")
	theForm.txtEmail.focus();
	return (false);
  }
  
    if (theForm.txtSummary.value.length < 10)
  {
    alert("Please enter summary for your resume ");
    theForm.txtSummary.focus();
    return (false);
  }
  
  if (theForm.txtSkillSet_Des.value.length < 4)
  {
    alert("Please enter words for skill set ");
    theForm.txtSkillSet_Des.focus();
    return (false);
  }
  
  if (theForm.txtCurrent_Position.value.length < 1)
  {
    alert("Please enter current position or designation, which will be displayed with resume title. ");
    theForm.txtCurrent_Position.focus();
    return (false);
  }

  return (true);
}

function frmvalidatorjob(theForm)
{
  if (theForm.txtJobDetail.value.length < 1)
  {
    alert("Please enter job details .");
    theForm.txtJobDetail.focus();
    return (false);
  }
  if (theForm.txtCompanyName.value.length < 1)
  {
    alert("Please enter company name ");
    theForm.txtCompanyName.focus();
    return (false);
  }
  if (theForm.txtKeywords.value.length < 1)
  {
    alert("Please enter Keywords ");
    theForm.txtKeywords.focus();
    return (false);
  }
  if (theForm.txtJobOpening.value.length < 1)
  {
    alert("Please enter number of job opening. ");
    theForm.txtJobOpening.focus();
    return (false);
  }
   if (theForm.txtPosted.value.length < 1)
  {
    alert("Please enter Text Posted ");
    theForm.txtPosted.focus();
    return (false);
  }
  
  if (theForm.txtPositionTitle.value.length < 1)
  {
    alert("Please enter Position Title  ");
    theForm.txtPositionTitle.focus();
    return (false);
  }
    if (theForm.txtOffPositionTitle.value.length < 1)
  {
    alert("Please enter Official Position Title  ");
    theForm.txtOffPositionTitle.focus();
    return (false);
  }
  if (theForm.txtPositionDes.value.length < 1)
  {
    alert("Please enter Position Description  ");
    theForm.txtPositionDes.focus();
    return (false);
  }
  if (theForm.txtLocation.value.length < 1)
  {
    alert("Please enter Location  ");
    theForm.txtLocation.focus();
    return (false);
  }

  // E-mail Validator Code
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmail.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Invalid E-mail Address! Please re-enter.")
	theForm.txtEmail.focus();
	return (false);
  }
  
    if (theForm.txtCompanyDes.value.length < 5)
  {
    alert("Please enter company Description ");
    theForm.txtCompanyDes.focus();
    return (false);
  }
  return (true);
}


function fnOpenWindow(theURL)
{
 var winName = "Character";
 var features = "toolbar=0,left=50,top=50,location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=400,height=400"
 window.open(theURL,winName,features);
}
function fnOpenWindow1(theURL)
{
 var winName = "Character";
 var features = "toolbar=0,left=10,top=10,location=0,status=0,menubar=1,scrollbars=1,resizable=0,width=450,height=450"
 window.open(theURL,winName,features);
}

function fnOpenWindow2(theURL)
{
 var winName = "Character";
 var features = "toolbar=0,left=10,top=10,location=0,status=0,menubar=1,scrollbars=1,resizable=0,width=700,height=550"
 window.open(theURL,winName,features);
}

function fnOpenWindowForPDF(theURL)
{
 var winName = "Character";
 window.open(theURL,winName);
}
function fnclose()
{
	window.close()
}

// Send to a friend validation

function SendtoFriendValidation(theForm)
{
  var temp = theForm.txtFriend_Email.value;
  var temp1 = theForm.txtVisitor_Email.value;
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtFriend_Email.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Invalid E-mail Id!")
	theForm.txtFriend_Email.focus();
	return (false);
  }
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtVisitor_Email.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Invalid E-mail Id!")
	theForm.txtVisitor_Email.focus();
	return (false);
  }
  if (temp = temp1)
  {
  	alert("Both E-mail Ids Seems to Belong to The Same Person!");
	theForm.txtVisitor_Email.focus();
	return (false);
  }
}

// Send to a friend validation

function SendtoFriendValidation(theForm)
{
 
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtFriend_Email.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Invalid E-mail Id!")
	theForm.txtFriend_Email.focus();
	return (false);
  }
  if (!theForm.txtVisitor_Name.value.length )
  {
    alert("Please enter Your Name ");
    theForm.txtVisitor_Name.focus();
    return (false);
  }
  
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtVisitor_Email.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Invalid E-mail Id!")
	theForm.txtVisitor_Email.focus();
	return (false);
  }
  
}




