﻿function CreatePtViewer(DivID, VirtualTourImageFilePath)
{
  var d = document.getElementById(DivID);
  d.innerHTML =
    "<APPLET id=\"virtualTourApplet\" code=\"ptviewer.class\" name=\"viewer\">" +
    "   <PARAM NAME=\"fov\" VALUE=\"90\">" +
    "   <PARAM NAME=\"auto\" VALUE=\"0.4\">" +
    "   <PARAM NAME=\"shotspot2\" VALUE=\"x50 y0 a75 b25 u'ptviewer:startAutoPan(0.3,0,1)' i'Images/virtualTourControlerImages/refresh.gif' q\">" +
    "   <PARAM NAME=\"shotspot1\" VALUE=\"x25 y0 a50 b25 u'ptviewer:ZoomOut()' i'Images/virtualTourControlerImages/zoom_out.gif' q\">" +
    "   <PARAM NAME=\"shotspot0\" VALUE=\"x0 y0 a25 b25 u'ptviewer:ZoomIn()' i'Images/virtualTourControlerImages/zoom_in.gif' q\">" +
    "   <PARAM NAME=\"wait\" VALUE=\"Images/smoola_logo_small.gif\">" +
    "   <PARAM NAME=\"file\" VALUE=\"" + VirtualTourImageFilePath + "\">" +
    "   <PARAM NAME=\"view_height\" VALUE=\"350\">" +
    "</APPLET>";  
}

function CreateFlashPlayer(
			divID, 
			flashComponentUrl,  
			width,
			height,
			fileUrl,
			filePath)
{
	var d = document.getElementById(divID);
	if(d)
	{
		
		d.innerHTML = "";
		
		var videoObject = 
			'<object id="videoFlashApplet" type="application/x-shockwave-flash"' +  
			'data="' + flashComponentUrl + '" ' + 
			'width="' + width + '" ' + 
			'height="' + height + '" wmode="transparent" ' + 
			'flashvars="file=' +fileUrl + '&autoStart=true">' +
				'<param name="movie" value="' + flashComponentUrl + '" />' +
				'<param name="wmode" value="transparent" />' +
				'<param name="flashvars" value="file=' + filePath + '&autoStart=true" />' +
			'</object>';
		d.innerHTML = videoObject;
	}
}