var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;

/* IE update fix */
function showMovie(name, src, vars, width, height, color, secure) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="');
	if (secure) {
		document.write('https');
	} else {
		document.write('http');
	}
	document.writeln('://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0" width="' + width + '" height="' + height + '" id="' + name + '" align="top">');
	document.writeln('<param name="FlashVars" value="' + vars + '" />');
	document.writeln('<param name="allowScriptAccess" value="sameDomain" />');
	document.writeln('<param name="movie" value="' + src + '" />');
	document.writeln('<param name="quality" value="high" />');
	if (color == 'null') {
		document.writeln('<param name="wmode" value="transparent" />');
	} else {
		document.writeln('<param name="bgcolor" value="' + color + '" />');
	}
	if (!isIE) {
		document.write('<embed src="' + src + '" FlashVars="' + vars + '" quality="high" ');
		if (color == 'null') {
			document.write('wmode="transparent" ');
		} else {
			document.write('bgcolor="' + color + '" ');
		}
		document.write('width="' + width + '" height="' + height + '" name="' + name + '" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="');
		if (secure) {
			document.write('https');
		} else {
			document.write('http');
		}
		document.writeln('://www.macromedia.com/go/getflashplayer" />');
	}
	document.writeln('</object>');
}

function getWindowHeight() {
	var h = 0;
	if( typeof( window.innerHeight ) == 'number' ) {
		//Non-IE
		h = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		h = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		h = document.body.clientHeight;
	}
	return h;
}

function centerContent(base) {
	var height = getWindowHeight();
	var margin = (height - base - 30) / 2;
	if (margin > 0) {
		document.getElementById("content").style.paddingTop = margin + "px";
	}
   document.getElementById("content").style.visibility = "visible";
}

function changeBGcolor(c) {
	document.getElementById("content").style.backgroundColor = c;
}

