	// embed illustrion swf
function embedFlash(swf, file, w,h) {

	var dimensions 	= getDimensions(w,h);
	var params 		= {wmode:"transparent"};
	
	var flashvars = {
		url: 	file, 
		hoehe: 	h
	};	

	if (dimensions[0] > 0 ) {
		swfobject.embedSWF(swf, "illustrations", dimensions[0], (700*dimensions[0]/320), "6", false, flashvars, params);
	}else{
		$("#illustrations").css("display", "none");
	}
	
}

	// count new dimension of resized swf
function getDimensions(w,h) {
	
	var max_width 	= 320;
	var min_width 	= 150;
	
	var max_height 	= 400;
	var win_width 	= $(window).width();
			
	var width 		= win_width - 885;
	var height 		= parseInt(width * h / w);
	
	if( width > max_width ){
		width 	= 320;
		height 	= parseInt(width * h / w);
	}
	
	if( width <= min_width ){
		width 	= 150;
		height 	= parseInt(width * h / w);
	}
	
	if( (width*h/w) > max_height ){
		height 	= max_height;
		width 	= parseInt(w / h * max_height);
	}
	
	if( win_width < 1035 ){ // 885+150
		width	= -1;
		height	= -1;
	}	
	
	return new Array(width,height);
	
} 