// function definitions
function toggleWarning()
{
	var oDiv = $("div#InactiveWarning");   
	if ( oDiv.css("display") == "none" )
		oDiv.css("display", "block");
	else
		oDiv.css("display", "none");
}

function submitForm()
{
	var oForm = document.getElementById( "ContactForm" );
	oForm.submit();
	
	return false;
}

// init
$(document).ready(function()
{	
	tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
	imgLoader = new Image();// preload image
	imgLoader.src = tb_pathToImage;
	
	$('a.Inactive').hover(toggleWarning, toggleWarning).attr("title","");
	$('img#standard_silos_img').hide();
	$('img#standard_silos_img').fadeIn(2000);
	
	oScroll	= document.getElementById( "ImageScroller" );
	if( oScroll != null )
		initScroll("ImageScroller");

	/*######################################
	Deze code blok wordt uitgevoerd als de gebruiker op de link klikt die met email wordt verzonden.
	Als de URL de vacature Id bevat wordt de iframe met desbetreffende vacature getoond.*/
	var url = location.href;
	var nJobId = document.getElementById("JobId");
	
	if(url.match("job")){
		showThickBox(nJobId.innerHTML);
	}
	/* Eind van de code blok.
	######################################*/
});

function showThickBox(nJobId){
	tb_show("Jansens & Dieperink - Vacatures", "../../../www_recruitment/pages/vacatures_detail.php?job=" + nJobId + "&TB_iframe=true&height=460&width=600" );
}


