
/**
 * Cruft?
 */
 /**
var listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none');

listMenu.hideDelay = 0;
listMenu.cssLitClass = 'highlighted';
listMenu.hideOnClick = false;
listMenu.animInSpeed = 0.2;
listMenu.animOutSpeed = 1;

// per menu dat je wilt aanmaken moet je dit toepassen
var arrow = null;
if (document.createElement && document.documentElement)
	addEvent(window, 'load', new Function('listMenu.activateMenu("navigatie")'));
*/


/*
 * Frame buster
 */
function bustFrames()
{
  if (top.frames.length!=0)
		top.location=self.document.location;
}
window.onload="bustFrames";



// More cruft ?
function putFocus(oForm, oElem)
{ 
	if (document.forms.length > 0)
		document.forms[oForm].elements[oElem].focus();
} 



/*

$(document).ready(function(){			
	$('#aantal-dealers-pp').change(function(e) 
	{
		e.preventDefault();
		$('#aantal-dealers-pp-form').submit();
		});
})

*/



/***
 * To be replaced by Lightbox
 */


function preloadImages()
{
	var args = simplePreload.arguments;
	document.imageArray = new Array(args.length);
	for(var i=0; i<args.length; i++)
	{
		document.imageArray[i] = new Image;
		document.imageArray[i].src = args[i];
	}

}

function showImage(product_id)
{
	img = new Image();
	img.src = 'http://www.broekhoff.nl/upload/filmthumbs/' + product_id + '_gr.jpg';
	setTimeout('void(0)', 500);
	var width = img.width;
	var height = img.height;

	if(height == 0)
		height = 320;
	if(width == 0)
		width = 426;
	var imageString = '<img src="' +  img.src + '" width="' +  width + '" height="' +  height + '"  alt="" title="" />';
	var openwin = this.open('',"ctrlwindow","width=" + width + ",height=" + height + ",toolbar=no,scrollbars=no,resizable=yes");
	
	openwin.document.open();
	openwin.document.write('<html><head><title>Afbeelding</title><style type="text/css">body{margin:0;padding:0;}</style></head><body>' + imageString + '</body></html>')
	openwin.document.close();
	openwin.focus();
}


function showVideo(product_id)
{
	var url = 'http://www.broekhoff.nl/flvplayer.php?movie_id=' + product_id;
	var openwin = this.open(url, 'ctrlwindow', 'width=640, height=480, scrollbars=auto, resizable=no, location=no, status=no, toolbar=no, directories=no, menubar=no');
		openwin.focus();
}
