curDiv="";
curNav="";
theBookAnchor="";
theAnchorStyle="";
oTimer=null;
moux=0
mouy=0
popleft=0
opacity=0
oQuotes="";
currentQuote=1;



function bigart(lcURL)
{
 document.location=lcArtServer+lcURL;
}

function popover()
{
	theBookAnchor.style.color="yellow";
	clearTimeout(oTimer)
}

function popout()
{
	theBookAnchor.style.color="white";
    oTimer=setTimeout("hide(curDiv)",400);
}


function out(pJob)
{
 oTimer=setTimeout("hide(curDiv)",3000);
}

function over(pJob,lcCover,oAnchor)
{
	lcDiv="B"+pJob;
	newDiv=getDiv(lcDiv);
	

	if (newDiv!=curDiv && curDiv+"|"!="|")
	 {hide(curDiv);}
	 
	clearTimeout(oTimer)
		newTop=(mouy-22)+"px";
		newLeft=popleft+"px";
		newDiv.style.top=newTop;
		newDiv.style.left=newLeft;

	show(newDiv)
	curDiv=newDiv;
	theBookAnchor=oAnchor;
	if (lcCover+"|"!="|"){
		document.getElementById("dispcover").src=lcCover
	}
}

function getDiv(theDiv)
{
	if (document.layers)
	{
		odiv=document.layers[theDiv];
	}
	else if (document.all)
	{
		odiv=document.all[theDiv];
	}
	else if (document.getElementById)
	{
		odiv=document.getElementById(theDiv);
	}
    return odiv
}


function show(odiv)
{
	if (document.layers)
	{
        odiv.visibility = "show";
	}
	else if (document.all)
	{
		odiv.style.visibility = "visible";
	}
	else if (document.getElementById)
	{
		odiv.style.visibility = "visible";
	}
}

function hide(oDiv)
{
	if (document.layers)
	{
		oDiv.visibility = "hide";
	}
	else if (document.all)
	{
		oDiv.style.visibility = "hidden";
	}
	else if (document.getElementById)
	{
		oDiv.style.visibility = "hidden";
	}
}

function getwindow() {
 var d = document, v = window, w, h, l, t;
 if( typeof v.innerWidth==='number' ) {
  w = v.innerWidth;
  h = v.innerHeight;
  l = v.pageXOffset;
  t = v.pageYOffset;
 } else if( ( v = d.documentElement ) &&
   typeof v.clientWidth==='number' &&
   v.clientWidth !== 0 || ( v = d.body ) ) {
  w = v.clientWidth;
  h = v.clientHeight;
  l = v.scrollLeft;
  t = v.scrollTop;
 }
 return {w: w, h: h, l: l, t: t};
}

function getmouse(e) {
  e = e || window.event || {};
  w = getwindow(),
   minx = w.l,
   miny = w.t,
   maxx = w.w + w.l,
   maxy = w.h + w.t;
   popleft = w.w/3.8;
  if( typeof e.pageX==='number' ) {
    moux = e.pageX;
    mouy = e.pageY-20;
  } else {
    moux = e.x + w.l;
    mouy = e.y //+ w.t;
  }
}


function bannerover()
{
 mailDiv=getDiv("maillink")
 if (typeof mailDiv=="object")
 	{mailDiv.style.color="#aaccff"}
}

function bannerout()
{
 mailDiv=getDiv("maillink")
 if (typeof mailDiv=="object")
 	{mailDiv.style.color="white"}
}

function bannerclick()
{
 mailDiv=getDiv("maillink")
 if (typeof mailDiv=="object")
	{mailDiv.click()}
}

function setup()
{
if( window.captureEvents ) { window.captureEvents(Event.MOUSEMOVE); }
document.onmousemove = getmouse;
window.onscroll = getmouse;
window.onresize = getmouse;
oQuotes=document.getElementById("quotes")
setTimeout("fadin()",1250);
}

function fadin()
{
if (opacity<.95)
 {
 opacity=opacity+.05;
 oQuotes.style.opacity=opacity;
 if (typeof oQuotes.filters=="object")
  {oQuotes.filters["alpha"].opacity=opacity*100;}
 setTimeout("fadin()",120);
 }
 else
 {
 if (currentQuote==1){lnDuration=duration1}
 if (currentQuote==2){lnDuration=duration2}
 if (currentQuote==3){lnDuration=duration3}
 if (currentQuote==4){lnDuration=duration4}
 setTimeout("fadout()",lnDuration);
 }
}

function fadout()
{
if (opacity>.1)
 {
 opacity=opacity-.05;
 oQuotes.style.opacity=opacity;
 if (typeof oQuotes.filters=="object")
  {oQuotes.filters["alpha"].opacity=opacity*100;}
 setTimeout("fadout()",120);
 }else{
  if (currentQuote==1){oQuotes.innerHTML=lcQuote2; currentQuote=2; setTimeout("fadin()",120);}else{
  if (currentQuote==2){oQuotes.innerHTML=lcQuote3; currentQuote=3; setTimeout("fadin()",120);}else{
  if (currentQuote==3){oQuotes.innerHTML=lcQuote4; currentQuote=4; setTimeout("fadin()",120);}else{
  if (currentQuote==4){oQuotes.innerHTML=lcQuote1; currentQuote=1; setTimeout("fadin()",120);}}}}
 }
}
