var currentHighlight='toc_temp';

		toc1on = new Image();
        toc1on.src = "images/pav_up_1.gif";
        
		toc1off = new Image();
        toc1off.src = "images/pav_over_1.gif";
        
		toc2on = new Image();
        toc2on.src = "images/pav_up_2.gif";
        
		toc2off = new Image();
        toc2off.src = "images/pav_over_2.gif";
        
		toc3on = new Image();
        toc3on.src = "images/pav_up_3.gif";

		toc3off = new Image();
        toc3off.src = "images/pav_over_3.gif";
        
		toc4on = new Image();
        toc4on.src = "images/pav_up_4.gif";
        
		toc4off = new Image();
        toc4off.src = "images/pav_over_4.gif";
        
		
		toc5on = new Image();
        toc5on.src = "images/pav_up_5.gif";
        
		toc5off = new Image();
        toc5off.src = "images/pav_over_5.gif";
        
		
		
		
		toc7on = new Image();
        toc7on.src = "images/pav_up_7.gif";

		toc7off = new Image();
        toc7off.src = "images/pav_over_7.gif";

		toc8on = new Image();
        toc8on.src = "images/pav_up_8.gif";

		toc8off = new Image();
        toc8off.src = "images/pav_over_8.gif";

		
		
		toc9on = new Image();
        toc9on.src = "images/pav_up_9.gif";

		toc9off = new Image();
        toc9off.src = "images/pav_over_9.gif";

		
		
		
		toc6on = new Image();
        toc6on.src = "images/pav_up_6.gif";

		toc6off = new Image();
        toc6off.src = "images/pav_over_6.gif";


		toc10on = new Image();
        toc10on.src = "images/pav_u_1.gif";
        
		toc10off = new Image();
        toc10off.src = "images/pav_ovr_1.gif";



		
		
		function img_act(imgName)
		{
		 imgOn = eval(imgName + "on.src");
		 document.images[imgName] = imgOn;
		}

		function img_inact(imgName)
		{
        imgOff = eval(imgName + "off.src");
        document.images[imgName].src = imgOff;
      	}

		function img_inact1(imgName) {
      
        imgOn = eval(imgName + "on.src");
        document.images[imgName].src = imgOn;
       
		}

		function shift(imgName){//alert(imgName);
			
			if (imgName!=currentHighlight)
			{
			img_inact(imgName);
			currentHighlight='toc_temp';
			}

		

		}

			function shift1(imgName)
			{//alert(imgName);
			img_inact1(imgName);
			currentHighlight='toc_temp';
			}




function CheckEmail(strmail){
	  //Perform Checks on the email
	  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789--.,@_";
	  var checkStr = strmail;
	  var allValid = true;
	  var charr = false;
	  var at = false;
	  var dot = false;
	  var charrdot = true;
	  for (i = 0;  i < checkStr.length;  i++){
	    ch = checkStr.charAt(i);
	    for (j = 0;  j < checkOK.length;  j++)
	      if (ch == checkOK.charAt(j)){
			if (ch == "@"){
			if (at==true)
				at = false;
			else if (at==false && charr==true){
				at=true;
				charr=false;


				dot=false;
				}
			}
			else if(ch == "."){
				if (charr==true){
				dot = true;
				charr = false;
				}
				else{
				dot = false;
				charrdot = false;
				}
			}
			else{
			charr=true;
			}
	
	       break;
	       }    
	    if (j == checkOK.length){
	      allValid = false;
	      break;
	    }
	  }
	  
	if (allValid == false || at == false || charr == false || dot == false || charrdot == false)
		return (false);
	else
		return (true);
}

		
function Validate() {
	var Q1 = document.SurveySection1.Q1.value;
	var Q7 = document.SurveySection1.Q7.value;
	
	if (Q1.length == 0) {
		alert("Enter name");
		document.SurveySection1.Q1.focus();
		return false;
	}
	if ( CheckEmail(document.SurveySection1.Q7.value) == false){
		alert("Enter valid email");
		document.SurveySection1.Q7.focus();
		return false;
	}
	return true;
}
function LinkSubmit(GOTOSectionPart) {
	if (Validate()){
		document.SurveySection1.GOTOSectionPart.value= GOTOSectionPart;
		document.SurveySection1.submit();
	}
}