var browserName=navigator.appName; 

var pic_title = new Array();
var pic_text = new Array();
var prog_link = new Array();

pic_title[17] = "Lost n' Found";
pic_text[17] = "Unlock Dancing Plaza";
prog_link[17] = "unlock.html";
pic_title[16] = "The Young Hunger Artist k";
pic_text[16] = "On & On Theatre Workshop";
prog_link[16] = "artistk.html";
pic_title[15] = "Gen S @ HK21C";
pic_text[15] = "Pop Culture Creations";
prog_link[15] = "gens.html";
pic_title[14] = "The Fuzzy Family";
pic_text[14] = "by Gay Singers x Project on Earth Creative Communication Company Limited";
prog_link[14] = "fuzzy.html";
pic_title[13] = "Alice and the Little Golden Book";
pic_text[13] = "by Hong Kong 3 Arts Musical Institute";
prog_link[13] = "alice.html";
pic_title[12] = "International Children's Film Carnival 2010";
pic_text[12] = "The Film Programmes Office";
prog_link[12] = "film2010.html";
pic_title[11] = "Tomáš Kubínek";
pic_text[11] = "by Certified Lunatic and Master of the Impossible (Canada)";
prog_link[11] = "tomas.html";
pic_title[10] = "Hong Kong Youth Music Camp Concert 2010";
pic_text[10] = "by Music Office";
prog_link[10] = "musiccamp2010.html";
pic_title[9] = "The Magic Flute";
pic_text[9] = "by Zuni Icosahedron";
prog_link[9] = "flute.html";
pic_title[8] = "Story of Mozart";
pic_text[8] = "by Hong Kong Sinfonietta";
prog_link[8] = "mozart.html";
pic_title[7] = "Brocante Sonore: The Mechanicians";
pic_text[7] = "by Zic Zazou (France)";
prog_link[7] = "brocante.html";
pic_title[6] = "The Lovable Scavenger";
pic_text[6] = "by Make Friends With Puppet";
prog_link[6] = "scavenger.html";
pic_title[5] = "Restaurant tu Three";
pic_text[5] = "by !!extres! (Spain)";
prog_link[5] = "restaurant.html";
pic_title[4] = "Gulliver";
pic_text[4] = "by The Moscow State Puppets Theatre named after Sergei Obraztsov (Russia)";
prog_link[4] = "gulliver.html";
pic_title[3] = "Check Out!";
pic_text[3] = "by Polyglot Theatre (Australia)";
prog_link[3] = "checkout.html";
pic_title[2] = "Goodnight Moon</em> and <em>The Runaway Bunny";
pic_text[2] = "by Mermaid Theatre of Nova Scotia (Canada)";
prog_link[2] = "goodnightmoon.html";
pic_title[1] = "Ping";
pic_text[1] = "by Titeres de Maria Parrato (Spain)";
prog_link[1] = "ping.html";
pic_title[0] = "Opening Programme: Peter Pan";
pic_text[0] = "by Northern Ballet Theatre (UK)";
prog_link[0] = "peterpan.html";

var q = pic_title.length - 1;

function onoff(x)
{
	try
	{
	clearTimeout(timer1);
	}
	catch(err)
	{
	}
	try
	{
	clearTimeout(timer2);
	}
	catch(err)
	{
	}
	if (x != q)
	{
	var y = x + 1;
	}
	else
	{
	var y = 0;
	}
	timer2 = setTimeout("onoff("+y+")", 7000);
	for(i=0; i<=q ; i++) {
	if (x == i)
	{
		//if (browserName=="Microsoft Internet Explorer")
		//{
			//$("#tab_"+i).toggle("fast");
		//}
		//else
		//{
			$("#tab_"+i).fadeIn("slow");
		//}
	}
	else
	{
	document.getElementById("tab_"+i).style.display = "none";
	}
	}
}
function photobox(pic_name)
{
	var htmlcode = "";
	htmlcode += '<div id="tab_0" class="tab" style="display:block;"><div class="photo">';
	htmlcode += '<a href="../prog/'+prog_link[0]+'"><img src="../../img/common/'+pic_name+'1.jpg" border="0"></a>';
	htmlcode += '</div>';
	htmlcode += '<div class="phototext">';
	htmlcode += '<table style="margin:0 5px 0 5px">';
	htmlcode += '<tr height="45">';
	htmlcode += '<td width="550"><span class="photo_title"><em><b>'+pic_title[0]+'</b></em></span>';
	htmlcode += '<br><span class="photo_text"><b>'+pic_text[0]+'</b></span></td>';
	htmlcode += '<td width="100" align="right"><a href="javascript:onoff('+q+')"><img src="../../img/common/prv.gif" border="0"></a> <a href="javascript:onoff(1)"><img src="../../img/common/next.gif" border="0"></a></td>';
	htmlcode += '</tr>';
	htmlcode += '</table>';
	htmlcode += '</div></div>';
	timer1 = setTimeout("onoff(1)", 7000);
	for(i=1; i<=q ; i++)
	{
	htmlcode += '<div id="tab_'+i+'" class="tab" style="display:none;"><div class="photo">';
	htmlcode += '<a href="../prog/'+prog_link[i]+'"><img src="../../img/common/'+pic_name+(i+1)+'.jpg" border="0"></a>';
	htmlcode += '</div>';
	htmlcode += '<div class="phototext">';
	htmlcode += '<table style="margin:0 5px 0 5px">';
	htmlcode += '<tr height="45">';
	htmlcode += '<td width="550"><span class="photo_title"><em><b>'+pic_title[i]+'</b></em></span>';
	htmlcode += '<br><span class="photo_text"><b>'+pic_text[i]+'</b></span></td>';
	if (i==q)
	{
	htmlcode += '<td width="100" align="right"><a href="javascript:onoff('+(i-1)+')"><img src="../../img/common/prv.gif" border="0"></a> <a href="javascript:onoff(0)"><img src="../../img/common/next.gif" border="0"></a></td>';
	}
	else
	{
	htmlcode += '<td width="100" align="right"><a href="javascript:onoff('+(i-1)+')"><img src="../../img/common/prv.gif" border="0"></a> <a href="javascript:onoff('+(i+1)+')"><img src="../../img/common/next.gif" border="0"></a></td>';
	}
	htmlcode += '</tr>';
	htmlcode += '</table>';
	htmlcode += '</div></div>';
	}
	document.write(htmlcode);
}