
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 preload() {
    var imageStack = new Array('images/home/6-syllables_2007.jpg',
                               'images/home/Fortunate-View_08.jpg',
                               'images/home/Kuli_ou_ou_08.jpg',
                               'images/home/Lakeside_08.jpg',
                               'images/home/Old-Pond_06.jpg',
                               'images/home/Wild-Horse-Lake.jpg');
                               
    for(i=0; i<imageStack.length; i++){
        MM_preloadImages(imageStack[i]);
    }
}

function swapOn(imgName) {
  if (document.images) {
    var im = document.getElementById(imgName);
    var path = "images/nav/" + imgName + "_hover.gif";
    im.setAttribute("src",path);    
  }
}



function swapOff(imgName) {
  if (document.images) {
    var im = document.getElementById(imgName);
    var path = "images/nav/" + imgName + ".gif";
    im.setAttribute("src",path);    
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Lvl_openWin(u,n,w,h,l,t,c,f,x) { //v2.0 4LevelWebs
  var ww=((screen.width-w)/2);if(c==1){l=ww;t=(screen.height-h)/2;}if(c==2){l=ww}
	f+=',top='+t+',left='+l;LvlWin = window.open(u,n,f);LvlWin.focus();
}

function openViewer(vid) {
    viewer = window.open('galleries/movie.html','Movie','resizable=yes,width=680,height=520');
    video = "../video/" + vid;
    setTimeout('loadVideo()',300);
}

function loadVideo() {
    var qt = '<object width="320" height="240" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">'
           + '<param name="src" value="' + video + '" />'
           + '<param name="controller" value="true" />'
           + '<param name="autoplay" value="true" />'
           + '<embed src="' + video + '" width="640" height="480" controller="true" autoplay="true" scale="tofit" cache="true" pluginspage="http://www.apple.com/quicktime/download/" />'
           + '</object>';
    viewer.document.getElementById('movie').innerHTML = qt;
    
}




