function checkblank(filname, filid){
var fname=document.getElementById(filid);
	if (fname.value==""){
		alert("The "+filname+" name field is blank. \nPlease enter your "+filname+" in the text box.");
		fname.focus();	
		var tip="blank";
		return tip;
    }
}
function checkmail(filname){
	var em=document.getElementById(filname);
	var txt=(em.value);
      if (txt.indexOf("@")<0){
            alert("This email address in the 'E-mail' seems wrong.");
			em.focus();
			var tip="wrong";
           return tip;
      } 
        
      if(txt.indexOf(".")<0){
            alert("Check your e-mail ID");
			em.focus();
			var tip="wrong";
           return tip;
     }    
}

function chForm(){
	if(checkblank("Name","tname")=="blank"){return false;}
	if(checkblank("Date of Birth - Date","dob_date")=="blank"){return false;}
	if(checkblank("Date of Birth - Month","dob_month")=="blank"){return false;}
	if(checkblank("Date of Birth - Year","dob_year")=="blank"){return false;}
	if(checkblank("Address","address")=="blank"){return false;}
	if(checkblank("STD Code","phone_code")=="blank"){return false;}
	if(checkblank("Phone number","phone")=="blank"){return false;} 
	if(checkblank("Mobile Number","mobile")=="blank"){return false;}
	if(checkblank("Email ID","email")=="blank"){return false;}
	if(checkmail("email")=="wrong"){return false;}
	if(checkblank("Experience in Years ","exp_year")=="blank"){return false;}
	if(checkblank("Experience in Months ","exp_month")=="blank"){return false;}
	if(checkblank("Current Industry","cur_industry")=="blank"){return false;}
	if(checkblank("Current Functional Area","cur_area")=="blank"){return false;}
	if(checkblank("Current Role ","cur_role")=="blank"){return false;}
	if(checkblank("Key Skills","key_skills")=="blank"){return false;}
	if(checkblank("Preferred Job Location","job_location")=="blank"){return false;}
	if(checkblank("Resume Headline","resume_headline")=="blank"){return false;}
	if(checkblank("Send Resume as","subject")=="blank"){return false;}
}

function chFeedback(){
	if(checkblank("Name","name")=="blank"){return false;}
	if(checkblank("Email ID","email")=="blank"){return false;}
	if(checkmail("email")=="wrong"){return false;}
	if(checkblank("Phone number","phone")=="blank"){return false;} 
	if(checkblank("Detail","detail")=="blank"){return false;}
}

function chAdvertise(){
	if(checkblank("Name","fname")=="blank"){return false;}
	if(checkblank("Email ID","email")=="blank"){return false;}
	if(checkmail("email")=="wrong"){return false;}
	if(checkblank("Phone number","phone")=="blank"){return false;} 
}

function languagesSelect(){
	var list1=document.getElementById("select");
	var hide1=document.getElementById("langall");
	var disp1=document.getElementById("view1");
	var tval = "";
	var tval2 ="";
	for(i=0;i<list1.length;i++){
		if(list1.options[i].selected){
			tval+=list1.options[i].value+"<br>";
			tval2+=list1.options[i].value+", ";
		}
	}
	disp1.innerHTML=tval;
	hide1.value=tval2;
}
function changeval(){
	//var stepscount=document.getElementByName("Stepno");
	form1.Stepno.value="Finish";
}