   check = []; //this is an array that stores all the true/false values for each checkbox 


    function checkBox(id) 
    { 

    if(check[id] != 1) //if a value is not true, use this rather than == false, 'cos the first time no value will be set and it will be undefined, not true or false 
        { 
            for(i=0;i<3;i++)
            {
                if(i!=id)
                {
                    document.getElementById('imgCheck' + i).src = "images/mcNew_images/box_no.gif"; 
                    document.getElementById('inputCheck' + i).value = "0"; 
                    check[i] = 0; 
                }
            }        


            document.getElementById('imgCheck' + id).src = "images/mcNew_images/box_yes.gif"; //change the image 
            document.getElementById('inputCheck' + id).value = "1"; //change the field value 
            check[id] = 1; //change the value for this checkbox in the array 
            
        } 
    else 
        { 
            document.getElementById('imgCheck' + id).src = "images/mcNew_images/box_no.gif"; 
            document.getElementById('inputCheck' + id).value = "0"; 
            check[id] = 0; 
        } 
    //window.alert(document.getElementById('inputCheck' + id).value );
    }





    function diaplyUploadIframe()
	{
        document.getElementById("cvfileIframe").style.display = '';
        document.getElementById("cvfileIframe").focus();       
	}


// ==================================================================
//           תיעוד שמות השדות שעושים להם ולידציה בפונציה הבאה
// ==================================================================
//
//
//
//שם שדה				ID					סוג
//===============		===============		=============
//שם פרטי				FName			    string
//שם משפחה			    LName			    string
//                      street
//                      streetNum
//                      city
//                      phone
//                      cell
//                      email
//                      yearOfBirth
//                      monthOfYear
//                      dayOfBirth
//                      school
//                      idNum
//                      workPlace1former
//                      workPlace2former
//                      workPlace3former
//                      workPlace1BeginDate
//                      workPlace2BeginDate
//                      workPlace3BeginDate
//                      workPlace1EndDate
//                      workPlace2EndDate
//                      workPlace3EndDate
//
//  inputs for the availability of the worker (morning, evening or both):
//
//                      imgCheck0  - updates inputCheck0
//                      imgCheck1  - updates inputCheck1
//                      imgCheck2  - updates inputCheck2
//                      Branch                   
// ==================================================================

 
	function doSubmit()
    {
	    CVFile = document.resume.CVFile.value;
	    
	    
	    FName=document.resume.FName.value;
	    if (FName=="")
	 	{ 
	 	    msg="יש להקליד שם פרטי";
	 	    alert(msg);
		    document.resume.FName.select();
		    return;
		}
		
	    LName=document.resume.LName.value;
	    if (LName=="")
	 	{ 
	 	    msg="יש להקליד שם משפחה";
		    alert(msg);
		    document.resume.LName.select();
		    return;
		}		
	
	    dayOfBirth = 	document.resume.dayOfBirth.value;	
	    monthOfBirth = 	document.resume.monthOfBirth.value;		
	    yearOfBirth = 	document.resume.yearOfBirth.value;
    
    	if ((dayOfBirth== "0")||(monthOfBirth =="0" )||(yearOfBirth =="0"))
	    {
	        msg="יש לבחור תאריך לידה";
		    alert(msg);
		    document.resume.DayOfBirth.focus();
		    return;
		}
	

	
	    phone=document.resume.phone.value;
	    if (phone=="")
	 	{ 
	 	    msg= "יש להקליד טלפון";
		    alert(msg);
		    document.resume.phone.select();
		    return;
		}

	    cell=document.resume.cell.value;
	    if (cell=="")
	 	{ 
	 	    msg= "יש להקליד טלפון נייד";
		    alert(msg);
		    document.resume.cell.select();
		    return;
		}


	    city=document.resume.city.value;
	    if (city=="")
	 	{ 
	 	    msg= "בחר ישוב";
		    alert(msg);
		    document.resume.city.select();
		    return;
		}
	
	
	    Branch=document.resume.Branch.value;
	    if (Branch==-1 || Branch==0 || Branch=="")
	 	{ 
	 	    msg= "יש לבחור סניף";
		    alert(msg);
//		    document.resume.Branch.select();
		    return;
		}

	

	    document.resume.submit();
	    //clearForm();
   	}	

	function clearForm()
	{ 
	     var el = document.resume.elements;	
	     for(i=0;i<el.length;i++)	
	       if ((el(i).type=="text")||(el(i).type=="textarea")||(el(i).type=="file"))
	  	 	    el(i).value="";
	}	


