
function switchLang(langTo){
	//window.location="http://translate.google.com/translate?prev=hp&hl=en&u=http%3A%2F%2Fwww.canadianimmigrationexperts.ca/index2.php&sl=en&tl="+langTo;
	window.location="http://translate.google.com/translate?prev=hp&hl=en&u=http%3A%2F%2Fwww.canadianimmigrationexperts.ca/index2.php&sl=en&tl="+langTo;
}


function gotoAssesment(field){
	
	window.location="/free_assessment.php?c="+document.getElementById(field).value;
}


function showSmallInfo(category,field){
	
		if(document.getElementById('smallInfo_'+category).style.display=='none'){
						
				
				
    				if(category!=1){$('#smallInfo_1').fadeOut('fast');}
						if(category!=2){$('#smallInfo_2').fadeOut('fast');} 
						if(category!=3){$('#smallInfo_3').fadeOut('fast');}
						if(category!=4){$('#smallInfo_4').fadeOut('fast');}
						if(category!=5){$('#smallInfo_5').fadeOut('fast');}
 			$('#smallInfo_'+category).fadeIn("slow");
				
		}
			
	
}


function faqShowHide(var1,var2){	
				if(document.getElementById(var2).style.display=='none'){
					 $('#'+var1).slideUp();
 						//document.getElementById(var2).style.display='block'
						$('#'+var2).slideDown();
					

				} else { 
					 //document.getElementById(var2).style.display='none';
					 $('#'+var2).slideUp();
					 $('#'+var1).slideDown('normal');
				}

}

function addFamilyMember(counter){
					//newcount = document.getElementById(counter).value*1 + 1;
					newcount = document.getElementById(counter).value;
				
									$.ajax({  //get stuff from database through file get_alphabet.php
					url: '/jquery.form.actions.php', //file location
					type: 'POST',
					data: 'action=addFamilyMember&counter=' + newcount, // pass variable to get_alphabet.php
					
					success: function(result) 
						{
								
								$('#addFamilyMember').append( result );
						}
					});
				


}

function addFamilyMember2(counter){ //adding family member on student form
					//newcount = document.getElementById(counter).value*1 + 1;
					newcount = document.getElementById(counter).value;
				
									$.ajax({  //get stuff from database through file get_alphabet.php
					url: '/jquery.form.actions.php', //file location
					type: 'POST',
					data: 'action=addFamilyMember2&counter=' + newcount, // pass variable to get_alphabet.php
					
					success: function(result) 
						{
								
								$('#addFamilyMember2').append( result );
						}
					});
				


}

function addRelative(counter){
					//newcount = document.getElementById(counter).value*1 + 1;
					newcount = document.getElementById(counter).value;
				
									$.ajax({  //get stuff from database through file get_alphabet.php
					url: '/jquery.form.actions.php', //file location
					type: 'POST',
					data: 'action=addRelative&counter=' + newcount, // pass variable to get_alphabet.php
					
					success: function(result) 
						{
								
								$('#addRelative').append( result );
						}
					});
				


}

function addRelative2(counter){ // adding family member on student form (Residential History)
					//newcount = document.getElementById(counter).value*1 + 1;
					newcount = document.getElementById(counter).value;
				
									$.ajax({  //get stuff from database through file get_alphabet.php
					url: '/jquery.form.actions.php', //file location
					type: 'POST',
					data: 'action=addRelative2&counter=' + newcount, // pass variable to get_alphabet.php
					
					success: function(result) 
						{
								
								$('#addRelative2').append( result );
						}
					});
				


}

function showSponsorInfo(var1,var2){
	if(var2=="yes"){
		document.getElementById(var1).style.display = "block";
	} else if(var2=="no"){
		document.getElementById(var1).style.display = "none";
	}
	
}

function maritalChange(var1){
	if(var1=="Married"){
		document.getElementById('mariageDate').style.display = "block";
	} else {
		document.getElementById('mariageDate').style.display = "none";
	}
	
}

function goback() {
    history.go(-1);
}
