// write flash dynamically to hack the IE security settings - function:

function EmbedFlash(strIDName, strMovie, strWidth, strHeight, strAlign, strQuality, strBGColor, strAllowScriptAccess, strWMode)
{

	var strWModeEmbed = '';

	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + strWidth + '" height="' + strHeight + '" id="' + strIDName + '" align="' + strAlign + '" VIEWASTEXT>\n');
	document.write('<param name="allowScriptAccess" value="' + strAllowScriptAccess + '" />\n');
	document.write('<param name="movie" value="' + strMovie + '" />\n');
	document.write('<param name="quality" value="' + strQuality + '" />\n');
	document.write('<param name="bgcolor" value="' + strBGColor + '" />\n');
	if (strWMode != null)
	{
		document.write('<param name="wmode" value="' + strWMode + '" />\n');
		strWModeEmbed = ' wmode="' + strWMode + '"'
	}
	document.write('<embed src="' + strMovie + '" quality="' + strQuality + '"' + strWModeEmbed + ' bgcolor="' + strBGColor + '" width="' + strWidth + '" height="' + strHeight + '" name="' + strIDName + '" align="' + strAlign + '" allowScriptAccess="' + strAllowScriptAccess + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
}

// write flash dynamically to hack the IE security settings - variables:

function RunFoo()
{
	EmbedFlash('plan', 'images/plan.swf', '743', '600', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFoo2()
{
	EmbedFlash('plan', 'images/plan.swf', '743', '600', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFoo3()
{
	EmbedFlash('gallery', 'images/gallery.swf', '743', '330', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFoo4()
{
	EmbedFlash('gallery2', 'images/gallery2.swf', '743', '330', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFoo5()
{
	EmbedFlash('gallery', 'images/360.swf?jpeg=images/ambulatory', '300', '300', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFoo6()
{
	EmbedFlash('plan3', 'images/plan3.swf', '743', '600', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFoo7()
{
	EmbedFlash('gallery3', 'images/gallery3.swf', '743', '330', 'middle', 'high', '#ffffff', 'sameDomain', null);
}



function RunFooWedHome()
{
	EmbedFlash('rotator_weddings_home', 'images/rotator_weddings_home.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooWedCaps()
{
	EmbedFlash('rotator_weddings_caps', 'images/rotator_weddings_caps.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooWedCatering()
{
	EmbedFlash('rotator_weddings_catering', 'images/rotator_weddings_catering.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooWedFaqs()
{
	EmbedFlash('rotator_weddings_faqs', 'images/rotator_weddings_faqs.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooPartHome()
{
	EmbedFlash('rotator_parties_home', 'images/rotator_parties_home.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooPartCaps()
{
	EmbedFlash('rotator_parties_caps', 'images/rotator_parties_caps.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooPartCatering()
{
	EmbedFlash('rotator_parties_catering', 'images/rotator_parties_catering.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooCorpHome()
{
	EmbedFlash('rotator_corporate_home', 'images/rotator_corporate_home.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooCorpCaps()
{
	EmbedFlash('rotator_corporate_caps', 'images/rotator_corporate_caps.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooCorpCatering()
{
	EmbedFlash('rotator_corporate_catering', 'images/rotator_corporate_catering.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooEve1()
{
	EmbedFlash('rotator_eve1', 'images/rotator_eve1.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooEve2()
{
	EmbedFlash('rotator_eve2', 'images/rotator_eve2.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooEve3()
{
	EmbedFlash('rotator_eve3', 'images/rotator_eve3.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooEve4()
{
	EmbedFlash('rotator_eve4', 'images/rotator_eve4.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

function RunFooEve5()
{
	EmbedFlash('rotator_eve5', 'images/rotator_eve5.swf', '286', '200', 'middle', 'high', '#ffffff', 'sameDomain', null);
}

// and for the QT



function InsertAmbulatory()
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="600" height="300" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n');
document.write('<param name="src" value="images/ambulatory.mov">\n');
document.write('<param name="controller" value="true">\n');
document.write('<param name="moviename" value="Eye Revolution">\n');
document.write('<param name="scale" value="tofit">\n');
document.write('<param name="autoplay" value="true">\n');
document.write('<param name="cache" value="true">\n');
document.write('<param name="bgcolor" value="000000">\n');
document.write('<param name="fov" value="60">\n');
document.write('<param name="tilt" value="-10">\n');
document.write('<embed src="images/ambulatory.mov" width="600" height="300" bgcolor="000000" controller="true" moviename="Eye Revolution" scale="tofit" autoplay="true" cache="true" fov="60" tilt="-10" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">\n');
document.write('</embed>\n');
document.write('</object>\n');
}



function InsertGreat()
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="600" height="300" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n');
document.write('<param name="src" value="images/great_hall.mov">\n');
document.write('<param name="controller" value="true">\n');
document.write('<param name="moviename" value="Eye Revolution">\n');
document.write('<param name="scale" value="tofit">\n');
document.write('<param name="autoplay" value="true">\n');
document.write('<param name="cache" value="true">\n');
document.write('<param name="bgcolor" value="000000">\n');
document.write('<param name="fov" value="60">\n');
document.write('<param name="tilt" value="-10">\n');
document.write('<embed src="images/great_hall.mov" width="600" height="300" bgcolor="000000" controller="true" moviename="Eye Revolution" scale="tofit" autoplay="true" cache="true" fov="60" tilt="-10" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">\n');
document.write('</embed>\n');
document.write('</object>\n');
}


function InsertHumber()
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="600" height="300" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n');
document.write('<param name="src" value="images/humber_room.mov">\n');
document.write('<param name="controller" value="true">\n');
document.write('<param name="moviename" value="Eye Revolution">\n');
document.write('<param name="scale" value="tofit">\n');
document.write('<param name="autoplay" value="true">\n');
document.write('<param name="cache" value="true">\n');
document.write('<param name="bgcolor" value="000000">\n');
document.write('<param name="fov" value="60">\n');
document.write('<param name="tilt" value="-10">\n');
document.write('<embed src="images/humber_room.mov" width="600" height="300" bgcolor="000000" controller="true" moviename="Eye Revolution" scale="tofit" autoplay="true" cache="true" fov="60" tilt="-10" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">\n');
document.write('</embed>\n');
document.write('</object>\n');
}


function InsertLivery()
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="600" height="300" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n');
document.write('<param name="src" value="images/livery_hall.mov">\n');
document.write('<param name="controller" value="true">\n');
document.write('<param name="moviename" value="Eye Revolution">\n');
document.write('<param name="scale" value="tofit">\n');
document.write('<param name="autoplay" value="true">\n');
document.write('<param name="cache" value="true">\n');
document.write('<param name="bgcolor" value="000000">\n');
document.write('<param name="fov" value="60">\n');
document.write('<param name="tilt" value="-10">\n');
document.write('<embed src="images/livery_hall.mov" width="600" height="300" bgcolor="000000" controller="true" moviename="Eye Revolution" scale="tofit" autoplay="true" cache="true" fov="60" tilt="-10" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">\n');
document.write('</embed>\n');
document.write('</object>\n');
}


function InsertMott()
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="600" height="300" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n');
document.write('<param name="src" value="images/mott_room.mov">\n');
document.write('<param name="controller" value="true">\n');
document.write('<param name="moviename" value="Eye Revolution">\n');
document.write('<param name="scale" value="tofit">\n');
document.write('<param name="autoplay" value="true">\n');
document.write('<param name="cache" value="true">\n');
document.write('<param name="bgcolor" value="000000">\n');
document.write('<param name="fov" value="60">\n');
document.write('<param name="tilt" value="-10">\n');
document.write('<embed src="images/mott_room.mov" width="600" height="300" bgcolor="000000" controller="true" moviename="Eye Revolution" scale="tofit" autoplay="true" cache="true" fov="60" tilt="-10" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">\n');
document.write('</embed>\n');
document.write('</object>\n');
}


function InsertReception()
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="600" height="300" codebase="http://www.apple.com/qtactivex/qtplugin.cab">\n');
document.write('<param name="src" value="images/reception.mov">\n');
document.write('<param name="controller" value="true">\n');
document.write('<param name="moviename" value="Eye Revolution">\n');
document.write('<param name="scale" value="tofit">\n');
document.write('<param name="autoplay" value="true">\n');
document.write('<param name="cache" value="true">\n');
document.write('<param name="bgcolor" value="000000">\n');
document.write('<param name="fov" value="60">\n');
document.write('<param name="tilt" value="-10">\n');
document.write('<embed src="images/reception.mov" width="600" height="300" bgcolor="000000" controller="true" moviename="Eye Revolution" scale="tofit" autoplay="true" cache="true" fov="60" tilt="-10" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">\n');
document.write('</embed>\n');
document.write('</object>\n');
}






/***********************************************
* Switch Content script II- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated April 2nd, 2005.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var enablepersist="off" //Enable saving state of content structure using session cookies? (on/off)
var memoryduration="7" //persistence in # of days

var contractsymbol='images/minus.gif' //Path to image to represent contract state.
var expandsymbol='images/plus.gif' //Path to image to represent expand state.

/////No need to edit beyond here //////////////////////////

function getElementbyClass(rootobj, classname){
var temparray=new Array()
var inc=0
var rootlength=rootobj.length
for (i=0; i<rootlength; i++){
if (rootobj[i].className==classname)
temparray[inc++]=rootobj[i]
}
return temparray
}

function sweeptoggle(ec){
var inc=0
while (ccollect[inc]){
ccollect[inc].style.display=(ec=="contract")? "none" : ""
inc++
}
revivestatus()
}


function expandcontent(curobj, cid){
if (ccollect.length>0){
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="none")? "none" : ""
curobj.src=(document.getElementById(cid).style.display=="none")? expandsymbol : contractsymbol
}
}

function revivecontent(){
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="none"
}

function revivestatus(){
var inc=0
while (statecollect[inc]){
if (ccollect[inc].style.display=="none")
statecollect[inc].src=expandsymbol
else
statecollect[inc].src=contractsymbol
inc++
}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="none")
selectedItem+=ccollect[inc].id+"|"
inc++
}
if (get_cookie(window.location.pathname)!=selectedItem){ //only update cookie if current states differ from cookie's
var expireDate = new Date()
expireDate.setDate(expireDate.getDate()+parseInt(memoryduration))
document.cookie = window.location.pathname+"="+selectedItem+";path=/;expires=" + expireDate.toGMTString()
}
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "switchcontent")
statecollect=getElementbyClass(alltags, "showstate")
if (enablepersist=="on" && get_cookie(window.location.pathname)!="" && ccollect.length>0)
revivecontent()
if (ccollect.length>0 && statecollect.length>0)
revivestatus()
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate












