function showSoluzione(soluzione) {

	if (document.all)
		{
			document.all.soluzione.innerHTML = "<B><U>Soluzione</U></B><BR><BR>" + soluzione ;
			if (document.all.aiuto)
				{
				document.all.aiuto.innerHTML = '';
				document.all.aiuto.style.display = 'none';
				document.all.soluzione.style.display = 'block';
				}
		}
	else
		{ 
//			alert ("Soluzione:\n" + soluzione.replace(/<[^>]*>/gi,''));

		newWin = window.open("", "tinyWindow", 'resizable,width=450,height=200') 
		newWin.document.writeln('<html><head><title>Soluzione</title><link rel=stylesheet href=/include/styles.css>');
		newWin.document.writeln('<style type=text/css>');
		newWin.document.writeln('.solcalcolo { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold;}');
		newWin.document.writeln('.testosoluzione { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold;}');
		newWin.document.writeln('</style></head><body><b>');
		newWin.document.writeln(soluzione);
		newWin.document.write('</b></body>');
		newWin.document.close();
		}
	}
	
function showAiuto(aiuto) {

	if (document.all)
		{
			document.all.aiuto.innerHTML = "<B><U>Aiuto</U></B><BR><BR>" + aiuto ;
			if (document.all.soluzione)
				{
				document.all.soluzione.innerHTML = '';				
				document.all.soluzione.style.display = 'none';
				document.all.aiuto.style.display = 'block';				
				}
			
		}
	else
		{ 
		newWin = window.open("", "tinyWindow", 'resizable,width=450,height=200');
		newWin.document.writeln('<html><head><title>Aiuto</title><link rel=stylesheet href=/include/styles.css>');
		newWin.document.writeln('<style type=text/css>');
		newWin.document.writeln('.solcalcolo { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold;}');
		newWin.document.writeln('.testoaiuto { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold;}');
		newWin.document.writeln('</style></head><body><b>');
		newWin.document.writeln(aiuto);
		newWin.document.write('</b></body>');
		newWin.document.close();
		}
	}

function popupWin(html,text)
	{
	if(html==1)
		{
		newWin = window.open(text, "popup", "resizable,width=450,height=250,scrollbars=auto");
		}
		else
		{
		newWin = window.open("", "popup", "resizable,width=450,height=250,scrollbars=auto");
		newWin.document.writeln(text);
		newWin.document.close();
		}
	}

function getContent(tipodigioco, id, manuale, sezione, staticpage, staticbar, extra)
	{
	if(tipodigioco)
		document.nextWin.tipodigioco.value=tipodigioco;
	if(id)
		document.nextWin.id.value=id;
	if(manuale)
		document.nextWin.man.value=manuale;
	if(sezione)
		document.nextWin.sezione.value=sezione;
	if(staticbar)
		document.nextWin.static_bar.value=staticbar;
	if(staticpage)
		document.nextWin.static_page.value=staticpage;
	if(extra)
		document.nextWin.extra.value=extra;
	
//	alert('Tipo: '+tipodigioco+'\nId:'+id+'\nManuale:'+manuale+'\nSezione:'+sezione+'\nStatics:'+staticpage+' '+staticbar+'\nExtra:'+extra);
	document.nextWin.submit();
	}

function storeData(obj)
	{
	var output='';
	for(i=0;i<obj.length;i++)
		{
		output+='&'+obj[i].name+'='+escape(obj[i].value);
		}
	return output.substr(1);
	}
	

function swapclass(obj)
	{
	c = obj.className;
	if (c.substr(c.length-5)==' swap')
		{
		obj.className = c.substr(0,c.length-5);
		}
	else
		{
		obj.className = c+' swap';
		}
	}

function toggleList(id)
	{
	o = document.getElementById(id);
	if (o.style.display!="block")
		{
			o.style.display="block";
		}
	else
		{
			o.style.display="none";
		}
	}

function sDebug(debugString)
	{
	window.status = debugString;
	}