// JavaScript Document
//the following javascript library is owned by Pioneer Conveyor, LLC and should be noted if utilized outside the domain www.pioneerconveyor.com

/* MODAL WINDOW v1.1: Andrew Sauder, andrewsauder@gmail.com, 240.321.9009 */
function openModal(data)
{
	$('#modalData').html('<img src="images/ajax-loader.gif" alt="loading..." title="loading..." />');
	$('#modalWindow').show();
	$('#modalBK').fadeTo('slow',.4);
}
function closeModal()
{
	$('#modalWindow').fadeOut();
	$('#modalBK').fadeOut();
	$('#modalData').html('');
}
function updateModal(beltSize, ang, cemaid)
{
	$.post("ajax/inline_modal.php", { beltSize:beltSize, ang:ang, cemaid:cemaid }, function(data) { $('#modalData').html(data); })
}
//ajax grab on the projects file to display data back to page
function getProjects(id)
{
	$.ajax({type:"POST", url: "ajax/getprojects.php", data: "id="+id+"", success: function(html){$("#getProjects").html(html).css("display","block");} })
	$("#defaultProjects").css("display","none");
}

//ajax grab to return catenary data to page
function getCatenary(id)
{
	$.ajax({type:"POST", url: "ajax/getcatenary.php", data: "id="+id+"", success: function(html){$("#getCatenary").html(html).css("display","block");} })
	$("#defaultCatenary").css("display","none");
}

/* simple color change function for table rows */
function ChangeColor(tableRow, highLight)
{
	if (highLight)
	{
	  tableRow.style.backgroundColor = '#dcfac9';
	}
	else
	{
	  tableRow.style.backgroundColor = 'white';
	}
}

