function show_about () {
	$('win_about').style.display = 'block';
}
function hide_about () {
	$('win_about').style.display = 'none';
}

function hide_all () {
	$('left_1').style.display = 'none';
	$('left_2').style.display = 'none';
	$('left_3').style.display = 'none';
}

function show_txt (which) {
	hide_all();
	$('left_'+which).style.display = 'block';
}

function showTag ( which, srcRef ) {
	window.whichTag = $('tag_'+which);
	window.mouseFollow = function(e) {
		window.whichTag.style.top = (e.clientY+15)+'px';
		window.whichTag.style.left = (e.clientX+15)+'px';
	}
	$(srcRef).observe('mousemove', window.mouseFollow);
	$('tag_'+which).style.display = 'block';
}

function hideTag ( which, srcRef ) {
	$('tag_'+which).style.display = 'none';
	$(srcRef).stopObserving('mousemove', window.mouseFollow);
}

function flash_detection (required, max)	{
	var required_version = required;
	var max_version = max;
	var available_version = 0;

	if(typeof(navigator.plugins["Shockwave Flash"]) == "object") {
		var description = navigator.plugins["Shockwave Flash"].description;
		available_version = description.substr(16, (description.indexOf(".", 16) - 16));
	} else if(typeof(ActiveXObject) == "function") {
		for(var i = 2; i < (max_version + 1); i ++) {
			try {
                if(typeof(new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i)) == "object") {
                   available_version = i;
                }
           }
           catch(error)
           {
           }
        }
    }

    return [available_version, required_version];
}

function writeFlash ( swf, fallback, width, height, wmode) {
	var flashver = flash_detection(6, 8);

	if (flashver[0] >= 7) {	
		document.write(
				'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">' +
         			'<param name="movie" value="'+swf+'" />' +
         			'<param name="quality" value="high" />');
         			if (!wmode) {
                 	document.write('<param name="wmode" value="transparent" />');    
              }
   document.write('<embed id="flash" src="'+swf+'" quality="high" ');
            if (!wmode) {
              document.write('wmode="transparent"');
            } 
            document.write(' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>' +
  				'</object>'
			);
	} else {
		$(fallback).style.display = 'block';
	}
}

function openPopup() {
	window.open('popup.html', 'imprint', 'scrollbars=no,resizable=no,statusbar=no,width=599,height=500');
}
