/*  
    IE + ActiveX + EOLAS - Javascript workaround

	Author: 
		Thomas Rauscher <rauscher@pano2qtvr.com>
		http://www.pano2qtvr.com
		
	To embed a panorama just call one of these functions with 
	additional pairs for additional paramameters f.e:
	
	p2q_EmbedQuicktime('pano.mov','640','480','scale','tofit','background','#eeeeee');
	
	Use this file at your own risk
*/

window.p2q_Version	= 1.1;


var javafsappletwidth = screen.width - 10;
var javafsappletheight = screen.height - 120;


function p2q_EmbedImmervFS() {
	document.writeln('<applet code="PurePlayer" archive="/PurePlayer.jar"'); 
	document.writeln('  width="' + javafsappletwidth + '" height="' + javafsappletheight + '">');
	document.writeln('<param name="panorama" value="fsjava.xml">');
	document.writeln('<param name="antialiasing" value="everytime">');
	document.writeln('<param name="quality" value="1000">');
	document.writeln('<param name="usecache" value="false">');
	document.writeln('<param name="bgcolor" value="0xff323232">');
	document.writeln('<param name="fullscreen" value="false">');
	document.writeln('<param name="lockzenithnadir" value="true">');
	document.writeln('<param name="smoothstop" value="0">');
	document.writeln('<param name="smoothstop" value="0">');
	document.writeln('</applet>');
}

function p2q_EmbedImmervLarge() {
	document.writeln('<applet archive="/PurePlayer.jar" code="PurePlayer" width="750" height="500">'); 
	document.writeln('<param name="panorama" value="largejava.xml">');
	document.writeln('<param name="antialiasing" value="everytime">');
	document.writeln('<param name="quality" value="1000">');
	document.writeln('<param name="usecache" value="false">');
	document.writeln('<param name="bgcolor" value="0xff323232">');
	document.writeln('<param name="fullscreen" value="false">');
	document.writeln('<param name="lockzenithnadir" value="true">');
	document.writeln('<param name="smoothstop" value="0">');
	document.writeln('<param name="smoothstop" value="0">');
	document.writeln('</applet>');
}

function p2q_EmbedQTSpinControl() {
	document.writeln('<!-- BEGIN CONTROLLER OBJECT-EMBED CODE (Hextended 20050721) -->');
	document.writeln('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" height="30" width="556">');
    document.writeln('<param name="controller" value="false">');
	document.writeln('<param name="cache" value="false">');
	document.writeln('<param name="bgcolor" value="#323232">');
	document.writeln('<param name="moviename" value="spinControl_hextended">');
	document.writeln('<param name="src" value="/assets/spincontrol/spinControl_eirann.mov">');
	document.writeln('<param name="MovieQTList" value="');
	document.writeln('<spincontrol>');
	document.writeln('<mainBackground>323232</mainBackground>');
	document.writeln('<outlineNormal>ffffff</outlineNormal>');
	document.writeln('<outlineOver>00cac8</outlineOver>');
	document.writeln('<outlineDown>ffcc00</outlineDown>');
	document.writeln('<buttonNormal>323232</buttonNormal>');
	document.writeln('<buttonOver>ffffff</buttonOver>');
	document.writeln('<buttonDown>00cac8</buttonDown>');
	document.writeln('<arrowNormal>00cac8</arrowNormal>');
	document.writeln('<arrowOver>000000</arrowOver>');
	document.writeln('<arrowDown>ffffff</arrowDown>');
	document.writeln('<textColor>c6c6be</textColor>');
	document.writeln('<spinDirection>.2</spinDirection>');
	document.writeln('<enableAutospinToggle>yes</enableAutospinToggle>');
	document.writeln('<enableHotspotToggle>yes</enableHotspotToggle>');
	document.writeln('<disabledTransparency>50</disabledTransparency>');
	document.writeln('<AutospinOnAtStart>0</AutospinOnAtStart>');
	document.writeln('<HotspotsOnAtStart>0</HotspotsOnAtStart>');
	document.writeln('<LanguageFlag>1</LanguageFlag>');
	document.writeln('</spincontrol>"');
	document.writeln('>');
	document.writeln('<embed pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" height="30" width="556" controller="false" cache="false" bgcolor="#323232" moviename="spinControl_hextended" src="/assets/spincontrol/spinControl_eirann.mov"');
	document.writeln(' MovieQTList="');
	document.writeln('<spincontrol>');
	document.writeln('<mainBackground>323232</mainBackground>');
	document.writeln('<outlineNormal>ffffff</outlineNormal>');
	document.writeln('<outlineOver>00cac8</outlineOver>');
	document.writeln('<outlineDown>ffcc00</outlineDown>');
	document.writeln('<buttonNormal>323232</buttonNormal>');
	document.writeln('<buttonOver>ffffff</buttonOver>');
	document.writeln('<buttonDown>00cac8</buttonDown>');
	document.writeln('<arrowNormal>00cac8</arrowNormal>');
	document.writeln('<arrowOver>000000</arrowOver>');
	document.writeln('<arrowDown>ffffff</arrowDown>');
	document.writeln('<textColor>c6c6be</textColor>');
	document.writeln('<spinDirection>.2</spinDirection>');
	document.writeln('<enableAutospinToggle>yes</enableAutospinToggle>');
	document.writeln('<enableHotspotToggle>yes</enableHotspotToggle>');
	document.writeln('<disabledTransparency>50</disabledTransparency>');
	document.writeln('<AutospinOnAtStart>0</AutospinOnAtStart>');
	document.writeln('<HotspotsOnAtStart>0</HotspotsOnAtStart>');
	document.writeln('<LanguageFlag>1</LanguageFlag>');
	document.writeln('</spincontrol>"');
	document.writeln('>');
	document.writeln('</embed>');
	document.writeln('</object>');
	document.writeln('<!-- END CONTROLLER OBJECT-EMBED CODE -->&nbsp;&nbsp;');
}

