function getRefToDiv(divID,oDoc) 
{
    if( !oDoc ) 
	{ 
		oDoc = document; 
	}
    if( document.layers ) 
	{
        if( oDoc.layers[divID] ) 
		{ 
			return oDoc.layers[divID]; 
		} 
		else 
		{
            //repeatedly run through all child layers
            for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) 
			{
                //on success, return that layer, else return nothing
                y = getRefToDiv(divID,oDoc.layers[x].document); 
			}
            return y;
		} 
	}
    if( document.getElementById ) 
	{
        return document.getElementById(divID); 
	}
    if( document.all ) 
	{
        return document.all[divID]; 
	}
    return false;
}


function showDiv(divID_as_a_string) {
    //get a reference as above ...

	if (timeouts[divID_as_a_string] != null)
	{
		clearTimeout(timeouts[divID_as_a_string]);
	}


    myReference = getRefToDiv(divID_as_a_string);
    if( !myReference ) {
       // window.alert('Nothing works in this browser');
        return false; 
    }
    //now we have a reference to it
    if( myReference.style ) { //DOM & proprietary DOM
        myReference.style.visibility = 'visible';
    } else {
        if( myReference.visibility ) { //Netscape
            myReference.visibility = 'show';
        } else {
           // window.alert('Nothing works in this browser');
            return false; //don't go any further
        }
    }
    return true;
}

function hideDiv(divID_as_a_string) {
    //get a reference as above ...
    myReference = getRefToDiv(divID_as_a_string);
    if( !myReference ) {
        window.alert('Nothing works in this browser');
        return false; 
    }
    //now we have a reference to it
    if( myReference.style ) { //DOM & proprietary DOM
        myReference.style.visibility = 'hidden';
    } else {
        if( myReference.visibility ) { //Netscape
            myReference.visibility = 'hide';
        } else {
            window.alert('Nothing works in this browser');
            return false; //don't go any further
        }
    }
    return true;
}




var timetoshow = 1500;
var timeouts = new Array();

function showDivBriefly(divID)
{
	showDiv(divID, false);	
	timeouts[divID] = setTimeout("hideDiv('" + divID + "')", timetoshow);
	
	
}


function showDivAtPointer(divID_as_a_string, move) {


	hideDiv('europehover');	
	hideDiv('australasiahover');
	hideDiv('americashover');
	hideDiv('meahover');

    //get a reference as above ...
    myReference = getRefToDiv(divID_as_a_string);
    if( !myReference ) {
       // window.alert('Nothing works in this browser');
        return false; 
    }
    //now we have a reference to it
    if( myReference.style ) { //DOM & proprietary DOM
        myReference.style.visibility = 'visible';
		myReference.style.display = 'block';
		if (move){
//		myReference.style.left=event.x;
//		myReference.style.top=event.y + 8;
	}

    } else {
        if( myReference.visibility ) { //Netscape
            myReference.visibility = 'show';
			if (move){
			myReference.left=e.pageX;
			myReference.top=e.pageY + 8;}

        } else {
           // window.alert('Nothing works in this browser');
            return false; //don't go any further
        }
    }
    return true;
}




