<!-- Older Browser Hide 

// Set a font increment counter to 0.  This counter will be stored in a cookie and used throughout.
var curFontIncrement = 0;

function init(){
    // Check for the existence of a fontSize cookie.  If it's there 
    // then increment the text size to that value.  Otherwise go with the detault.
    if (getFontSizeCookie()) {
        // Loop through calls to increaseFont() as appropriate, based on cookie value.
        var loopValue = getFontSizeCookie();
        for (var i = 0; i < loopValue; i++) {
            increaseFont();
        }
    }
}

// Fix the Array.push functionality on old browsers (like IE 5.0)
if(!Array.prototype.push) {
    function array_push(thing){
        this[this.length ] = thing; 
        return this.length
    }
    Array.prototype.push = array_push;
}


// Stuff for flash movie
var moviename = "sutter";
 
function movieobject(moviename)
{
    if (navigator.appName.indexOf ("Microsoft") !=-1) 
    {
        return window[moviename]
    }
        else
    {
        return document[moviename]
    }
}

var movie_ready = "false";

function loadmovie()
{
    if(movie_ready == "false")
    {
        while(movie_ready == "false")
        {
            if(movieobject(moviename).PercentLoaded() == 100)
            {
                movieobject(moviename).GotoFrame (65);
                movie_ready = "true";
            }
        }
    }
    else
    {
        movieobject(moviename).GotoFrame (65);
    }
}

/*
----------------------------------------------------------------
----------------------------------------------------------------
  JAVASCRIPT
  Author: Matthew L. Empringham
  Date: May 3, 2002
  Version 1.0
  Function: Display Default Text in Search Text Field
  Notes: If different pages need different default messages, edit this function
----------------------------------------------------------------
----------------------------------------------------------------
*/
function searchDefaultText(form,field,text){
    if(document[form] && document[form][field]){
        if(document[form][field].value == text)
        {
            document[form][field].value = "";
        }else if(document[form][field].value == "")
        {
            document[form][field].value = text;
        }
    }
}

/*
----------------------------------------------------------------
----------------------------------------------------------------
  JAVASCRIPT
  Author: Jesse Piascik
  Date: August 7, 2002
  Version 1.0
  Function: Pre-load graphics for faster response times with image rollovers
----------------------------------------------------------------
----------------------------------------------------------------
*/

//To make this backward compatible JSP 4/30/03
var toggleImages = new ToggleImageHolder(.5);
//JSP 4/30/03

//ToggleImage Classes and Methods
function ToggleImage(image) {
    var rollImageSrc = image.src;
    rollImageSrc = rollImageSrc.replace(/\.gif/g, "_r.gif");

    this.rollImageSrc = rollImageSrc;
    this.imageSrc = image.src;
    this.image = image;

    //This is to preload the rollover image
    this.rollImage = new Image();
    this.rollImage.src = rollImageSrc;

}

function ToggleImageHolder(numImages) {
    
    //keep backward compatability JSP 4/30/03
    this.loaded = false;    
    //JSP 4/30/03
    
    this.totalImages = numImages;
    this.imagesLoaded = 0;
    //Methods   
    this.add = add;
    this.toggle = toggle;

}

function add(image) {
    //keep backward compatability (&& (!this.loaded) JSP 4/30/03
    if ( ( (this.imagesLoaded < this.totalImages) || (this.totalImages < 1) ) && (!this.loaded) ) {
        //alert("add running");

        var toggleImage = new ToggleImage(image);

        this[image.src] = toggleImage;
        this[toggleImage.rollImageSrc] = toggleImage;

        this.imagesLoaded++;
    }
}

function toggle(image, on) {
    //keep backward compatability JSP 4/30/03
    if(this.totalImages < 1) {this.loaded = true;}
    //JSP 4/30/03

    if (this.imagesLoaded >= this.totalImages) {
        //strip the _r to get the original source
        var src = image.src;
        
        if (on) {
            this[src].image.src = this[src].image.src.replace(/\.gif/g, "_r.gif");;
        } else {
            this[src].image.src = this[src].image.src.replace(/_r.gif/g, ".gif");;
        }
        
    }
}