/* 
function p2q_EmbedQuicktime(sFile,sWidth,sHeight) {
	document.writeln('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"');
	document.writeln('codebase="http://www.apple.com/qtactivex/qtplugin.cab"');
	document.writeln('  width="' + sWidth + '" height="' + sHeight + '" >');
	document.writeln('  <param name="src" value="' + sFile + '">');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  <param name="' + arguments[i] + '" value="' + arguments[i+1] + '">');
	}
	document.writeln('<embed width="' + sWidth + '" height="' + sHeight + '"');
	document.writeln('	pluginspage="http://www.apple.com/quicktime/download/"');
	document.writeln('	type="video/quicktime"');
	document.writeln('	src="' + sFile + '"');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  ' + arguments[i] + '="' + arguments[i+1] + '"');
	}
	document.writeln('	/>');
	document.writeln('</object>');
}
*/

function p2q_EmbedQuicktime(sFile,sWidth,sHeight) {
	document.writeln('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"');
	document.writeln('codebase="http://www.apple.com/qtactivex/qtplugin.cab"');
	document.writeln('  width="' + sWidth + '" height="' + sHeight + '" >');
	document.writeln('  <param name="src" value="' + sFile + '">');
	document.writeln('<param name="scale" value="tofit">');
	document.writeln('<param name="controller" value="false">');
	document.writeln('<param name="cache" value="false">');
	document.writeln('<param name="bgcolor" value="#323232">');
	document.writeln('<param name="movieid" value="2">');
	document.writeln('<param name="moviename" value="spincontrolled">');


	/*for(i=3;i<arguments.length;i+=2) {
		document.writeln('  <param name="' + arguments[i] + '" value="' + arguments[i+1] + '">');
	}
	*/
	document.writeln('<embed width="' + sWidth + '" height="' + sHeight + '"');
	document.writeln('	pluginspage="http://www.apple.com/quicktime/download/"');
	document.writeln('	type="video/quicktime"');
	document.writeln('	src="' + sFile + '"');
	document.writeln('	controller="false" cache="false" scale="tofit" 	movieid="2" pluginspage="http://www.apple.com/quicktime/download/" bgcolor="#323232" moviename="spincontrolled">');

	document.writeln('</object>');

	/*for(i=3;i<arguments.length;i+=2) {
		document.writeln('  ' + arguments[i] + '="' + arguments[i+1] + '"');
	}
	
	document.writeln('	/>');
	document.writeln('</object>');
	*/
}




