var qt=new Array();
qt[0]="<i>Imagination is more important than knowledge.</i><br><br><b>-Albert Einstein</b>";
qt[1]="<i>The job of the artist is always to deepen the mystery.</i><br><br><b>-Francis Bacon</b>";
qt[2]="<i>Artists take enormous personal risks to bring their work to the public. Bearing the responsiblility to produce bodies of work that mirror our society, artists offer personal insight and critique, revealing intimate pictures of deepest desire and intellect. This is a route to the heart of ourselves, which when travelled, exposes the hidden truths of our times. Art travels this path. It is important, life-affirming, to be able to see, hear, and touch the artist's creation.</i><br><br><b>-Botticelli</b>";
qt[3]="<i>We look to the dance to impact the sensation of living in affirmation of life, to energize...the mystery, the humour, the variety and the wonder of life.  This is the function of dance.</i><br><br><b>-Martha Graham</b>";

var randy=Math.floor(Math.random()*4);
var qtnum=randy;

function Quote(direction) {
   obj=document.getElementById("quote");
   obj.innerHTML=qt[qtnum];
}


var linktext=new Array();

var ns6=document.getElementById&&!document.all;
var ie=document.all;

function sh(thetext, whichdiv, pos){
if (ie) {
		eval("document.all."+whichdiv).innerHTML=linktext[thetext];
		eval("document.all."+whichdiv).style.left = pos;
	}
else if(ns6) {
		document.getElementById(whichdiv).innerHTML=linktext[thetext];
		document.getElementById(whichdiv).style.left = pos;
	}
}

function menu(thetext, whichdiv, pos){
if (ie) {
		eval("document.all."+whichdiv).innerHTML=linktext[thetext];
		eval("document.all."+whichdiv).style.left = pos;
		eval("document.all."+whichdiv).style.top = -25;
	}
else if(ns6) {
		document.getElementById(whichdiv).innerHTML=linktext[thetext];
		document.getElementById(whichdiv).style.left = pos;
		document.getElementById(whichdiv).style.top = -25;
	}
}

function cl(whichdiv){
	if (ie) eval("document.all."+whichdiv).innerHTML=' ';
	else if (ns6) document.getElementById(whichdiv).innerHTML=' ';
}

var hc=50;
function fin(thing) {

	if(thing){hc=50;}

   obj=document.getElementById("div1");
   hc += 3;
   if (hc >= 0 && hc < 256) {
      hex=hc.toString(16);
      if (hex.length==1) hex="0" + hex;
      obj.style.color="#" + hex + hex + hex;
      window.setTimeout("fin(0);",1);
   }

}



///////////////////////FADE IMAGE CODE
var ff=1;
var fft=1;

function initImage() {
  imageId = 'thephoto';
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeIn(imageId,0);

  imageId = 'thebutton';
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  fadeButton(imageId,0);
}

function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;

  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";

  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;

  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;

  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 50) {
      setOpacity(obj, opacity);
      opacity += 2*fft;
      if(opacity >50) {opacity=50; fft=fft*(-1);}
      if(opacity <0){opacity=0; fft=fft*(-1);}
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 200);
    }
  }
}

function fadeButton(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    setOpacity(obj, opacity);
    opacity += 20*ff;

    if(opacity >100) {opacity=100; ff=ff*(-1);}
    if(opacity <0){opacity=0; ff=ff*(-1);}
    window.setTimeout("fadeButton('"+objId+"',"+opacity+")", 100);

  }
}

function myShowHide(whatDiv) {
    
    var myObj = document.getElementById(whatDiv);
    
    if(myObj.style.display!="block"){
      myObj.style.display="block";            
    }
    else if(myObj.style.display=="block"){
      myObj.style.display="none";            
    }
}

var myOriginalScrollPosition;
var myWindowHeight;

function showVideo(which) {
    
    setTimeout("test()",0);  //jump the scroll bar back.  it's annoying
     
    if(which==2){myFile="video/carmina.mov";myTitle="Carmina Burana";}
    if(which==3){myFile="video/lifelines.mov";myTitle="Lifelines";}
    if(which==4){myFile="video/4flightsdown.mov";myTitle="4 Flights Down";}
    if(which==5){myFile="video/swivel.mov";myTitle="Swivel Fields";}
    
    myOriginalScrollPosition = f_scrollTop();
    myWindowHeight = f_clientHeight();
    
    
    document.getElementById("videoBG").style.height=document.body.scrollHeight;
//    document.getElementById("videoBG").style.display="block";
    
    document.getElementById("video").style.top = myOriginalScrollPosition + (myWindowHeight/2);
//    document.getElementById("video").style.display="block";
    document.getElementById("video").innerHTML='<table width="100%" cellspacing="0" cellpadding="0" class="worksBlockHeavy" style="background-color:white;"><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;'+myTitle+'</td><td align="right"><a href="#" onclick="hideVideo(\'video\');return false;">Close X</a></td></tr></table><object id="videoId" CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="240" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="'+myFile+'"><param name="autoplay" value="true"><param name="loop" value="false"><param name="controller" value="false"><embed name="videoName" src="'+myFile+'"  width="320" height="256" autoplay="true" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed></object>';



   document.getElementById("videoBG").style.display="block";
   document.getElementById("video").style.display="block";

}

function test() {window.scrollTo(0,myOriginalScrollPosition);}

function hideVideo(which) {
   
    document.getElementById("videoBG").style.display="none";
    document.getElementById("video").style.display="none";
    document.getElementById("video").innerHTML="";
    
    setTimeout("test()",50);
}


////////////////////////////////////////////// FUNCTIONS TO BRING BACK VARIOUS WINDOW AND SCROLLBAR VALUES
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}




















