var open = 1;
var slideDelay = 0;
var domStyle = null;
// divHT - div height
function ToggleImage(objectID, divHT)
{
    if (isDHTML)
    {
        domStyle = findDOM(objectID, 1);
        if (open)
        {
            fX = -divHT; 
            cX = 0; 
            open = 0;
        }
     }
     else
     {
        fX = 0; 
        cX = -divHT; 
        open = 1;
     }
     SlideArea(cX,fX);
}

function SlideArea(cX, fX)
{
    if( cX != fX)
    {
        if (cX > fX)
        {cX -= 2;}
        else
        {cX += 2;}
        domStyle.left = cX;
        setTimeout('SlideArea(' + cX + ',' + fX + ')', slideDelay);
    }
    return;
}    
    


function ExpandImage(picID)
{
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(picID).style.display = 'inline';

        //sniff for IE6		
		var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;

        //This is ony for the whiteout background, so detect that too.
        if(IE6 == true && picID.search('WhiteOUT') != -1)
        {
		    var hgt = document.documentElement.clientWidth;
		    document.getElementById(picID).style.height = hgt;
		}
	}
	else {
		if (document.layers) { // Netscape 4
			document.picID.display = 'inline';
		}
		else { // IE 4
			document.all.picID.style.display = 'inline';
		}
	}  
}

function CollapseImage(picID)
{
	//safe function to show an element with a specified id
		  
	if (document.getElementById) 
	{ // DOM3 = IE5, NS6
		document.getElementById(picID).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.picID.display = 'none';
		}
		else { // IE 4
			document.all.picID.style.display = 'none';
		}
	}
}
               
function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;

//to show writeup on art pages
//whiteboxID - is the id of the whiteouot box background
//descboxID - is the id of the description box
function ShowWriteUp(whiteboxID,descboxID)
{
	//safe function to show an element with a specified id		  
	if (document.getElementById) 
	{ // DOM3 = IE5, NS6
		document.getElementById(whiteboxID).style.display = 'block';
		document.getElementById(descboxID).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.whiteboxID.display = 'block';
			document.descboxID.display = 'block';
		}
		else { // IE 4
			document.all.whiteboxID.style.display = 'block';
			document.all.descboxID.style.display = 'block';
		}
	}    
}

function BackToTop()
{
    var obj = document.getElementById("toTop");
   // obj.click();
   window.location.href = "#top";
}