/*
----------------------------------------------------------------
----------------------------------------------------------------
  JAVASCRIPT
  Author: Matthew L. Empringham
  Date: June 26, 2002
  Version 1.0
  Function: Set the printThisPage() function <span id="PrintVersion"> to hidden
  Dependency: browser_detection.js
  Notes: 
----------------------------------------------------------------
----------------------------------------------------------------
*/
function setSpanVisibility(sVis){
    if (is_ie && (sVis.toLowerCase == "hide" || sVis.toLowerCase == "hidden"))
    {
        PrintVersion.style.visibility = "hidden";
    }else if(is_nav && (sVis.toLowerCase == "hide" || sVis.toLowerCase == "hidden"))
    {
        if(is_gecko)
        {
            document.getElementById('PrintVersion').style.visibility = "hide";
        }
        else
        {
            document.layers['PrintVersion'].visibility = "hide";
        }
    }
}

/*
----------------------------------------------------------------
----------------------------------------------------------------
  JAVASCRIPT
  Author:     Matthew L. Empringham
  Date:       June 20, 2002
  Version     1.0
  Function:   Print This Page
  Dependency: browser_detection.js
  Notes:      Tested and works on Netscape 6.2 and IE 5.5. Edited by
          Levi Nunnink on 3/25/03
  
  openWindow(width,height,xoffset,yoffset,html) USE THIS FOR OLDER BROWSERS
----------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function printThisPage(AffName)
{
    // setting layers
    var indexZa = 2;
    var indexZb = -2;
    
    var sVisible;
    var sHidden;
    var sSearch;

    if (is_ie){
        // IE
        sVisible = "visible";
        sHidden = "hidden";
        aNumber = 0;
    }else if(is_nav){
        // NN6
        sVisible = "show";
        sHidden = "hide";
    }
    
    if(is_nav4){
        // NN4
        window.print();
    }else{
    
        sSearch = document.getElementById('QuickSearchTable').innerHTML;
        for(i=0;i<document.getElementById('PrintVersionContent').childNodes.length;i++){
            if(document.getElementById('PrintVersionContent').childNodes[i].nodeName != "#text"){
                document.getElementById('PrintVersionContent').childNodes[i].width = "100%";
                break;
            }
        }

        document.getElementById('PrintVersion').innerHTML = document.getElementById('Logo').innerHTML + "<br><br>" + document.getElementById('PrintVersionContent').innerHTML + "<br><center><div style='font-size:10pt;'>This material was printed from the " + AffName + " website at: " + document.location + "</div></center>";
        document.getElementById('PrintVersion').style.visibility = sVisible;
        document.getElementById('PrintVersion').style.zIndex = indexZa;
        document.getElementById('DisplayVersion').style.visibility = sHidden;
        document.getElementById("QuickSearchTable").style.visibility = sHidden;
        window.print(); 
        document.getElementById("QuickSearchTable").style.visibility = sVisible;
        document.getElementById('PrintVersion').innerHTML = "";
        document.getElementById('DisplayVersion').style.visibility = sVisible;
        document.getElementById('PrintVersion').style.zIndex = indexZb;
        document.getElementById('PrintVersion').style.visibility = sHidden; 
   }
    
}


function hideSearch()
{
    if(!is_nav4){
        if(document.getElementById("QuickSearchTable").innerHTML){
           document.getElementById("QuickSearchTable").innerHTML = "";
        }
    }
}

function showSearch(sSearch)
{
    if(!is_nav4){
        if(document.getElementById("QuickSearchTable").innerHTML){
            document.getElementById("QuickSearchTable").innerHTML = sSearch;
        }
    }
}

/*
----------------------------------------------------------------
----------------------------------------------------------------
  JAVASCRIPT
  Author: Matthew L. Empringham
  Date: December 12, 2002
  Version 1.0
  Function: Used to Email Current URL to...
  Dependency: browser_detection.js
  Notes: 
----------------------------------------------------------------
----------------------------------------------------------------
*/
function emailThisPage(){
    //'location=("mailto:?body=" + document.URL + " ");'
    var url = document.URL;
    url = escape(url);
    url='mailto:?body=' + url + '' ;
    location=(url);
}

