﻿			// Globals
			// Major version of Flash required
			var requiredMajorVersion = 8;
			// Minor version of Flash required
			var requiredMinorVersion = 0;
			// Minor version of Flash required
			var requiredRevision = 0;



//openPopWin('/hope_flash.html',  491, 358, 'directories=no,status=no,scrollbars=no,resize=no,menubar=no','cen','cen');
 function writeLeftConstants()
{
    document.write('<h2>Appointments</h2>');
    document.write('<p>');
    document.write('<strong>By Phone:</strong><br />Plano (972) 985-2797<br />Fort Worth (817) 922-2880<br />Toll Free (888) 781-5558<br /><br />');
	document.write('<strong>Additional Information<br /> Or Appointments</strong> <a href="https://www.baylorhealth.com/PhysiciansLocations/Plano/SpecialtiesServices/ScoliosisCare/Appointment/" target="_blank">By E-mail</a><br /><br />');
	document.write('<img src="/images/left_div.gif" width="238" height="1" class="left_div"/>');
	document.write('<p>');
    document.write('<div><a href="/aboutus/contact.htm" class="large">Contact Us</a></div>');
    document.write('<img src="/images/left_div.gif" width="238" height="1" class="left_div"/>');
    document.write('<div><a href="/aboutus/findus.htm" class="large">Our Locations</a></div>');
    document.write('<img src="/images/left_div.gif" width="238" height="1" class="left_div"/>');
	document.write('<div><a href="/aboutus/travel.htm" class="large">Travel Information</a></div>');
    document.write('<img src="/images/left_div.gif" width="238" height="1" class="left_div"/>');
}

