function evaluateScroll() {
	var modal = $('#comparatif_vz_modal');
	var modalOffsetTop = parseInt(modal.css('top')) + parseInt(modal.css('border-top-width')) + parseInt(modal.css('padding-top'));
	var windowHeight = $(window).height();
	var modalHeight = windowHeight - 2*modalOffsetTop;
	modal.height(modalHeight);
	$('iframe', modal).height(modalHeight - 50);
}

function modalDidLoad() {
	$(window).resize(function() {
		evaluateScroll();
	});
	
	evaluateScroll();
}

$(function() {
	$('body').prepend('<div class="jqmComparatif_vzWindow" id="comparatif_vz_modal"></div>');
	
	$('#comparatif_vz_modal').jqm({
  	modal: false,
  	overlay: 70,
  	ajax: '@href',
  	ajaxText: '<div id="loading"></div>',
  	trigger: '.jqComparatif_vzModal',
		onLoad: modalDidLoad
  });
});

function ShowTab (E)
{
document.getElementById("tab1").style.display = (E == 1) ? 'block' : 'none';
document.getElementById("tab2").style.display = (E == 2) ? 'block' : 'none';
}

function verifForm(formulaire)
{
if(formulaire.numeroab.value == "") 
alert('Veuillez ins\351rez votre numˇro d\'abonn\351'); 
else
document.getElementById('dvitxt').style.display = 'block';
}