/*
----------------------------------------------------------------
---------------------------- INFO ------------------------------
  JAVASCRIPT
  Author: Matthew L. Empringham
  Date: Nov 25, 2002
  Version 1.0
  Function: RETURNS QUERY STRING VALUE for GIVEN NAME
  Notes:    Returns VALUE from QUERYSTRING or FALSE if NOT FOUND
----------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function getQueryValue(name){
    
    var subend;
    var substart;
    var queryString;
    var value = false;
    if(document.URL && document.URL.indexOf("?") > -1){
        queryString = unescape(document.URL);
        queryString.substring(queryString.indexOf("?")+1);
        
        if (queryString.indexOf(name) < 0) {
            return value;
        }
        
        substart = queryString.indexOf(name) + (name.length + 1);
        subend = queryString.indexOf("&",substart);
        if(subend == -1){
            subend = queryString.length;
        }
        if(substart != -1){
            value = queryString.substring(substart,subend);
        }
    }
    return value;
}

function isDomain(domain) {

    var url = document.URL;
    if (url.indexOf("?") > -1) {
        url = url.substring(0,url.indexOf("?")-1);
        return true;
    }
    //if (url.indexOf(domain + "/") > -1) {
    //    return true;
    //}
    
    return false;
}

/*
----------------------------------------------------------------
---------------------------- INFO ------------------------------
  JAVASCRIPT
  Author: Jesse Piascik
  Date: December 10, 2002
  Version 1.0
  Function: BackToLink object
  Notes:    Dependency of Cookie.js
            Creates a BackToLink object and sets the cookies.  
            Contains accessors for getting url and label.
        
----------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function BackToLink(domain) {
    //If the current url doesn't contain domain throw error
    //if(!isDomain(domain)) {
    //   this.hasData = false;
    //    return;
    //}

    //methods
    this.getUrl = getBackToUrl;
    this.getLabel = getBackToLabel;
    this.destroy = destroyBackTo;
    this.jump = jumpBackTo;

    //attributes
    this.hasData = true;
    this.domain = domain;
    this.label = getCookie("aff_site");
    this.url = getCookie("aff_url");    

    //If the values aren't in the cookie, get them from the query string
    //If there not in the query string set hasData=false and return
    if (this.label == null) {
        this.label = getQueryValue("aff_site");
        if (this.label) {
            setCookie("aff_site", this.label, null, "/");
        } else {
            this.hasData = false;
            return;
        }
    }
    
    if (this.url == null) {
        this.url = getQueryValue("aff_url");
        //Make backward compatible to use http referer if aff_url is not passed
        //***When no url is available don't show backToLink***
        if(!this.url) {
            this.url = document.referrer;
        }
        //Final Check before setting the cookie
        if(!this.url) {
            this.destroy();
            return;
        } else {
            setCookie("aff_url", this.url, null, "/");
        }
    }
    

}

function getBackToLabel() {
    return this.label;
}

function getBackToUrl() {
    return this.url;
}

function destroyBackTo() {
    deleteCookie("aff_site", "/");
    deleteCookie("aff_url", "/");
}

function jumpBackTo() {
    this.destroy();
    document.location=this.url;
}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   increaseFont: Increments the font size upwards
  Notes:      This function is called when a user wants to increase the size of the page text.
  Update:     Updated to alert user font function is not available to NN4.7
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function increaseFont() {

    // If NN4.7 doesn't support this function, ALERT
    if(is_nav4){
        window.alert('Sorry, your browser does not support, \"make text larger\".\nPlease upgrade your browser to a higher version if you want this added functionality.');
    }else{
        // Get our array of nodes from helper function
        var nodes = grabTextNodes();

        if (nodes.length > 0) {
            for(var i = 0; i < nodes.length; i++) {
                var node = nodes[i];

                // Get the current font size of the node
                var currentValue = getCurrentFontSize(node);

                // Halt the function if we can't get a current value properly -- something must be wrong
                if (currentValue == null || isNaN(currentValue)) {
                    return;
                }

                // Calculate the new value based on the standard modifier
                var newValue = currentValue + getFontModifier();

                // Set the new font size to the node
                changeFontSize(node,newValue);

            }

            // Increment the counter
            curFontIncrement = curFontIncrement + 1;
            // Set the cookie to the new font increment
            setFontSizeCookie(curFontIncrement);
        }
        else {
            //alert("Unable to increase font size.  No elements were found to read!");
        }
    }
}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   restoreFont: Restores the page fonts to default values
  Notes:      This function is called when a user wants to change their text sizes back to the 
              default values, presumably after increasing their fonts with related functions in 
              this script.
  Update:     Updated to alert user font function is not available to NN4.7
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function restoreFont() {

    // If NN4.7 doesn't support this function, ALERT
    if(is_nav4){
        window.alert('Sorry, your browser does not support, \"restore text size\".\nPlease upgrade your browser to a higher version if you want this added functionality.');
    }else{

        // If our fonts are already at the standard size then do nothing, simply return
        if (curFontIncrement == 0) {
            return;
        }

        // Get our array of nodes from helper function
        var nodes = grabTextNodes();

        if (nodes.length > 0) {
            for(var i = 0; i < nodes.length; i++) {
                var node = nodes[i];

                // Get the current font size of the node
                var currentValue = getCurrentFontSize(node);

                // Halt the function if we can't get a current value properly -- something must be wrong
                if (currentValue == null || isNaN(currentValue)) {
                    return;
                }

                // Calculate the new value based on the standard modifier
                var newValue = currentValue - (curFontIncrement * getFontModifier());
                // Set the new font size to the node
                changeFontSize(node,newValue);

            }

            // Reset the counter
            curFontIncrement = 0;

            // Delete the font increment cookie
            deleteFontSizeCookie();
        }
        else {
            //alert("Unable to restore font size.  No elements were found to read!");
        }
    }
}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   grabTextNodes: Returns nodes for the font change operations
  Dependency: browser_detection.js
  Notes:      This helper function returns an array of nodes for the font changing operations 
              in this application.
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function grabTextNodes() {
    var allElements;
    var wantedElements = new Array();
    // '*' not supported by IE/Win 5.5 and below
    allElements = (is_ie && !is_ie6up) ? document.all : document.getElementsByTagName('*');

    for(var i = 0; i < allElements.length; i++){
    
        // Check for an old version of IE and do special things for it
        if (is_ie) {
            // Search for All ID's with Attribute Name
            var id = allElements.item(i).getAttribute("id");

            // Check the node to see if it matches
            if(id.indexOf("dynafont") != -1){

                wantedElements.push(allElements.item(i));

            }
        }
        else {  // All good browsers can use this logic
            
            var node = allElements.item(i);
            for(var j = 0; j < node.attributes.length; j++) {
                if(node.attributes.item(j).nodeName == 'id') {
                    if(node.attributes.item(j).nodeValue.indexOf("dynafont") != -1) {
                        // We're here if we found a dynafont node - add this node to the new collection
                        wantedElements.push(node);

                    }
                }
            }       
        }
    }

    
    // If we found nodes then return the array.  Otherwise return null.
    if (wantedElements.length > 0) {
        return wantedElements;
    }
    else {
        return null;
    }
}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   getCurrentFontSize: Returns the current font size value for the node in question
  Dependency: browser_detection.js
  Notes:      This helper function returns a font size from the current style attributes of the node. 
              Newer versions of NS/Mozilla return a font size value in "px" from the getComputedStyle()
              method even if the font styles of the page are specified in "pt".  Therefore, we are 
              doing a rough conversion of this value to "pt" by subtracting 2 from the "px" value.
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function getCurrentFontSize(node) {
    var value = node.style["fontSize"];

    if (!value) {
        if (document.defaultView) {
            // Check different ways depending on which browser we're using
            if (is_nav) {
                value = document.defaultView.getComputedStyle(node, '').getPropertyValue("font-size");
                value = parseInt(value) - 2;  // Do rough compensation for NS/Mozilla's use of "px" in this function
            }
            else {
                value = document.defaultView.getComputedStyle(node,null).getPropertyValue("fontSize");
            }
        }
        else if (node.currentStyle) {
            value = node.currentStyle["fontSize"];
        }
    }
    
    return parseInt(value);
}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   changeFontSize: Set Element Text Size
  Dependency: none
  Notes:      This is essentially a helper method that abstracts the mechanics of changing the font 
              size of a node.
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function changeFontSize(node,size){
//sample:changeFontSize(someNode,12);

    // Set the new font size to the node
    eval("node.style.fontSize = '" + size + "pt'");

}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   getFontModifier: Returns an int for font size conversion functions
  Dependency: None
  Notes:      This value is abstracted so that it is always the same in all functions
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function getFontModifier(){
    return 1;
}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   setFontSizeCookie: Set Font Size incrememt level in Cookie
  Dependency: Cookie.js
  Notes:      Session Cookie
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function setFontSizeCookie(size){
    // Force size to be an integer
    setCookie("fontIncrement",parseInt(size),null,"/");
}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   getFontSizeCookie:  Returns font size incrememt level from Cookie
  Dependency: Cookie.js
  Notes:      
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function getFontSizeCookie(){

    var sizeString = getCookie("fontIncrement");
    
    if (sizeString != null && sizeString != "") {
        // The cookie exists.  Return the value.
        // Force the value to return as an integer
        return parseInt(sizeString);
    }
    else {
        // The cookie wasn't found.  Return null
        return false;
    }
}

/*
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
  Function:   deleteFontSizeCookie: Delete the Font Size incrememt level Cookie
  Dependency: Cookie.js
  Notes:      
---------------------------------------------------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function deleteFontSizeCookie(){
    deleteCookie("fontIncrement","/");
}

/*
----------------------------------------------------------------
----------------------------------------------------------------
  JAVASCRIPT
  Author:     Matthew L. Empringham
  Date:       July 3, 2002
  Version     1.0
  Function:   Show "Help Me Find"
  Dependency: browser_detection.js
  Notes:      Tested and works on Netscape 6.2 and IE 5.5
----------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function showHelpMeFind(){
    // setting layers
    var indexZa = 1;
    
    if (is_ie)
    {
        // IE
        HelpMeFind.style.visibility = "visible";
        HelpMeFind.style.zIndex = indexZa;
    }else if(is_nav)
    {
        if(is_nav4)
        {
            // NN4
            document.layers['HelpMeFind'].visibility = "show";
            document.layers['HelpMeFind'].zIndex = indexZa;
        }
        else
        {
            // NN6
            document.getElementById('HelpMeFind').style.visibility = "visible";
            document.getElementById('HelpMeFind').style.zIndex = indexZa;
        }
    }
}


/*
----------------------------------------------------------------
----------------------------------------------------------------
  JAVASCRIPT
  Author:     Matthew L. Empringham
  Date:       July 3, 2002
  Version     1.0
  Function:   Hide "Help Me Find"
  Dependency: browser_detection.js
  Notes:      Tested and works on Netscape 6.2 and IE 5.5
----------------------------------------------------------------
---------------------------- CODE ------------------------------
*/
function hideHelpMeFind(){
    // setting layers
    var indexZb = -1;
    
    if (is_ie)
    {
        // IE
        HelpMeFind.style.zIndex = indexZb;
        HelpMeFind.style.visibility = "hidden";
    }else if(is_nav)
    {
        if(is_nav4)
        {
            // NN4
            setTimeout("document.layers['HelpMeFind'].visibility = 'hide'",2500);
            //document.layers['HelpMeFind'].visibility = "hide";
            document.layers['HelpMeFind'].zIndex = indexZb;
        }
        else
        {
            // NN6
            document.getElementById('HelpMeFind').style.visibility = "hidden";
            document.getElementById('HelpMeFind').style.zIndex = indexZb;
        }
    }
}

