<script language="JavaScript">
<!--

function WM_imageSwap(daImage, daSrc){
  var objStr,obj;
  /*
    WM_imageSwap()
    Changes the source of an image.

    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Shvatz
    Author Email: shvatz@wired.com

    Usage: WM_imageSwap(originalImage, 'newSourceUrl');

    Requires: WM_preloadImages() (optional, but recommended)
    Thanks to Ken Sundermeyer (ksundermeyer@macromedia.com) for his help
    with variables in ie3 for the mac.
    */

  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}


function WM_preloadImages() {

/*
WM_preloadImages()
Loads images into the browser's cache for later use.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Nadav Savio
Author Email: nadav@wired.com

Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);
*/

  // Don't bother if there's no document.images
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    // Loop through all the arguments.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.WM.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
  }
}


function popWindow(url, name, intWidth, intHeight, intWidthie3, intHeightie3) {

if      ((navigator.appName.indexOf("Microsoft") != -1)&&(navigator.appVersion.indexOf("Mac") != -1) &&
                                (parseInt(navigator.appVersion.charAt(0)) < 4))
                                {
                    //All Internet Exploder 3 for Mac go here:
                    //document.write("You have a Mac running IE3");
                winParameters = "width=" + intWidthie3 + ",height=" + intHeightie3 + ",scrollbars=yes";

                popupWin = window.open(url, name, winParameters);
        }

else {
        winParameters = "width=" + intWidth + ",height=" + intHeight + ",scrollbars=no";

        popupWin = window.open(url, name, winParameters);
        }
}


function popWindow(url, name, intWidth, intHeight, intWidthie3, intHeightie3) {

if      ((navigator.appName.indexOf("Microsoft") != -1)&&(navigator.appVersion.indexOf("Mac") != -1) &&
                                (parseInt(navigator.appVersion.charAt(0)) < 4))
                                {
                    //All Internet Exploder 3 for Mac go here:
                    //document.write("You have a Mac running IE3");
                winParameters = "width=" + intWidthie3 + ",height=" + intHeightie3 + ",scrollbars=yes";

                popupWin = window.open(url, name, winParameters);
        }

else {
        winParameters = "width=" + intWidth + ",height=" + intHeight + ",scrollbars=no";

        popupWin = window.open(url, name, winParameters);
        }
}


function popInnie(url)                                                         
{                                                                               
 var win = window.open(url,"Pop","resizable,scrollbars,height=460,width=400");
}                                                                               

function popOut(url)                                                         
{                                                                               
 var win = window.open(url,"Pop","resizable,scrollbars,height=400,width=650");
}                                                                               
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600');");
}

function WM_netscapeCssFix() {
  /*
    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Taylor
    Author Email: taylor@wired.com
    Author URL: http://www.taylor.org/
    */

  // This part was inspired by Matthew_Baird@wayfarer.com
  // It gets around another unfortunate bug whereby Netscape 
  // fires a resize event when the scrollbars pop up. This 
  // checks to make sure that the window's available size 
  // has actually changed.
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  // This function checks to make sure the version of Netscape 
  // in use contains the bug; if so, it records the window's 
  // width and height and sets all resize events to be handled 
  // by the WM_netscapeCssFix() function.
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn()


// -->
</script>
<script language="JavaScript">
<!-- // Begin hiding from old browsers
// (Rightclick:) This section disables right click in MSIE and Netscape
function right(evnt) {
if (navigator.appName.toUpperCase().match(/NETSCAPE/) != null) {
if (evnt.which >= 2){
alert("Please - no unauthorized image duplication");
return false;
}
}
else
if (event.button>=2)
alert("Site contents are property of CaliforniaStay.com.");
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// (Resize:) End rightclick disable section
// End hiding -->
</script>
