// JavaScript Document
/*<![CDATA[*/
		   
function show(view,mode,url,width,height,param) {
	
	if (param == null) {alert('variable fehlt');}
		 
	if (mode == '3D')
	{
	var path = 'http://erezcache1.myclip.de/fsicache/fsi4/fsi.swf?images3dURL=http://erezcache1.myclip.de/fsicache/erez4%3Fvtl%3Dfsi/image_list3d_fsicache.xml%26page%3D1%26rows%3D16%26cols%3D16%26cmd%3Dlist%26src%3D';
	var settings = '&Language=german&MenuAlign=BL&InitialAction=NextScene&InitialActionDelay=4&InitialActionPersistent=1&ScenePreload=1&plugins=clockprogress&clockprogress=0&InitialMouseMode=2&MouseModes_Mode3=false&NoNav=1&plugins=resize' + param;
	initplayer();
	}

	else if (mode == '3D-Action')
	{
	var path = 'http://erezcache1.myclip.de/fsicache/fsi4/fsi.swf?images3dURL=http://erezcache1.myclip.de/fsicache/erez4%3Fvtl%3Dfsi/image_list3d_fsicache.xml%26page%3D1%26rows%3D16%26cols%3D16%26cmd%3Dlist%26src%3D';
	var settings = '&Language=german&MenuAlign=BL&InitialAction=NextScene&InitialActionDelay=6&InitialActionPersistent=1&ScenePreload=1&plugins=clockprogress&clockprogress=0&InitialMouseMode=2&MouseModes_Mode3=false&NoNav=1&intro=intro_engelbertstrauss&plugins=resize' + param;
	initplayer();
	}
	
	else if (mode == '2D')
	{
	var path = 'http://erezcache1.myclip.de/fsicache/fsi4/fsi.swf?FPXBase=http://erezcache1.myclip.de/fsicache/erez4?src%3D&FPXSrc=';
	var settings = '&NavWidth=50&MenuAlign=BL&Effects=clipcolor%3d&MouseModes_Mode3=false&MouseModes_Mode2=false&Language=german&InitialAction=NextScene&InitialActionDelay=4&InitialActionPersistent=1&ScenePreload=1&plugins=clockprogress&clockprogress=0&InitialMouseMode=2&NoNav=1&plugins=resize' + param;
	initplayer();
	}
	
	else if (mode == 'CFG')
	{
	var path = 'http://erez.myclip.de/erez4/fsi4/fsi.swf?cfg=';
	var settings = '&plugins=resize';
	initplayer();
	}
	
	else if (mode != null)
	{
	alert('Bitte Variablen Uebergabe beachten:\n' +
		  '\n' +
		'function show(view,mode,url,width,height,param)\n' +
		  '\n' +
		'"view" Variable:\n' +
		'(\'DIV\' fuer Div box mit id=\"fsi\", \'PU\' fuer PopUp,\'SB\' fuer Shadowbox)\n' +
		'"mode" Variable:\n' +
		'(\'3D\',\'2D\',\'CFG\') angeben\n' +
		'"url" Variable:\n' +
		'(\'3d/myclip360/360_grad_fotografie/024/\')\n' +
		'"width" Variable:\n' +
		'(z.B. 500)\n' +
		'"height" Variable:\n' +
		'(z.B. 500)\n' +
		'"param" Variable:\n' +
		'(z.B. \'&SceneSets=1-24\' oder \'\')'
		  );
	}
	
function initplayer() {

	var fsi_script =
	'<script type="text/javascript" src="http://erezcache1.myclip.de/fsicache/js/fsiwriter.js"><\/script>\n' +
	'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0" width="100%" height="100%">\n' +
	'	<param name="movie" value="'+ path + url + settings +'"/>\n' +
	'		<embed src="'+ path + url + settings +'"\n' +
	'			width="100%"\n' + 
	'			height="100%"\n' +
	'			type="application/x-shockwave-flash"\n' +
	'			pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">\n' +
	'		<\/embed>\n' +
	'<\/object>';
	
	
	var preview_page =
	'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n' +
	'<html>\n' +
	'<head>\n' +
	'<title>Preview<\/title>\n' +
	'<style type="text/css" media="screen">\n' +
	'	body, html {\n' +
	'		height:100%;\n' +
	'		width:100%;\n' +
	'		padding:0px;\n' +
	'		margin:0px;\n' +
	'	}\n' +
	'<\/style>\n' +
	'<\/head>\n' +
	'<body>\n' +
	fsi_script +
	'<\/body>\n' +
	'<\/html>';
	
	if (view == 'SB')
	{
	Shadowbox.open({
	player:     'html',
	content:    preview_page,
	title:      'Preview',
	height:     height,
	width:      width

	  });
	}
	
	else if (view == 'PU')
	{
	var left = (screen.availWidth - width) / 2;
	var top = (screen.availHeight - height) / 2;
	
	var options = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top;
	
	popup = window.open('','popup', options);
	
	popup.document.open();
	popup.document.write(preview_page);
	popup.document.close();
	popup.focus();
	}
	
	else if (view == 'DIV')
	{
	document.getElementById("fsi").innerHTML = fsi_script;
	document.inputForm.source.value = fsi_script;
	}
	
  };
};

function PopUpImage(url,width,height) {

/*  fsi_script = '<img src='+ url +'/>\n';
*/
  var l = (screen.availWidth - width) / 2;
  var t = (screen.availHeight - height) / 2;
  win = window.open('','popup', 'toolbar = no, width=' + ((width) ? '' + width : '') +', height=' + height + ',left=' + l + ',top=' + t + ', status = no');
  win.document.write('<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN" "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd"><html>');
  win.document.write('<head><title>Detail Ansicht<\/title><\/head><body style="margin:0;">');
  win.document.write('<img src="'+ url +'"/>');
  win.document.write('<\/body><\/html>');
  win.document.close();
  win.focus();
    
  
}