/*
----------------------------------------------------------------
----------------------------------------------------------------
  JAVASCRIPT
  Author: Keith Sharward
  Date: December 4, 2002
  Version 1.0
  Function: Launches the Video Window for streaming media
  Details:
   Links that are formatted as
   <a href="javascript:video(file=filename.wmv&title=TitleGoesHere&Text=GextGoesHere);">Link to Video</a>
   will spawn a new window, perfectly centered on the screen, which will
   contain the index.cfm file within the /video/ directory. The index.cfm file
   reads the parameters in the URL, then displays the video using an embedded
   Windows Media Player component.
----------------------------------------------------------------
----------------------------------------------------------------
*/
var videoWindow = null; // confirms videoWindow is clean to start with

function video(parameters) {
    
    if (videoWindow && videoWindow.open && !videoWindow.closed) {  // if videoWindow is already open...
        videoWindow.focus(); // ...activate it.
    }
    else {
        if (videoWindow && videoWindow.closed) { 
            videoWindow = null;
        }
    }

    height = 600; // sets desired browser window height 
    width = 583; // sets desired browser window width 

    x = 20; // sets temporary x variable 
    y = 20; // sets temporary y variable 
    
    if (screen) { // resets temporary variables if screen resolution can be detected 
        y = (screen.availHeight - height)/2-20; // subtract spawned window height from available hight and divide by 2 
        x = (screen.availWidth - width)/2; // subtract spawned window width from available width and divide by 2 
    }
    
    attributes = 'width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x;
    attributes = attributes + ',resizable=1,menubar=no,status=no,scrollbars=yes,location=no,toolbar=no'

    videoWindow = window.open('/video?'+parameters,'video',attributes);

}

