function showCustom()
{
var ab = document.getElementById('customTab');
ab.setAttribute("class","tab active");
var bc = document.getElementById('byPartNumberTab');
bc.setAttribute("class","tab");
document.getElementById('custom').style.display = 'block';
document.getElementById('byPartNumber').style.display = 'none';
}

function showByPartNumber()
{
var ab = document.getElementById('customTab');
ab.setAttribute("class","tab");
var bc = document.getElementById('byPartNumberTab');
bc.setAttribute("class","tab active");
document.getElementById('custom').style.display = 'none';
document.getElementById('byPartNumber').style.display = 'block';
}

function show_div(div_id) {
    // hide all the divs
    document.getElementById('byPartNumber').style.display = 'none';
    document.getElementById('custom').style.display = 'none';

    // show the requested div
    document.getElementById(div_id).style.display = 'block';
}

function saveContact()
{
//if(document.rfq_form.save_contact.checked)
//	{
	var ab = document.getElementById('rfq');
	ab.setAttribute("onsubmit","setCookie('inpVal',getFormString(this,true,FS_INCLUDE_CLASSES,'contact_info'),31536000);");
//	}
//if(document.rfq_form.save_contact.checked == false)
//	{
//	var ab = document.getElementById('rfq');
//	ab.setAttribute("onsubmit","setCookie('inpVal',getFormString(this,true,FS_INCLUDE_CLASSES,'contact_info'),-1);");
//	}
}

function focus() {	
document.rfq_form.Contact.focus()
}




//JQuery Form Javascript
	var options = {
		url:	'/forms/process_rfq_form.php'
//		success:    function() {
//			alert('Thanks for your comment!');
//		}
	};


	// wait for the DOM to be loaded
	$(document).ready(function() {
		// bind 'myForm' and provide a simple callback function
//		$('#rfq').ajaxForm(options);
		$('a').mousedown(function() {
			$.ajax({
			  url: '/forms/process_rfq_form.php?update',
			  type: 'POST',
			  data: $('#rfq').serialize(),
			  success: function(data) {
			  }
			});
//			$.post('process_rfq_form.php')
//			$('#rfq').ajaxSubmit(options);
//			alert('Handler for .unload() called.');
		});

	});
