// site functions by Gerben Geijteman 2008 (C)

// Posting stuff
function postContact(){	
	var url = 'contact.php?';
	var query = '';
	var query = 'contact_name=' + encodeURIComponent(document.getElementById('contact_name').value);
	query += '&contact_company=' + encodeURIComponent(document.getElementById('contact_company').value);
	query += '&contact_department=' + encodeURIComponent(document.getElementById('contact_department').value);
	query += '&contact_email=' + encodeURIComponent(document.getElementById('contact_email').value);	
	query += '&contact_phone=' + encodeURIComponent(document.getElementById('contact_phone').value);
	query += '&contact_reason=' + encodeURIComponent(document.getElementById('contact_reason').value);
	query += '&contact_comment=' + encodeURIComponent(document.getElementById('contact_comment').value);
	ajax(url, query, onResults, 'content-content');
}

// Nav header
function showPointer(id)
{
	if(id == 4)
	{
	}
	else
	{
		document.getElementById(id).style.display = 'inline';
	}
}

function undoPointer(id)
{
	document.getElementById(id).style.display = 'none';	
}

function showMenu(id)
{
	if(id == 4)
	{
	}
	else
	{
		document.getElementById(id).style.display = 'inline';
	}
}

function undoMenu(id)
{
	document.getElementById(id).style.display = 'none';	
}

function changeSide(id)
{
	if(id == null)
	{
		document.getElementById("side-body").style.backgroundImage = 'url(media/images/side-body.jpg)';
	}
	else
	{
		document.getElementById("side-body").style.backgroundImage = 'url(media/images/side-body' + id + '.jpg)';
	}
	//alert(document.getElementById("side-body").style.backgroundImage);
}

function showSitemap()
{
	Lightview.show
	(
		{
			href: 'sitemap.php?m=html',
			rel: 'ajax',
			title: '',
			caption: '',
			options: {
				autosize: true,
				topclose: true,
				ajax: {
					method: 'get',
					onComplete: function(){ $('name').focus(); }
				}
			}
		}
	);
}

function showLetter()
{
	Lightview.show(
		{
			href: 'media/images/BvT_brief_online2.jpg',
			rel: 'image', // not required
			title: '<a href="media/documents/BvT_brief_online.pdf" target="_blank">Klik hier om verder te lezen (.PDF formaat)</a>',
			options: {
				autosize: true,
				topclose: false,
				menubar: true
			}					
		}
	);
}

function showVoorwaarden()
{
	Lightview.show(
		{
			href: 'voorwaarden.php',
			rel: 'ajax',
			title: '',
			caption: '',
			options: {
				autosize: false,
				width: 600,
				height: 70,
				topclose: true,
				menubar: true
			}					
		}
	);
}

function showMenuKaart()
{
	Lightview.show(
		{
			href: 'media/images/menukaart_2008.png',
			rel: 'image', // not required
			title: '<a href="media/documents/BvT_menukaart.pdf" target="_blank">Klik hier om deze kaart als .PDF te downloaden</a>',
			options: {
				topclose: false,
				menubar: true
			}					
		}
	);
}

function showXmas()
{
	Lightview.show(
		{
			//href: 'media/images/xmas.png',
			href: 'risicoinspecties.swf',
			rel: 'flash', // not required
			title: 'Fijne kerstdagen en een gelukkig nieuwjaar!',			
			options: {
				height: 600,
				width: 800,
				topclose: false,
				menubar: true
			}					
		}
	);
}
