// resize

function doResize() {

  location.reload()

  setTimeout('window.onresize=doResize',500)

}


// popup window function
function popWin(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


// resize text

function changeElementsStyle(el,fw,fs,clr){

if(document.getElementsByTagName)//check for obj

   {

   var nodes = document.getElementsByTagName(el)

   var max = nodes.length

   for(var i = 0;i < max;i++)

      {

      var nodeObj = nodes.item(i);

      nodeObj.style.fontWeight = fw;

      nodeObj.style.fontStyle = fs;

      nodeObj.style.color = clr;

      }

   }

}



function changeStyleById(el,fw,fs,clr){

if (document.getElementById)

   {

   var nodeObj = document.getElementById(el)

   nodeObj.style.fontWeight = fw;

   nodeObj.style.fontStyle = fs;

   nodeObj.style.color = clr;

   }

}









// full screen popup script

var str = "left=0,screenX=0,top=0,screenY=0,fullscreen";

if (window.screen) {

  var ah = screen.availHeight - 30;

  var aw = screen.availWidth - 10;

  str += ",height=" + ah;

  str += ",innerHeight=" + ah;

  str += ",width=" + aw;

  str += ",innerWidth=" + aw;

} else {

  str += ",resizable"; // so the user can resize the window manually

}



function launchFull(url, name) {

  window.open(url, name, str);

}









// ************************

// layer utility routines *

// ************************



function getStyleObject(objectId) {

    // cross-browser function to get an object's style object given its id

    if(document.getElementById && document.getElementById(objectId)) {

	// W3C DOM

	return document.getElementById(objectId).style;

    } else if (document.all && document.all(objectId)) {

	// MSIE 4 DOM

	return document.all(objectId).style;

    } else if (document.layers && document.layers[objectId]) {

	// NN 4 DOM.. note: this won't find nested layers

	return document.layers[objectId];

    } else {

	return false;

    }

} // getStyleObject





// changeObjectVisibility

function changeObjectVisibility(objectId, newVisibility) {

    // get a reference to the cross-browser style object and make sure the object exists

    var styleObject = getStyleObject(objectId);

    if(styleObject) {

	styleObject.visibility = newVisibility;

	return true;

    } else {

	// we couldn't find the object, so we can't change its visibility

	return false;

    }

} // changeObjectVisibility







// popCrumb function used to activate a menu and keep it's target open

var closeflag = true;

var menuOn = null



function setClose(){

	closeflag = true;

	setTimeout('closeMenu()', 900)

}

function closeMenu(){

	if(closeflag)changeObjectVisibility(menuOn, 'hidden')

}



function popCrumb(objectId, newVisibility) {

    var styleObject = getStyleObject(objectId);

    if(newVisibility == 'visible'){

		if(menuOn != objectId){changeObjectVisibility(menuOn, 'hidden')}

		menuOn = objectId

	}else{

		menuOn = null

	}

	if(styleObject) {

	styleObject.visibility = newVisibility;

	return true;

    } else {

	return false;

    }

} 





// changeObjectFontSize

function changeObjectFontSize(objectId, newFontSize) {

    var styleObject = getStyleObject(objectId);

    if(styleObject) {

	styleObject.fontSize = newFontSize;

	return true;

    } else {

	return false;

    }

} 





// moveObject

function moveObject(objectId, newXCoordinate, newYCoordinate) {

    var styleObject = getStyleObject(objectId);

    if(styleObject) {

	styleObject.left = newXCoordinate;

	styleObject.top = newYCoordinate;

	return true;

    } else {

	return false;

    }

} 













