
  function getHeight(){
    var d = document;
	
	switch (arguments[0])
	{
	   case "2":
	   var box= new Array(arguments[1], arguments[2]);
	   break;
	   case "3":
	   var box= new Array(arguments[1], arguments[2], arguments[3]);
	   break;
	 }
	   
    //var box = new Array("contleftupper","contcenter3","contright"); //list of DIV ids
    for(x=0;x<box.length;x++){ //determine the tallest div
      h = d.getElementById(box[x]).offsetHeight;
      for(y=0;y<box.length;y++){
        test_h = d.getElementById(box[y]).offsetHeight;
        if(h<test_h) h = test_h;
      }  
    }
    for(x=0;x<box.length;x++) d.getElementById(box[x]).style.height = h +"px"; //set the height of all divs to the tallest
  }
  
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=500,left = 312,top = 184');");
}

 function message() {
  /*The layout needs 520 pixels free for left and right column and margins. When the window decreases
  in size, the center column wraps when there is not enough room for the image and the layout*/
    var windowWidth = window.innerWidth;
	var imageSpace = windowWidth - 520;
 	for( i = 0; i < document.images.length; i++ ) {
	   if (document.images[i].name){					//If it is a named image, 
	   		if (document.images[i].name.substr(0,6) == 'Center'){  //and the name indicates that it is in the center column
				var iwidth = document.images[i].width;
				var iheight = document.images[i].height;
				if (iwidth > imageSpace){
					document.images[i].width = imageSpace;
					document.images[i].height = iheight * imageSpace / iwidth;
					}
	 		}
 	}
  }
}
function resizeImagesIfNeeded() {
  alert("The window has been resized!");
}