function drawVideo()
{
    document.write('<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="255" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">');
    document.write('<PARAM NAME="src" VALUE="/mov/kxas.mov" />');
    document.write('<PARAM NAME="autoplay" VALUE="true" />');
    document.write('<PARAM NAME="controller" VALUE="true" />');
    document.write('<PARAM NAME="loop" VALUE="false" />');
    document.write('<EMBED SRC="/mov/kxas.mov" WIDTH="320" HEIGHT="255" AUTOPLAY="true" CONTROLLER="true" LOOP=false PLUGINSPAGE="http://www.apple.com/quicktime/download/">');
    document.write('</EMBED></OBJECT>');
}
function drawPopUp()
{
	var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
		document.write('<script>');
		document.write('openPopWin("/hope_flash.html", 491, 358, "directories=no,status=no,scrollbars=no,resize=no,menubar=no","cen","cen");');
		document.write('</script>');
   	}
	else {
		//document.write('<a href="http://www.adobe.com/go/getflash/"><img src="/flash/getflash_footer.gif" width="566" height="79" border="0" /></a>');
		
	}
}
function drawPromoFlash()
{
	var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
		document.write('<div id="promo_flash">');
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="566" height="79" id="promo" align="top" VIEWASTEXT>');
	    document.write('<param name="allowScriptAccess" value="sameDomain" />');
	    document.write('<param name="movie" value="/Flash/dsoEvents.swf" />');
	    document.write('<param name="quality" value="high" />');
	    document.write('<param name="bgcolor" value="#fff" />');
	    document.write('<param name="wmode" value="transparent" />');
	    document.write('<embed src="/Flash/dsoEvents.swf" wmode="transparent" menu="false" quality="high" width="566" height="79" name="promo" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	    document.write('</object>');
	    document.write('</div>');
	}
	else {
		document.write('<a href="http://www.adobe.com/go/getflash/"><img src="/flash/getflash_footer.gif" width="566" height="79" border="0" /></a>');
		
	}
}
function drawHomeFlash()
{
	
	// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
	var hasProductInstall = DetectFlashVer(6, 0, 65);

	// Version check based upon the values defined in globals
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

	// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
	if ( hasProductInstall && !hasReqestedVersion ) {
		// MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
		// This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
		// DO NOT MODIFY THE FOLLOWING FOUR LINES
		// Location visited after installation is complete if installation is required
		var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
		var MMredirectURL = window.location;
		document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		var MMdoctitle = document.title;

		var str = AC_FL_RunContent(
			"src", "flash/dso_hp_expressInstall",
			"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
			"width", "1003",
			"height", "470",
			"align", "middle",
			"id", "detection",
			"quality", "high",
			"bgcolor", "#FFFFFF",
			"name", "detection",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
		alert(str);
	} else if (hasReqestedVersion) {
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		AC_FL_RunContent(
			"src", "flash/dsoHome",
			"width", "1003",
			"height", "470",
			"align", "middle",
			"id", "main",
			"quality", "high",
			"bgcolor", "#FFFFFF",
			"wmode", "transparent",
			"name", "main",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",			
			"codebase", "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = ''
		+ '<a href="http://www.adobe.com/go/getflash/"><img src="flash/NO_FLASH_JACK.jpg" width="1003" height="470" border="0" /></a>';
		document.write(alternateContent);  // insert non-flash content
		//document.url = "/flash/missing";
	}
	
	
	/*var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
	    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1003" height="470" align="top" VIEWASTEXT>');
	    document.write('<param name="allowScriptAccess" value="sameDomain" />');
	    document.write('<param name="movie" value="/Flash/dsoHome.swf" />');
	    document.write('<param name="quality" value="high" />');
	    document.write('<param name="bgcolor" value="#f1e7de" />');
	    document.write('<param name="wmode" value="transparent" />');
	    document.write('<embed src="/Flash/dsoHome.swf" menu="false" wmode="transparent" quality="high" width="1003" height="470" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	    document.write('</object>');
	    
	    
	}
	else {
    document.write('<p>Need Macromedia Flash Player?<br /><a href="http://www.macromedia.com/downloads/" target="_blank" style="text-decoration: underline; color:#fff;">Click here</a> to download and install.</p>');
		
	}*/
}

function drawGalleryFlash()
{
	var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
	    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="502" height="279" align="top" VIEWASTEXT>');
	    document.write('<param name="allowScriptAccess" value="sameDomain" />');
	    document.write('<param name="movie" value="/Flash/gallery.swf" />');
	    document.write('<param name="quality" value="high" />');
	    document.write('<param name="bgcolor" value="#000" />');
	    document.write('<embed src="/Flash/gallery.swf" menu="false" quality="high" width="502" height="279" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	    document.write('</object>');
	    
	    
	}
	else {
				document.write('<p>Need Macromedia Flash Player?<br /><a href="http://www.macromedia.com/downloads/" target="_blank" style="text-decoration: underline; color:#fff;">Click here</a> to download and install.</p>');
		
	}
}


//================
// Popup Variables
//================
var preloadFlag = false;
var popWin = null;  // Use this when referring to pop-up window
var winCount = 0;
var winName = "popWin";

function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
//alert("ALery");
 var d_winLeft = 20;  // Default, pixels from screen left to window left
 var d_winTop = 20;   // Default, pixels from screen top to window top

 winName = "popWin" + winCount++; // Unique name for each pop-up window

 closePopWin();      // Close any previously opened pop-up window

 if (openPopWin.arguments.length >= 4)  // Any additional features?
  winFeatures = "," + winFeatures;

 else
  winFeatures = ""

 if (openPopWin.arguments.length == 6)  // Location specified
  winFeatures += getLocation(winWidth, winHeight, winLeft, winTop);

 else
  winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop);
  popWin = window.open(winURL, winName, "width=" + winWidth + ",height=" + winHeight + winFeatures);
    if (popWin.opener == null)
  	popWin.opener = window;

 }

function closePopWin(){    // close pop-up window if it is open
 // Do not close if early IE
 if ((navigator.appName != "Microsoft Internet Explorer") || (parseInt(navigator.appVersion) >=4)) {
  if(popWin != null) {
   if(!popWin.closed) {
    popWin.close();
   }
  }
 }
}

function getLocation(winWidth, winHeight, winLeft, winTop){
 var winLocation = ""

 if (winLeft < 0)
  winLeft = screen.width - winWidth + winLeft;
 if (winTop < 0)
  winTop = screen.height - winHeight + winTop;
 if (winTop == "cen")
  winTop = (screen.height - winHeight)/2 - 20;
 if (winLeft == "cen")
  winLeft = (screen.width - winWidth)/2;
 if (winLeft>0 && winTop>0)
  winLocation =  ",screenX=" + winLeft + ",left=" + winLeft + ",screenY=" + winTop + ",top=" + winTop;
 else
  winLocation = "";
 return winLocation;
}

