/**
 * set the height of the main content, and the blue bar on the right
 */

function resizeMainContainer(el,addressEl) {
	var romboc = document.getElementById(el);
	var addressEldiv =  document.getElementById(addressEl);
	if (!romboc)	
		return;
	
	var size = dom.getBrowserSize();	
	
	window.onresize = function () {
		resizeMainContainer(el, addressEl);
	}
	var divsize = size[1] - 260;
	romboc.style.height = divsize > 20? divsize: 20;
	if (addressEldiv) {
		addressEldiv.style.display = 'block';
		var nav = document.getElementById('mainnav');
		if (nav) {
			var addresstop = romboc.offsetTop + nav.offsetHeight + 40;
			addressEldiv.style.top = addresstop>0?addresstop+'px':'0px';
		}
	}
}

dom.getBrowserSize = function ()  {
	var frameWidth, frameHeight;
	if (self.innerWidth) {
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	} else if (document.documentElement &&	document.documentElement.clientWidth) {
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	} else if (document.body) {
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}
	return [frameWidth, frameHeight];
}

/**rotating images on front page **/
function showVPImageRombomatic () {
	var header  =  document.getElementById('rombomatichheaderimage');

	if (!header)
		return false;

	header.src = imgArr[showVPImageRombomatic.nr];
	showVPImageRombomatic.nr++;

	if (showVPImageRombomatic.nr>=imgArr.length)
		showVPImageRombomatic.nr = 0;

	window.setTimeout(showVPImageRombomatic,3500)
}
/**rotating images on next pages **/
function showImageRombomatic () {
	var header  =  document.getElementById('rombomatichheaderimage');

	if (!header)
		return false;

	header.src = imgArr[showImageRombomatic.nr];
	showImageRombomatic.nr++;

	if (showImageRombomatic.nr>=imgArr.length)
		showImageRombomatic.nr = 0;

	window.setTimeout(showImageRombomatic,8000)
}

//dom.onload(resizeMainContainer,'rombomaticmaincontainer','leftunder');