function p2q_EmbedSPiV(sFile,sWidth,sHeight) {
	document.writeln('<object id="SPi-V_object"	classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"');
	document.writeln('codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"');
	document.writeln('  width="' + sWidth + '" height="' + sHeight + '" >');
	document.writeln('	<param name="src" value="SPi-V.dcr">');
	document.writeln('	<param name="swStretchStyle" value="stage">');
	document.writeln('	<param name="swRemote"       value="swContextMenu=' + "'" + 'FALSE' + "'" + '">');
	document.writeln('	<param name="progress"       value="true">'); 
	document.writeln('	<param name="logo"           value="false">'); 

	document.writeln('  <param name="swURL" value="' + sFile + '">');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  <param name="' + arguments[i] + '" value="' + arguments[i+1] + '">');
	}
	document.writeln('<embed name="SPi-V_object" width="' + sWidth + '" height="' + sHeight + '"');
	document.writeln('	pluginspage="http://www.macromedia.com/shockwave/download/"');
	document.writeln('	type="application/x-director" ');
	document.writeln('	swURL="' + sFile + '" ');
	document.writeln('	src="SPi-V.dcr" ');
	document.writeln('	swStretchStyle="stage" ');
	document.writeln('	swRemote="swContextMenu=' + "'" + 'FALSE' + "'" + '" ');
	document.writeln('	progress="true" ');
	document.writeln('	logo="false" ');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  ' + arguments[i] + '="' + arguments[i+1] + '"');
	}
	document.writeln('	/>');
	document.writeln('</object>');
}

function p2q_EmbedDevalVR(sFile,sWidth,sHeight) {
	document.writeln('<object classid="clsid:5D2CF9D0-113A-476B-986F-288B54571614"');
	document.writeln('codebase="http://www.devalvr.com/instalacion/plugin/devalocx.cab#version=0,2,9,0"');
	document.writeln('  width="' + sWidth + '" height="' + sHeight + '" >');
	document.writeln('  <param name="src" value="' + sFile + '">');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  <param name="' + arguments[i] + '" value="' + arguments[i+1] + '">');
	}
	document.writeln('<embed width="' + sWidth + '" height="' + sHeight + '"');
	document.writeln('	pluginspage="http://www.devalvr.com/instalacion/plugin/install.html"');
	document.writeln('	type="application/x-devalvrx"');
	document.writeln('	src="' + sFile + '"');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  ' + arguments[i] + '="' + arguments[i+1] + '"');
	}
	document.writeln('	/>');
	document.writeln('</object>');
}

function p2q_EmbedFlash(sFile,sWidth,sHeight) {
	document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
	document.writeln(' codebase="codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"');
	document.writeln(' width="' + sWidth + '" height="' + sHeight + '" >');
	document.writeln('  <param name="movie" value="' + sFile + '">');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  <param name="' + arguments[i] + '" value="' + arguments[i+1] + '">');
	}
	document.writeln('<embed width="' + sWidth + '" height="' + sHeight + '"');
	document.writeln('	pluginspage="http://www.macromedia.com/go/getflashplayer"');
	document.writeln('	type="application/x-shockwave-flash"');
	document.writeln('	src="' + sFile + '"');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  ' + arguments[i] + '="' + arguments[i+1] + '"');
	}
	document.writeln('	/>');
	document.writeln('</object>');
}

function p2q_EmbedFlashSoundControl(sndFile) {
	document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'); 
	document.writeln(' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"');
	document.writeln(' width="400" height="15" >');
	document.writeln('<param name="movie" value="/xspf_player_slim.swf?song_url=../../sound/' + sndFile + '&autoplay=true&song_title=Musica Andena&autoload=true&repeat_playlist=true">');
	document.writeln('<param name="quality" value="high">');
	document.writeln('<param name="bgcolor" value="#323232">');
	document.writeln('<embed src="/xspf_player_slim.swf?song_url=../../sound/' + sndFile + '&autoplay=true&song_title=Musica Andena&autoload=true&repeat_playlist=true"');
	document.writeln(' quality="high" bgcolor="#323232" name="movie"');
	document.writeln(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"');
	document.writeln(' align="center" height="15" width="400" />');
	document.writeln('</object>');
}

function p2q_EmbedPtviewer(sFile,sWidth,sHeight) {
	document.writeln('<applet code="ptviewer.class" archive="ptviewer.jar"'); 
	document.writeln('  width="' + sWidth + '" height="' + sHeight + '" >');
	document.writeln('	<param name="file" value="' + sFile + '">');
	for(i=3;i<arguments.length;i+=2) {
		document.writeln('  <param name="' + arguments[i] + '" value="' + arguments[i+1] + '">');
	}
	document.writeln('</applet>');
}





