
function trim(str) {
	if (str == null) return null;
	return str.replace(/^\s*|\s*$/g,"");
}


function put_ok(photo_select,nphoto)
{
var par = window.parent.document;

par.getElementById("selection").innerHTML = "<img src='"+photo_select+"' id='img_selection' class='photo' >";
par.getElementById("valphoto").value = nphoto;
par.getElementById('bsave2').removeAttribute("disabled");

}

function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					
					var contentHeight = document.getElementById('container').offsetHeight;
					var footerElement = document.getElementById('fond_bas');
					var footerHeight  = footerElement.offsetHeight;
					
					/*footerElement.style.top = (windowHeight )+ 'px';*/
				}
			}
		}