
function showprint( URL ) {
	window.open('http://www.corrad.hu/print.php?url='+URL,'printversion', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=700,left = 262,top = 134');
}

function showHideCityListDiv(eset){
  if (eset == 1) {
  	document.getElementById('targetcity').style.display = 'block';
  	document.getElementById('installcity').style.display = 'block';
  }
  else if (eset == 2) {
  	document.getElementById('targetcity').style.display = 'block';
  	document.getElementById('installcity').style.display = 'none';
  }
  else if (eset == 3) {
  	document.getElementById('targetcity').style.display = 'none';
  	document.getElementById('installcity').style.display = 'none';
  }
}

function checkCityError(){
	
	var id1 = document.form_generator.targetcity.selectedIndex;
	var targetcity = document.form_generator.targetcity.options[id1].value;
		
	var id2 = document.form_generator.installcity.selectedIndex;
	var installcity = document.form_generator.installcity.options[id2].value;
	
	var targetandinstallcityradio = document.getElementById('form_elements51').checked;
	var targetcityradio = document.getElementById('form_elements52').checked; 
	
	if(targetandinstallcityradio){
		if(targetcity == 'notchoose'){
			if(installcity == 'notchoose'){
				alert("Szállítási és telepítési hely kiválasztása kötelező!");
				return false;
			} else {
			    alert("Szállítási hely kiválasztása kötelező!");
			    return false;
			}
		} else if(installcity == 'notchoose'){
			alert("Telepítési hely kiválasztása kötelező!");
			return false;
		}
	} else if(targetcityradio) {
	
		if(targetcity == 'notchoose'){
			alert("Szállítási hely kiválasztása kötelező!");
			return false;
		}
		
	} else {
		return true;
	}
	 	
	return true;	
}

function goCorrad(id){

	switch(id){
		case 1:
			window.location = 'http://www.corrad.hu/';
			break;
		case 2:
			window.location = 'http://www.corradflags.com/';
			break;
		case 3:
			window.location = 'http://www.fahnencorrad.de/';
			break;


	}	

}

function setHandicapped(onOff){

		var url = window.location;

        if(url == 'http://www.corrad.hu/'){
			url = 'http://www.corrad.hu/itt+kezdd/itt+kezdd+1.html';
		}

		$.ajax({
				type: "GET",
				url: "index.php?mod=handicapped&cla=handicapped&fun=setHandicap&onoff="+onOff,
				success: function(answer){
					window.location = url;
				}
			});

}

