<!--

/**************************************************************

	Set a div to a height if smaller...
	Author : Tom van Gemert
	For: Trimedia Interactive Projects
	http://www.trimedia.nl

	Script based on: http://www.saila.com/attic/sandbox/set-height.html

**************************************************************/

function pageHeight() {

  var myWidth = 0, myHeight = 0;

  if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
	myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	//IE 6+ in 'standards compliant mode'
	myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	//IE 4 compatible
	myHeight = document.body.clientHeight;
  }
 // window.alert( 'Height = ' + myHeight );
  return myHeight;

}

function compareNum(a,b) {


	return a-b

}

function set_div_height() {

	d = document;
	min_height = 610;
	page_height = pageHeight();

	box = new Array("container","content","menu","sidebar"); 	//list of DIV ids
	box_top_space = new Array(0,0,0,0); 						//list of DIV's position from top.
	box_length = box.length;
	box_heights = new Array(box_length);

	for(x = 0; x < box_length; x++) {

		boxname = box[x];
		//alert(boxname);
	  	h = d.getElementById(box[x]).offsetHeight;
	  	//alert("Box: " + boxname + " height: " + h);
	  	box_heights[x] = h + 900; //to adjust the hight of the page

	 }

	box_heights.sort(compareNum);
	tallest_h = box_heights[(box_length-1)];
	//alert(box_heights.toString());
	//alert("Tallest_h: " + tallest_h);

	//Set all boxes to the tallest height
	for(x = 0; x < box_length; x++) {
	  d.getElementById(box[x]).style.height = tallest_h - box_top_space[x] + "px";
	}
	if (tallest_h > page_height) {

		d.getElementById("container").style.height = tallest_h + 40 + "px";

	} else {

		if (tallest_h < min_height) {
			d.getElementById("container").style.height = page_height + 40 + "px";
		} else {
			d.getElementById("container").style.height = page_height + "px";
		}

	}
	if(document.getElementById("aexis_kader")){
		var aex = "<p><a href='http://www.aexisgroup.com/' target='_blank' title='Aexis Group'>"
		aex += "<img src='http://www.mexontechnology.com/images/aexis_klein.gif' width='93' height='65' alt='Aexis Group' border='0' />"
		aex += "</a>"
		document.getElementById("aexis_kader").innerHTML = aex
	}
}


/**************************************************************
Standards Compliant Rollover Script
Author : Daniel Nolan
http://www.bleedingego.co.uk/webdev.php
**************************************************************/

function initRollovers() {
	if (!document.getElementById) return

	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {

		if (aImages[i].className == 'imgover') {

			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_on'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);

			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;

			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}

			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_on'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}

		}

	}
}

//-->