function Flipshow(name) {
	this.open = function open(file) {
		var container = document.getElementById(this.Name);

		if (window.getComputedStyle) {
			//var backgroundColor = window.getComputedStyle(container, "").backgroundColor;
			var height = window.getComputedStyle(container, "").getPropertyValue("height");
			var width = window.getComputedStyle(container, "").getPropertyValue("width");
			//alert("getComputedStyle: "+width+", "+height); // DEBUG
		}
		else if (container.offsetHeight) {
			//var backgroundColor = container.style.backgroundColor;
			var height = container.offsetHeight;
			var width = container.offsetWidth;
			//alert("offsetHeight/Width: "+width+", "+height); // DEBUG
		}
		else if (container.currentStyle) {
			//var backgroundColor = container.currentStyle.backgroundColor;
			var height = container.currentStyle.height;
			var width = container.currentStyle.width;
			//alert("currentStyle: "+width+", "+height); // DEBUG
		}
		else {
			//var backgroundColor = container.style.backgroundColor;
			var height = container.style.height;
			var width = container.style.width;
			//alert("style: "+width+", "+height); // DEBUG
		}
		height = parseInt(height);
		width = parseInt(width);
		//alert("final: "+width+", "+height); // DEBUG
		
		// TODO: Make it IE compatible.
		//backgroundColor = backgroundColor.split("(")[1].split(")")[0].split(",");
    		//for(i=0;i<3;i++)
       	//	backgroundColor[i]=(backgroundColor[i]*1).toString(16);
       	//backgroundColor = "#" + backgroundColor.join("");
		
		this.Flash = new SWFObject("./modules/flipshow/pageflip.swf", "book", width, height, "8", "#FFFFFF");
		this.Flash.addVariable("xmlFile", file);
		this.Flash.write(this.Name);
	}
	
	this.Flash = null
	this.Name = name;
}
