function submit_form()
{
		
		new Ajax.Request('/form.html', {
		method: 'post',
  		parameters: $('submit_form').serialize(true),
  		onSuccess: function(transport){
      		var response = transport.responseText;
			$('TB_ajaxContent').update(response);      		
    	},
  		onFailure: function(){ 
  			alert("Connection Error. Please Try Again.")
  		}
  });
}


jQuery(document).ready(function(){


	jQuery(".contact_link").click(function () {
		tb_show('Form', '/request?modal=true&height=750&width=420');
	
	});
	jQuery("#prev").click(function () {
		cur_margin-=step;
		if (cur_margin<0)
		{
			cur_margin=0;		
		}
		slide_top(cur_margin);		
	 });
	
	jQuery("#next").click(function () {
		cur_margin+=step;
		if (cur_margin>max_len)
		{
			cur_margin=max_len;		
		}
		slide_top(cur_margin);
	 });	
	
 });

function request_form()
{
	$('boxForm').toggle();
	return false;
}

var step=150;
var cur_margin=0;

function slide_top(cur_margin)
{
	jQuery("#widearea").animate({             	 
		marginLeft: -cur_margin
	}, 250);
	return false;
}
