var isDHTML = 0;

var isLayers = 0;

var isAll = 0;

var isID = 0;

currDisplay = "none"

if (document.getElementById) {isID = 1; isDHTML = 1;}

else {

browserVersion = parseInt(navigator.appVersion);

if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}

else {

if (document.all) {isAll = 1; isDHTML = 1;}

}}



function findDOM(objectID,withStyle) {

  var menuArea = "menuArea";

  if (withStyle == 1) {

    if (isID) { return (document.getElementById(objectID).style) ; }

    else { 

      if (isAll) { return (document.all[objectID].style); }

      else {

        if (isLayers) { return (document.layers[menuArea].layers[objectID]); }

      };

    }

   }

   else {

     if (isID) { return (document.getElementById(objectID)) ; }

     else { 

       if (isAll) { return (document.all[objectID]); }

       else {

         if (isLayers) { return (document.layers[menuArea].layers[objectID]); }

       };

     }

   }

}



function toggleDisplay(objectID) {

  if (isAll || isID) {

    if (currDisplay != "none") {

        domStyle = findDOM(currDisplay,1);

        domStyle.display='none';

    }

    if (currDisplay != objectID) {

       domStyle = findDOM(objectID,1);

       domStyle.display='block';

       currDisplay=objectID;

    } else {

       domStyle = findDOM(objectID,1);

       domStyle.display='none';

       currDisplay="none";

    }

  }

  return;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function choosePic() {

    if (document.images) {

       randomNum = Math.floor((Math.random()*4)) + 1;

       document.home_pic.src = "images/interior.jpg";

    }

}



function chooseNews() {

    randomNum = Math.floor((Math.random()*5)) + 1;

    obj = document.getElementById('newsItem');

    obj.innerHTML = newsItems[randomNum];

}



function openWindow (url, winName, popWidth, popHeight) {

		var horizPos = (screen.availWidth - popWidth)/ 2;

		var vertPos = ((screen.availHeight - popHeight)/ 2) + 30;

		window.open(url, winName, "width=" + popWidth + ", height=" + popHeight + ", resizable=no, top=" + vertPos + ", left=" + horizPos + ", scrollbars=no, status=no");

}



function initAll() {

    if (document.getElementById) {

        cursorX = 0;

        cursorY = 0;

    } else {

        document.captureEvents(Event.MOUSEMOVE)

    }

    document.onmousemove = moveHandler

}



function moveHandler(evt) {

    obj = document.getElementById('centerName');

    if (document.all) {

        obj.style.left = window.event.clientX - 250;

        obj.style.top = window.event.clientY - 25; 

    } else {

        obj.style.left = evt.pageX - 250;

        obj.style.top = evt.pageY - 25;

    }

}



function showCenter(centerNo) {

    obj = document.getElementById('centerName');

    obj.innerHTML = centers[centerNo];

    obj.style.width = 240;

    obj.style.height = centerHeights[centerNo];

    obj.style.visibility = 'visible';

    obj = document.getElementById('centerAddress');

    obj.innerHTML = addresses[centerNo];

    obj.style.visibility = 'visible';

}



function hideCenter() {

    document.getElementById('centerName').innerHTML = "";

    document.getElementById('centerName').style.visibility = 'hidden';

}



function showAddress(centerNo) {

    obj = document.getElementById('centerAddress');

    obj.innerHTML = addresses[centerNo];

    obj.style.visibility = 'visible';

}



function openWindowScroll (url, winName, popWidth, popHeight) {

		var horizPos = (screen.availWidth - popWidth)/ 2;

		var vertPos = ((screen.availHeight - popHeight)/ 2) + 30;

		window.open(url, winName, "width=" + popWidth + ", height=" + popHeight + ", resizable=no, top=" + vertPos + ", left=" + horizPos + ", scrollbars=yes, status=no");

}



newsItems = new Array();

newsItems[1] = "<p class='home_case_study'>Our Dallas office has moved to 15851 Dallas Parkway, Suite&nbsp;600, Addison, Texas 75001. The phone is 214.561.8702 and the fax is 214.561.8704.</p>";

newsItems[2] = "<p class='home_case_study'><a class='home_case_study' href='case_studies.html'>National Surgical Care helps a hospital successfully convert its ASC into a joint venture with physicians</a></p>";

newsItems[3] = "<p class='home_case_study'><a class='home_case_study' href='news_20070130_01.html'>National Surgical Care Partners With Sawtooth Surgery Center In Twin Falls, Idaho.</a></p>";

newsItems[4] = "<p class='home_case_study'><a class='home_case_study' href='news_20070103_01.html'>National Surgical Care announces executive appointments:  Sami&nbsp;Abbasi named Chief Executive Officer and Richard&nbsp;Pence promoted to President.</a></p>";

newsItems[5] = "<p class='home_case_study'><a class='home_case_study' href='news_20070410_01.html'>National Surgical Care Partners With South Austin Surgery Center in Austin, Texas</a></p>";

newsItems[6] = "<p class='home_case_study'><a class='home_case_study' href='news_20080227_01.html'>National Surgical Care has  acquired a majority interest in Coral Springs Surgical Center in Coral Springs, Florida, and announced the formation of a joint venture with Stamford Health System, Inc. to acquire a surgery center in Wilton, Connecticut.</a></p>";

newsItems[7] = "<p class='home_case_study'><a class='home_case_study' href='news_200800821_01.html'>National Surgical Care has  acquired a majority interest in Kenwood Surgery Center in Cincinnati, Ohio, and Ardmore Regional Surgery Center in Ardmore, Oklahoma.</a></p>";

newsItems[8] = "<p class='home_case_study'><a class='home_case_study' href='news_20081202_01.html'>National Surgical Care has  acquired a majority interest in Fullerton Surgical Center in Fullerton, California, and Weston Surgical Center in Weston, Florida.</a></p>";


centers = new Array();

centers[1] = "<p class='centerName'>Overlake Surgery Center<br>Bellevue, WA</p>";

centers[2] = "<p class='centerName'>Wilton Surgery Center<br>Wilton, CT</p>";

centers[3] = "<p class='centerName'>Gateway Ambulatory Surgery Center<br>Concord, NC</p>";

centers[4] = "<p class='centerName'>Central Kentucky Surgery Center<br>Danville, KY</p>";

centers[5] = "<p class='centerName'>Greater Dayton Surgery Center<br>Dayton, OH</p>";

centers[6] = "<p class='centerName'>Flatirons Surgery Center<br>Louisville, CO</p>";

centers[7] = "<p class='centerName'>Loveland Surgery Center<br>Loveland, CO</p>";

centers[8] = "<p class='centerName'>&nbsp;</p>";

centers[9] = "<p class='centerName'>Surgery Center of Long Beach<br>Long Beach, CA</p>";

centers[10] = "<p class='centerName'>&nbsp;</p>";

centers[11] = "<p class='centerName'>Morristown Surgical Center<br>Morristown, NJ</p>";

centers[12] = "<p class='centerName'>River View Surgery Center<br>Marion, IN</p>";

centers[13] = "<p class='centerName'>South Sound Surgery Center<br>Olympia, WA</p>";

centers[14] = "<p class='centerName'>Davis Surgery Center<br>Davis, CA</p>";

centers[15] = "<p class='centerName'>&nbsp;</p>";

centers[16] = "<p class='centerName'>&nbsp;</p>";

centers[17] = "<p class='centerName'>Tampa Bay Specialty Surgery Center<br>Pinellas Park, FL</p>";

centers[18] = "<p class='centerName'>Advanced Orthopedic Centers<br>Richmond, VA</p>";

centers[19] = "<p class='centerName'>&nbsp;</p>";

centers[20] = "<p class='centerName'>Specialty Surgery Center of San Antonio<br>San Antonio, TX</p>";

centers[21] = "<p class='centerName'>&nbsp;</p>";

centers[22] = "<p class='centerName'>Sawtooth Surgery Center<br>Twin Falls, ID</p>";

centers[23] = "<p class='centerName'>Torrance Surgery Center<br>Torrance, CA</p>";

centers[24] = "<p class='centerName'>Towson Surgical Center<br>Towson, MD</p>";

centers[25] = "<p class='centerName'>Coral Springs Surgical Center<br>Coral Springs, FL</p>";

centers[26] = "<p class='centerName'>Northpoint Surgery and Laser Center<br>West Palm Beach, FL</p>";

centers[27] = "<p class='centerName'>Austin Endoscopy Centers<br>South Austin Surgery Center<br>Austin, TX</p>";

centers[28] = "<p class='centerName'>Ardmore Regional Surgery Center<br>Ardmore, OK</p>";

centers[29] = "<p class='centerName'>Kenwood Surgery Center<br>Cincinnati, OH</p>";

centers[30] = "<p class='centerName'>Fullerton Surgical Center<br>Fullerton, CA</p>";

centers[31] = "<p class='centerName'>Weston Outpatient Surgical Center<br>Weston, FL</p>";


centerWidths = new Array();

centerWidths[1] = 150;

centerWidths[2] = 150;

centerWidths[3] = 200;

centerWidths[4] = 190;

centerWidths[5] = 180;

centerWidths[6] = 100;

centerWidths[7] = 160;

centerWidths[8] = 150;

centerWidths[9] = 160;

centerWidths[10] = 150;

centerWidths[11] = 160;

centerWidths[12] = 160;

centerWidths[13] = 160;

centerWidths[14] = 190;

centerWidths[15] = 190;

centerWidths[16] = 220;

centerWidths[17] = 192;

centerWidths[18] = 160;

centerWidths[19] = 134;

centerWidths[20] = 220;

centerWidths[21] = 180;

centerWidths[22] = 180;

centerWidths[23] = 140;

centerWidths[24] = 130;

centerWidths[25] = 190;

centerWidths[26] = 190;

centerWidths[27] = 190;

centerWidths[28] = 190;

centerWidths[29] = 190;

centerWidths[30] = 190;

centerWidths[31] = 190;



centerHeights = new Array();

centerHeights[1] = 40;

centerHeights[2] = 40;

centerHeights[3] = 40;

centerHeights[4] = 40;

centerHeights[5] = 40;

centerHeights[6] = 40;

centerHeights[7] = 40;

centerHeights[8] = 40;

centerHeights[9] = 40;

centerHeights[10] = 40;

centerHeights[11] = 40;

centerHeights[12] = 40;

centerHeights[13] = 40;

centerHeights[14] = 40;

centerHeights[15] = 40;

centerHeights[16] = 40;

centerHeights[17] = 40;

centerHeights[18] = 40;

centerHeights[19] = 40;

centerHeights[20] = 40;

centerHeights[21] = 40;

centerHeights[22] = 40;

centerHeights[23] = 40;

centerHeights[24] = 40;

centerHeights[25] = 40;

centerHeights[26] = 40;

centerHeights[27] = 60;

centerHeights[28] = 60;

centerHeights[29] = 60;

centerHeights[30] = 60;

centerHeights[31] = 60;


addresses = new Array();

addresses[1] = "<p class='centerAddress'><b>Overlake Surgery Center</b><br>1135 116th Avenue NE, Suite 300<br>Bellevue, WA 98004</p>";

addresses[2] = "<p class='centerAddress'><b>Wilton Surgery Center</b><br>195 Danbury Road<br>Wilton, CT 06897</p>";

addresses[3] = "<p class='centerAddress'><b>Gateway Ambulatory Surgery Center</b><br>1025 Gateway Court, NE<br>Concord, NC 28025<br><a href='about_case_studies_concord.html'>Case Study</a></p>";

addresses[4] = "<p class='centerAddress'><b>Central Kentucky Surgery Center</b><br>c/o Ephraim McDowell Hospital<br>217 South Third Street<br>Danville, KY 40422</p>";

addresses[5] = "<p class='centerAddress'><b>Greater Dayton Surgery Center</b><br>1625 Delco Park Drive<br>Dayton, OH 45420<br><a href='http://www.daytonsurgerycenter.com' target=_blank>www.daytonsurgerycenter.com</a></p>";

addresses[6] = "<p class='centerAddress'><b>Flatirons Surgery Center</b><br>70 Health Park Drive<br>Louisville, CO 80027</p>";

addresses[7] = "<p class='centerAddress'><b>Loveland Surgery Center</b><br>3800 North Grant Avenue<br>Loveland, CO 80538<br><a href='http://www.lovelandsurgerycenter.com' target=_blank>www.lovelandsurgerycenter.com</a></p>";

addresses[8] = "<p class='centerAddress'>&nbsp;</p>";

addresses[9] = "<p class='centerAddress'><b>Surgery Center of Long Beach</b><br>2880 Atlantic Avenue, Suite 160<br>Long Beach, CA 90806<br><a href='http://www.surgerycenteroflongbeach.com' target=_blank>www.surgerycenteroflongbeach.com</a></p>";

addresses[10] = "<p class='centerAddress'><b>Lake Tahoe Surgery Center</b><br>P.O. Box 12189<br>Zephyr Cove, NV 89448<br><a href='http://www.laketahoesurgerycenter.com' target=_blank>www.laketahoesurgerycenter.com</a></p>";

addresses[11] = "<p class='centerAddress'><b>Morristown Surgical Center</b><br>111 Madison Avenue, Suite 200<br>Morristown, NJ 07960</p>";

addresses[12] = "<p class='centerAddress'><b>River View Surgery Center</b><br>330 North Wabash Avenue, Suite 200<br>Marion, IN 46952</p>";

addresses[13] = "<p class='centerAddress'><b>South Sound Surgery Center</b><br>413 Lilly Road NE, Emilie Gamelin Pavilion<br>Olympia, WA 98501<br><a href='http://www.southsoundsurgerycenter.com' target=_blank>www.southsoundsurgerycenter.com</a></p>";

addresses[14] = "<p class='centerAddress'><b>Davis Surgery Center</b><br>2120 Cowell Blvd.<br>Davis, CA 95618<br><a href='http://www.davissurgerycenter.com' target=_blank>www.davissurgerycenter.com</a></p>";

addresses[15] = "<p class='centerAddress'>&nbsp;</p>";

addresses[16] = "<p class='centerAddress'>&nbsp;</p>";

addresses[17] = "<p class='centerAddress'><b>Tampa Bay Specialty Surgery Center</b><br>6500 66th Street<br>Pinellas Park, FL 33781<br><a href='http://www.tampabayortho.com' target=_blank>www.tampabayortho.com</a></p>";

addresses[18] = "<p class='centerAddress'><b>Advanced Orthopedic Centers</b><br>7858 Shrader Road<br>Richmond, VA 23294<br><a href='http://www.aocortho.com' target=_blank>www.aocortho.com</a></p>";

addresses[19] = "<p class='centerAddress'>&nbsp;</p>";

addresses[20] = "<p class='centerAddress'><b>Specialty Surgery Center of San Antonio</b><br>5255 Prue Road, Suite 100<br>San Antonio, TX 78240<br><a href='http://www.specialtyasc.com' target=_blank>www.specialtyasc.com</a><br><a href='about_case_studies.html'>Case Study</a></p>";

addresses[21] = "<p class='centerAddress'>&nbsp;</p>";

addresses[22] = "<p class='centerAddress'><b>Sawtooth Surgery Center</b><br>115 Falls Avenue W<br>Twin Falls, ID 83301<br><a href='http://www.sawtoothsurgery.com' target=_blank>www.sawtoothsurgery.com</a></p>";

addresses[23] = "<p class='centerAddress'><b>Torrance Surgery Center</b><br>23560 Crenshaw Boulevard, Suite 104<br>Torrance, CA 90505<br><a href='http://www.torranceasc.com' target=_blank>www.torranceasc.com</a></p>";

addresses[24] = "<p class='centerAddress'><b>Towson Surgical Center</b><br>1122 Kenilworth Drive, Suite 17<br>Towson, MD 21204<br><a href='http://www.towsonasc.com' target=_blank>www.towsonasc.com</a></p>";

addresses[25] = "<p class='centerAddress'><b>Coral Springs Surgical Center</b><br>1725 University Drive, Second Floor<br>Coral Springs, FL 33071<br><a href='http://www.coralspringssurgicalcenter.com' target=_blank>www.coralspringssurgicalcenter.com</a></p>";

addresses[26] = "<p class='centerAddress'><b>Northpoint Surgery and Laser Center</b><br>200 Northpoint Parkway<br>West Palm Beach, FL 33407<br><a href='http://www.northpointsurgery.com' target=_blank>www.northpointsurgery.com</a></p>";

addresses[27] = "<table><tr><td><p class='centerAddress'><b>Austin Endoscopy Center I</b><br>8015 Shoal Creek Boulevard<br>Austin, TX 78757<br><a href='http://www.austingastro.com' target=_blank>www.austingastro.com</a></p></td><td><p class='centerAddress'><b>Austin Endoscopy Center II</b><br>4310 James Casey Street<br>Austin, TX 78745<br><a href='http://www.austingastro.com' target=_blank>www.austingastro.com</a></p></td></tr><tr><td><p class='centerAddress'><b>South Austin Surgery Center</b><br>4207 James Casey<br>Austin, TX 78745<br><a href='http://www.southaustinsurgerycenter.com' target=_blank>www.southaustinsurgerycenter.com</a></p></td><td>&nbsp;</td></tr></table>";

addresses[28] = "<table><tr><td><p class='centerAddress'><b>Ardmore Regional Surgery Center</b><br>2002 12th Street NW, Suite C<br>Ardmore, OK 73401<br></tr></table>";

addresses[29] = "<p class='centerAddress'><b>Kenwood Surgery Center</b><br>8250 Kenwood Crossing Way<br>Cincinnati, OH 43236<br><a href='http://www.kenwoodsc.com' target=_blank>www.kenwoodsc.com</a></p>";

addresses[30] = "<p class='centerAddress'><b>Fullerton Surgical Center</b><br>2240 North Harbor Blvd<br>Fullerton, CA 92835<br></p>";

addresses[31] = "<p class='centerAddress'><b>Weston Outpatient Surgical Center</b><br>2229 North Commerce Parkway<br>Weston, FL 33326<br><a href='http://www.westonoutpatient.com' target=_blank>www.westonoutpatient.com</a></p>";


var theCharacterTimeout = 40;

var theStoryTimeout     = 4000;

var theWidgetOne        = "";

var theWidgetTwo        = "";

var theWidgetNone       = "";

var theLeadString       = "";



var theSummaries = new Array();

var theSiteLinks = new Array();



var theItemCount = 5;

theSummaries[0] = "<p class='home_case_study'>National Surgical Care has acquired a majority interest in Weston Outpatient Surgical Center in Weston, Florida and Fullerton Surgical Center in Fullerton, California.</p>";

theSiteLinks[0] = "news_20081202_01.html";

theSummaries[1] = "<p class='home_case_study'>National Surgical Care has acquired a majority interest in Kenwood Surgery Center in Cincinnati, Ohio, and Ardmore Regional Surgery Center in Ardmore, Oklahoma.</p>";

theSiteLinks[1] = "news_200800821_01.html";


theSummaries[2] = "<p class='home_case_study'>National Surgical Care acquired majority interest in Coral Springs Surgical Center in Florida and formed a joint venture with Stamford Health System to acquire an ASC in Wilton, CT.</p>";

theSiteLinks[2] = "news_20080227_01.html";


theSummaries[3] = "<p class='home_case_study'>National Surgical Care signs management agreement with Flatirons Surgery Center in Louisville, CO.</p>";

theSiteLinks[3] = "news_20070430_01.html";



theSummaries[4] = "<p class='home_case_study'>National Surgical Care's chief financial officer elected to ASCA board.</p>";

theSiteLinks[4] = "news_20070421_01.html";



theSummaries[5] = "<p class='home_case_study'>National Surgical Care partners with South Austin Surgery Center in Texas.</p>";

theSiteLinks[5] = "news_20070410_01.html";





// Ticker startup

function startTicker()

{

	// Define run time values

	theCurrentStory     = -1;

	theCurrentLength    = 0;

	// Locate base objects

	if (document.getElementById) {

		    theAnchorObject     = document.getElementById("tickerAnchor");

			runTheTicker();

		 }

	else {

            document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");

            return true;

	}

}

// Ticker main run loop

function runTheTicker()

{

	var myTimeout;

	// Go for the next story data block

	if(theCurrentLength == 0)

	{

		theCurrentStory++;

		theCurrentStory      = theCurrentStory % theItemCount;

		theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');

		theTargetLink        = theSiteLinks[theCurrentStory];

		theAnchorObject.href = theTargetLink;

		thePrefix 	     = "<span class=\"tickls\">" + theLeadString + "</span>";

	}

	// Stuff the current ticker text into the anchor

	theAnchorObject.innerHTML = thePrefix +

	theStorySummary.substring(0,theCurrentLength) + whatWidget();

	// Modify the length for the substring and define the timer

	if(theCurrentLength != theStorySummary.length)

	{

		theCurrentLength++;

		myTimeout = theCharacterTimeout;

	}

	else

	{

		theCurrentLength = 0;

		myTimeout = theStoryTimeout;

	}

	// Call up the next cycle of the ticker

	setTimeout("runTheTicker()", myTimeout);

}

// Widget generator

function whatWidget()

{

	if(theCurrentLength == theStorySummary.length)

	{

		return theWidgetNone;

	}



	if((theCurrentLength % 2) == 1)

	{

		return theWidgetOne;

	}

	else

	{

		return theWidgetTwo;

	}

}

