ns = (document.layers) ? 1:0
ie = (document.all) ? 1:0
goodbrowser = ((!ns)&&(document.getElementById)) ? 1:0

function set_background(image) {
	embryo = document.createElement('iframe');
	embryo.className = 'bg-stretch-loader';
	embryo.style.visibility = 'hidden';
	embryo.style.height = '1px';
	iframe = document.body.appendChild(embryo);
	iframe.setAttribute("src","/typo3conf/ext/bg-stretch/stretch.php?w="+get_width()+"&h="+get_height()+"&s="+image);
}

function get_width() {
	return screen.width
	/* if (ns||goodbrowser && !ie) { return window.innerWidth }
	else if (ie) {return document.body.offsetWidth } */
}

function get_height() {
	return screen.height
	/* if (ns||goodbrowser && !ie) { return window.innerHeight }
	else if (ie) {return document.body.offsetHeight } */
}


