/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 * General ILIAS Solutions website functions
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


// not used
// switches an image imgName with another imgSrc
/*function switchImage(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
    }
  }
}*/

// creates a blend transformation between 2 images
function blendCham(which) { 
	imCham.filters.blendTrans.Apply(); 
	imCham.src = which; imCham.filters.blendTrans.Play(); 
}
	
// opens a popup
// URLStr: the page that opens within the popup
// left: position from the left of the screen (where the popup window will be placed)
// top: position from the top of the screen (where the popup window will be placed)
// width: the width of the popup window
// height: the height of the popup window
function popUpWindow(URLStr, left, top, width, height)
{
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// this function is called when a page is loaded (startet by the body onLoad event)
// and calls the functions that will draw the ILIAS Solutions website menu and create the image transformation based on the given file (the ending image)
function start(file) {
	writeMenus();
	blendCham(file);
}

// function for the menu (if the page is resized in NAV4)
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);