// JavaScript Document
function redirect(URLStr) { location = URLStr; }

function Resize()
{
	var theWidth = 0, theHeight = 0;
	var div1 = document.getElementById('right-col');
	var div2 = document.getElementById('main_menu');
	div1.style.height = '500px'; 
	div2.style.height = '500px';
	
}

function xResize()  
{	
	var theWidth = 0, theHeight = 0;
	var div0 = document.getElementById('content');	
	var div1 = document.getElementById('scroll_box');
	var div2 = document.getElementById('right-col');
	var div3 = document.getElementById('main_menu');
	
  if( typeof( window.innerWidth ) == 'number' ) 
	{
    //Non-IE
    theWidth = window.innerWidth;
    theHeight = window.innerHeight;
  } 
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	{
    //IE 6+ in 'standards compliant mode'
    theWidth = document.documentElement.clientWidth;
    theHeight = document.documentElement.clientHeight;
  } 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	{
    //IE 4 compatible
    theWidth = document.body.clientWidth;
    theHeight = document.body.clientHeight;
  }
	div0.style.height = (theHeight-192) + 'px'; 
	div2.style.height = (theHeight-192) + 'px'; 
	div3.style.height = (theHeight-192) + 'px';
	if(div1 != null) {div1.style.height = (theHeight-212) + 'px'}; 

}

function JumpToMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function SwapMenu() {
	ToggleLayer("main_menu");
  ToggleLayer("language");
}

function ShowHideMenu(x){
	x.className = (x.className == 'menu-show') ? 'menu-hide' : 'menu-show';
}




// Example: obj = findObj("image1");
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;
}

// Example: showHideLayers(Layer1,'','show',Layer2,'','hide');
function showHideLayers()
{ 
  var i, visStr, obj, args = showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3)
  {
    if ((obj = findObj(args[i])) != null)
    {
      visStr = args[i+2];
      if (obj.style)
      {
        obj = obj.style;
        if(visStr == 'show') visStr = 'visible';
        else if(visStr == 'hide') visStr = 'hidden';
      }
      obj.visibility = visStr;
    }
  }
}

