function setIframeHeight( newHeight ) {
	//alert(newHeight);
	if ($.browser.msie) {
		$('#autotrackFrame').css('height', (newHeight + 500)+'px');
	} else {
		$('#autotrackFrame').css('height', (newHeight + 500)+'px');	
	}
}
//pre-submit callback 
function showRequest(formData, jqForm, options) { 
    var queryString = $.param(formData);
    return true; 
} 
//post-submit callback 
function showResponse(responseText, statusText, xhr, $form)  { 
	//alert(responseText);
	if ( responseText != undefined ) {
		//disable button
		if ( responseText.indexOf('succesmelding') > -1 ) {
			if ($('input.verzendknop').length ) $('input.verzendknop').hide();
			if ($('input.verzenden').length ) $('input.verzenden').hide();
			if ($('input.verzendknopgroot').length ) $('input.verzendknopgroot').hide();
		}
		//show message
		$('#messageForm').html(responseText).addClass('successmsgForm');
		//show message
		$('#messageForm').show('fast'); 
    }
	return true; 
}

function displayBubble( className, innerText ) {
	//create bubble popups for each element with class "button"
	$('.'+className).CreateBubblePopup();
	//set customized mouseover event for each button
	$('.'+className).mouseover(function(){
		//get a reference to the object button
		var button = $(this);
		//show the bubble popup with new options
		button.ShowBubblePopup({
									innerHtml: innerText,
									innerHtmlStyle: { color:'#333333','text-align':'center' },
									themeName: 	'grey',
									themePath: 	'/addons/themes/residentie/css/jquery/jquerybubblepopup-theme'								 
							  });
	}); //end mouseover event
}

jQuery.fn.openPlaySwfMovie = function() {$('#commercial').empty();$('#commercial').flash({src: arguments[0],width: 600,height: 338, LOOP:"false",flashvars: { foo: 'bar', baz: 'zoo' }});return false;};
jQuery.fn.openPlayFlvMovie = function() {
	$('#commercial').empty();
	$('#commercial').html("<a href=\""+arguments[0]+"\" style=\"display: block; height: 338px;width: 600px;\" id=\"player\"></a>");
	flowplayer("player", "/movies/player/flowplayer-3.2.5.swf", {
		loop: false,
		version: [9, 115],

		// older versions will see a custom message
		onFail: function()  {
			document.getElementById("info").innerHTML =
				"You need the latest Flash version to see MP4 movies. " +
				"Your version is " + this.getVersion()
			;
		},
		plugins:  { 
			controls: null 
			},
		clip: {
			url: arguments[0],
			onFinish: function() {
				this.unload();
			},
//			onBlur: function() {
//				this.unload();
//			},
			autoPlay: true, 
			autoBuffering: true
		}
	});	
	return false;
};






