var swfversion = deconcept.SWFObjectUtil.getPlayerVersion();
var noflash = deconcept.util.getRequestParameter("noflash");
var printerfriendly = deconcept.util.getRequestParameter("printerfriendly");
var flash = deconcept.util.getRequestParameter("flash");
if (flash=='yes') eraseCookie('flash');
if (flash=='no'||readCookie('flash')=='no') {createCookie('flash','no',1); noflash=1;}
if (document.getElementById && (swfversion['major'] >= 8) && noflash=='' && printerfriendly=='') {
	document.writeln("<STYLE>.divFlash{display:block;}.divHtml{display:none;}</"+"STYLE>");
}
/* ==================== */

var defaultWidth = 860;
var defaultHeight = 730;
var scale = 0.78;
var ratio = defaultHeight / defaultWidth;
var width =  defaultWidth;
var height = defaultHeight;

function init() {
	adjustDivSize();
}

function adjustDivSize() {
	var el = document.getElementById("container");
	
	if ( screen.height * scale < defaultHeight )
		height = screen.height * scale;
	width = height / ratio;
	el.style.width =  Math.ceil(width) + "px";
	el.style.display = "block";

}

/* ==================== */

function createCookie(name,value,days) {
	var expires="", date=new Date();
	if (days) {
		date.setTime(date.getTime()+(days*24*60*60*1000));
		expires="; expires="+date.toGMTString();
	}
	document.cookie=name+"="+value+expires+"; path=/";
}
function readCookie(name) {
	var nameEQ=name+"=", ca=document.cookie.split(';'), c="";
	for(var i=0;i < ca.length;i++) {
		c = ca[i];
		while (c.charAt(0)==' ') c=c.substring(1,c.length);
		if (c.indexOf(nameEQ)==0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
function eraseCookie(name) {createCookie(name,"",-1);}
