$(function() {
		$(".modal_dialogs").dialog({
			modal: true,
			autoOpen: false,
			resizable: false,
			closeOnEscape: true,
			width: 720
		});
		if($.browser.safari){
			$(".inp_name").css("marginTop","37px");
			$(".inp_email").css("marginTop","3px");
			$(".inp_message").css("marginTop","15px");
		}		
		if($.browser.mozilla){
			$(".inp_message").css("overflow","auto");
		}
	});
	
function show_content(num){
	$("#modal_dialog"+num).dialog('open');
		$(".ui-widget-overlay").click(function() {
		$(".modal_dialogs").dialog('close');
    });	
	return false;
}

function ValidateAreaLenght(area){
	/*if(area.value.length>105){
		area.value=area.value.substr(0,105);
	}	
	if(area.value.length<23){
	area.value="                        ";
	return;
	}
	if(area.value.substr(0,23)!="                       "){
	area.value="                       "+area.value.substr(23,area.value.length-23);
	}*/
}

function ScrollFact(Fact)
{
	if(Fact=='_top'){
		$(document).scrollTo( 0, 800 );
			return false;
	}
	$(document).scrollTo( $('#step'+Fact), 800 );
	return false;
}

function pageHeight() {
return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;
}
