function changeState(urlpath,sstate,scity){
		$.ajax({
			type: "GET",
			url: urlpath+"code/dropDown.php",
			async: false,
			data: 	"CountryCode=" + document.getElementById("scountry").value+"&sstate="+sstate+"&scity="+scity,
			success: function(html){
				$("#tdsstate").html(html);
			}
		});
		changeCites(urlpath,sstate,scity);
}


function changeCites(urlpath,sstate,scity){
		$.ajax({
			type: "GET",
			url: urlpath+"code/dropDown.php",
			async: false,
			data: 	"states=" + document.getElementById("sstate").value + "&code="+ document.getElementById("scountry").value+"&scity="+scity,
			success: function(html){
				$("#tdscity").html(html);
			}
		});
}


function reg_changeState(urlpath,state,city){
		
		$.ajax({
			type: "GET",
			url: urlpath+"code/reg_dropDown.php",
			async: false,
			data: 	"CountryCode=" + document.getElementById("country").value +"&profile_state="+state,
			success: function(html){
				$("#reg_tdsstate").html(html);
			}
			
			
		});
		reg_changeCites(urlpath,state,city);
}


function reg_changeCites(urlpath,state,city){
		$.ajax({
			type: "GET",
			url: urlpath+"code/reg_dropDown.php",
			async: false,
			data: 	"rstates=" + document.getElementById("rstate").value + "&code="+ document.getElementById("country").value+"&profile_city="+city,
			success: function(html){
				$("#reg_tdscity").html(html);
			}
		});
}

function submitLevels(formname){
	document.getElementById('formlevels').submit();
}

function nonGradedQuiz(urlpath,count){
		var question;
		question=$("input[name='question_"+count+"']:checked").val();
		$.ajax({
			type: "GET",
			url: urlpath+"nonGradedQuiz.php",
			async: false,
			data: 	"mnge=start_quiz&stt=0&submitQuiz="+document.getElementById("submitQuiz").value+"&question="+question+"&qqq="+document.getElementById("qqq").value,
			success: function(html){
				$("#nonGradedQuiz").html(html);
			}
		});	
}

function gradedQuiz(urlpath,count){
		var question;
		question=$("input[name='question_"+count+"']:checked").val();
		$.ajax({
			type: "POST",
			url: urlpath+"final_test_graded.php",
			async: false,
			data: 	"mnge=start_quiz&stt=0&submitQuiz="+document.getElementById("submitQuiz").value+"&question="+question+"&qqq="+document.getElementById("qqq").value+"&hh="+document.getElementById("hh").value+"&level="+document.getElementById("level").value,
			success: function(html){
				$('#gradedQuiz').html(html);
				//$("#results_number").html(html);
			}
			
		});	
}
