function print_flash_tag (source_name, movie_name, movie_height, movie_width, flash_vars) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + movie_width + '" height="' + movie_height + '" id="' + movie_name + '" align="middle"');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="' + source_name + '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#FFFFFF" />');
	document.write('<param name="bgcolor" value="#FFFFFF" />');
	document.write('<param name="FlashVars" value="' + flash_vars + '" />');
	document.write('<embed src="' + source_name + '" quality="high" FlashVars="' + flash_vars + '" bgcolor="#FFFFFF" width="' + movie_width + '" height="' + movie_height + '" name="' + movie_name +  '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function showObject (name, is_visible) {
	var obj = document.getElementById(name);
	if (obj != undefined) {
		if (is_visible) { 
			obj.style.visibility = "visible";
		} else obj.style.visibility = "hidden";
	}
}

function getContent(text_url, text_request, text_target, nav_request, nav_target) {
	getText(text_url, text_request, text_target);
	getText(text_url, nav_request, nav_target);
}

function getText(text_url, text_request, text_target) {
	
	var txt = document.getElementById(text_target);
	var node = txt.firstChild;
	while (node) {
		var next_node = node.nextSibling;
		txt.removeChild(node);
		node = next_node;
	}
	var xmlHttp = false;
	// Mozilla, Opera, Safari + Internet Explorer 7
	if (typeof XMLHttpRequest != 'undefined') {
	    xmlHttp = new XMLHttpRequest();
	}
	if (!xmlHttp) {
	    // Internet Explorer 6 and older
	    try {
	        xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch(e) {
	        try {
	            xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
	        } catch(e) {
	            xmlHttp  = false;
	        }
	    }
	}
	if (xmlHttp) {
	    xmlHttp.open('POST', text_url, true);
	    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	    xmlHttp.onreadystatechange = function () {
	        if (xmlHttp.readyState == 4) {
		        var response = xmlHttp.responseText;
		        var textNode = document.createTextNode(response);
				txt.appendChild(textNode);
	        }
	    };
	    
	    xmlHttp.send(text_request);
	}
}
