// JavaScript Document

function populateSWF(NomeContenitore, NomeSwf, PathSwf, Larghezza, Altezza){
	var shtml = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"";
	shtml += " codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0\"";
	shtml += "  width=\"" + Larghezza + "\" height=\"" + Altezza + "\" id=\"" + NomeSwf + "\" align=\"\">";
	shtml += " <param name=movie value=\"" + PathSwf + "\">";
	shtml += " <param name=quality value=high>";
	shtml += " <param name=bgcolor value=#FFFFFF>";
	shtml += " <embed src=\"" + PathSwf + "\" quality=high bgcolor=#FFFFFF  width=\"" + Larghezza + "\" height=\"" + Altezza + "\" name=\"" + NomeSwf + "\" align=\"\"";
	shtml += "  type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>";
	shtml += "     </object>"

	var d = document.getElementById(NomeContenitore);
	d.innerHTML = shtml;
}

function SetSpaceHeight(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	}
	else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
	}
	var SpaceHeight = yWithScroll - 647;
	SpaceDiv = document.getElementById('div_spazio');
	SpaceDiv.style.height = SpaceHeight + "px";
} 