function show_recaptcha(element) 
{
	Recaptcha.destroy();
  	Recaptcha.create("6LfkUgkAAAAAAIUyuDsjKTirFdb0yyWkFSXHYyAJ", element, {
        theme: 'custom',
        tabindex: 0,
        custom_theme_widget: 'recaptcha'
  	});
}

function show_progress()
{
	$('#loader').css('visibility', 'visible');
}

// Intros auf der Startseite oben
function show_intro(id)
	{
	var ids = new Array('software', 'customers', 'iphone', 'fax-letter-sms', 'howto');
	var i;
	
	for (i = 0; i < ids.length; i++)
		{
		if (id == ids[i])
			{
			$('#intro-' + ids[i]).attr('class', 'on');
			$('#function-' + ids[i]).attr('class', 'on');
			}
		else
			{
			$('#intro-' + ids[i]).attr('class', '');
			$('#function-' + ids[i]).attr('class', '');
			}
		}
	}

// Tabs unter So funktionierts
function show_tab(id)
	{
	var ids = new Array('fax', 'letter', 'sms');
	var i;
	
	for (i = 0; i < ids.length; i++)
		{
		if (id == ids[i])
			{
			$('#tab-' + ids[i]).addClass('on');
			$('#test-form-' + ids[i]).show();
			}
		else
			{
			$('#tab-' + ids[i]).removeClass('on');
			$('#test-form-' + ids[i]).hide();
			}
		}
	}

// Features unter So funktionierts
function show_feature(id)
	{
	if($('#feature-'+id).hasClass('on')==false) {
		$('.elemente').hide();
		$('.elemente').removeClass('on');
		$('#feature-'+id).show();
		$('#feature-'+id).addClass('on');	
		$('#switch-'+id).addClass('on');
	}	
	
	else {
			$('#feature-'+id).hide();
			$('#feature-'+id).removeClass('on');
			$('#switch-'+id).removeClass('on');
		}
	}

var last_orientation = "";

function update_orientation() {
	var content_type = "horizontal";

	if (last_orientation.length == 0) {
		last_orientation = "horizontal";
	} else {
		document.getElementById('container').className = '';
	}

	switch (window.orientation){
		case 0:
		content_type = "horizontal";
		break;

		case -90:
		content_type = "vertical";
		break;

		case 90:
		content_type = "vertical";
		break;
	}

	last_orientation = content_type;
	document.getElementById('container').className = 'show_' + content_type;

	window.scrollTo(0, 1);
}