function changeImage(objName1, objName2, picText, picFolder, picName)
{
  document.getElementById(objName1).src = 'images/pictures/' + picFolder + '/' + picName;
  document.getElementById(objName2).value = picText
}
function changeOpacityOn(objName)
{
  obj = findObj(objName);
  if (obj.style)
  {
    obj.style.filter = "alpha(Opacity=100)";
  }
}
function changeOpacityOff(objName)
{
  obj = findObj(objName);
  if (obj.style)
  {
    obj.style.filter = "alpha(Opacity=70)";
  }
}

function MenuOn(objName)
{
  obj = findObj(objName);
  if (obj.style)
  {
    obj.style.color = "#000000";
	obj.style.backgroundImage = "url(images/menu/button_white_over.gif)";
  }
}
function MenuOff(objName)
{
  obj = findObj(objName);
  if (obj.style)
  {
    obj.style.color = "#000000";
	obj.style.backgroundImage = "url(images/menu/button_white.gif)";
  }
}
function changeBgOn(objName)
{
  obj = findObj(objName);
  if (obj.style)
  {
    obj.style.color = "#ffffff";
	obj.style.backgroundColor = "#1c472f";
  }
}
function changeBgOff(objName)
{
  obj = findObj(objName);
  if (obj.style)
  {
    obj.style.color = "#ffffff";
	obj.style.backgroundColor = "";
  }
}
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}
function redirect(URLStr) { location = URLStr; }

function newWindow(URLStr, left, top, width, height) {
  var popUpWin=0;
  if(popUpWin) {
    if(!popUpWin.closed) popUpWin.close();
  }
  newWin = open(URLStr, 'newWin', 'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbar=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpWindow(url) {
	var popUpWin=0;
	if(popUpWin) {
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(url,'popUpWin','width=800,height=600,top=0,left=0,scrollbars=yes,resizable=yes')
}

function TRBG(a, changeTo) {
	a.style.backgroundColor = changeTo;
}
