// Ocean Vista Resort General API(JavaScript)
// Author : EJFIIIWebDesign.com

//Browser Brand Determination
var isIE=false; var isNN=false; var isOP=false; isFF=false; 
if (navigator.userAgent.indexOf("Opera")!=-1) isOP=true;
if ((navigator.appName.indexOf("Microsoft")!=-1) && (navigator.userAgent.indexOf("Opera")==-1)) isIE=true;
if (navigator.userAgent.indexOf("Firefox")!=-1) isFF=true;
if ((navigator.appName.indexOf("Netscape")!=-1) && (navigator.userAgent.indexOf("Firefox")==-1)) isNN=true;

//IE Exclusive StyleSheet Additions
	if (isIE) {
		document.write("<link rel='stylesheet' href='ovrStyle_IE.css' type='text/css' />");
		}

// Center Content on Screen
	function positionPresentation() {
	var viewWidth = 0, viewHeight = 0, contentWidth = 800, contentHeight = 580, posX = 0,  posY = 0;

	// Determine Available Window Size
  		if (isIE) {
   			viewWidth = document.documentElement.clientWidth;
   			viewHeight = document.documentElement.clientHeight;
		}else{
   			viewWidth = window.innerWidth;
			viewHeight = window.innerHeight;
  			} 

	// Set Content Window Coordinates

		if (viewWidth < 800) {
			posX = 0;
		}else{
			posX = Math.floor((viewWidth-contentWidth)/2);
			}

	// Apply New Window Coordinates
		document.getElementById('content').style.left = posX+"px";
		document.getElementById('content').style.top = posY+"px";
		document.getElementById('authorLink').style.top = posY+595+"px";
		}

// Teaser Slide Show (with fade for Internet Explorer)
	function slideShow() {
		window.setTimeout("showTeaser02()", 4000);
		window.setTimeout("showTeaser03()", 8000);
		window.setTimeout("showTeaser04()", 12000);
		window.setTimeout("showTeaser05()", 15000);
		window.setTimeout("showTeaser01()", 18000);
		window.setTimeout("slideShow()", 18000);
		}
	function showTeaser01() {
		if (isIE) teaserSlides.filters[0].Apply();
		document.getElementById("slide05").style.visibility="hidden";
		document.getElementById("slide01").style.visibility="visible";
		if (isIE) teaserSlides.filters[0].Play();
		}
	function showTeaser02() {
		if (isIE) teaserSlides.filters[0].Apply();
		document.getElementById("slide01").style.visibility="hidden";
		document.getElementById("slide02").style.visibility="visible";
		if (isIE) teaserSlides.filters[0].Play();
		}
	function showTeaser03() {
		if (isIE) teaserSlides.filters[0].Apply();
		document.getElementById("slide02").style.visibility="hidden";
		document.getElementById("slide03").style.visibility="visible";
		if (isIE) teaserSlides.filters[0].Play();
		}
	function showTeaser04() {
		if (isIE) teaserSlides.filters[0].Apply();
		document.getElementById("slide03").style.visibility="hidden";
		document.getElementById("slide04").style.visibility="visible";
		if (isIE) teaserSlides.filters[0].Play();
		}
	function showTeaser05() {
		if (isIE) teaserSlides.filters[0].Apply();
		document.getElementById("slide04").style.visibility="hidden";
		document.getElementById("slide05").style.visibility="visible";
		if (isIE) teaserSlides.filters[0].Play();
		}

// Set Default Window.Status Message
	window.defaultStatus="Ocean Vista Resort";