/* 
 * /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
 * /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
 * /////\\\\\ FROM THIS POINT FORWARD /////\\\\\/////\\\\\//////////\\\\\/////\\\\\
 * THIS JS CODE IS FROM THE OLD SUTTERHEALTH DESIGN PRIOR TO NOVEMBER of 2002 \\\\\
 * MAY NEED TO BE CLEANED OUT AT SOME TIME /////\\\\\/////\\\\\/////\\\\\/////\\\\\
 * /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
 * /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
 */
 

//Macromedia functions

function pop(theURL,winName,features) {
  window.open(theURL,winName,features);
}

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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenuGo(selName,targ,restore){
  var selObj = MM_findObj(selName);
  if (selObj && selObj.selectedIndex!=0) {
    MM_jumpMenu(targ,selObj,restore);
  }
}


//Sutter roll-overs for affiliates
function SH_swapImgRestore() {
  var i,x,a=document.SH_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function SH_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=SH_findObj(n,d.layers[i].document); return x;
}

function SH_swapImage() {
  var i,j=0,x,a=SH_swapImage.arguments; document.SH_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=SH_findObj(a[i]))!=null){document.SH_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//Launch InfoQuick
var InfoQuickWindow = null;
function go_infoquick() {
    if(document.all) {
        if (InfoQuickWindow && InfoQuickWindow.open && !InfoQuickWindow.closed) { InfoQuickWindow.focus(); }
        else {
            if (InfoQuickWindow && InfoQuickWindow.closed) { InfoQuickWindow = null; }
            InfoQuickWindow = window.open ('/infoquick/', 'InfoQuick', 'scrollbars=no,status=yes,width=150,height=150');
        }
    }
    else {
        if (InfoQuickWindow && InfoQuickWindow.open && !InfoQuickWindow.closed) { InfoQuickWindow.focus(); }
        else {
            if (InfoQuickWindow && InfoQuickWindow.closed) { InfoQuickWindow = null; }
            InfoQuickWindow = window.open ('/infoquick/', 'InfoQuick', 'scrollbars=no,status=yes');
            }
    }
}


//Launch Pop-up window based on percentage of client's screen resolution
function openWindow(width,height,xoffset,yoffset,html) {
    // pass in percentages of x and y screen position
    x = (640 - width)*(xoffset*0.01), y = (480 - height)*(yoffset*0.01);

    if (screen) {
        y = (screen.availHeight - height)*(yoffset*0.01);
        x = (screen.availWidth - width)*(xoffset*0.01);
    }
    if (screen.availWidth > 1800) {
        x = ((screen.availWidth/2) - width)/2;
    }
    window.open(''+html+'','newWin','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
}


//Launch Grid for Specialty/Services
function launchGrid(which){
    //call this in an <a href="javascript:launchGrid('mengrid');">
    var dim,winprops;
    switch(which) {
        //Behavioral Health
        case 'mengrid.html':
            dim='width=610,height=300';
            break;
        //Cancer
        case 'cangrid.html':
            dim='width=600,height=300';
            break;
        //Cardiac
        case 'crdgrid.html':
            dim='width=605,height=300';
            break;
        //homehealth
        case 'hhsgrid.html':
            dim='width=620,height=300';
            break;
        //ortho_neurosurgery
        case 'ortgrid.html':
            dim='width=655,height=300';
            break;
        //transplants
        case 'tragrid.html':
            dim='width=435,height=220';
            break;
        //women infant services
        case 'wmngrid.html':
            dim='width=655,height=300';
            break;
        default:
            return;
    }

    winprops = dim + ',resizable=yes,menubar=no,directories=no,status=yes';
    window.open(which,'Chart',winprops);
}


//Calendar forgot password function
function forgot(){
            var f_mail = (prompt("Enter your e-mail address, and your password will be sent."));
            if (f_mail)
            {
 window.open('http://www.sutterhealth.org/guestbook/forgot.cfm?email='+f_mail,'forgot','scrollbars=no, resizable=no, width=0, height=0');
            }
}


//-->

