var browserName=navigator.appName; 

var pic_text = new Array();


//pic_text[3] = "Art, fasting and the consumer society as viewed by the post-80s generation";
//pic_text[2] = "Art, fasting and the consumer society as viewed by the post-80s generation";
//pic_text[1] = "Art, fasting and the consumer society as viewed by the post-80s generation";
pic_text[0] = "Art, fasting and the consumer society as viewed by the post-80s generation";

var q = pic_text.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 += '<img src="../../img/common/'+pic_name+'1.jpg" border="0">';
	htmlcode += '</div>';
	htmlcode += '<div class="phototext" style="background-color:#9bc118;">';
	htmlcode += '<table style="margin:0 5px 0 5px">';
	htmlcode += '<tr height="45">';
	htmlcode += '<td width="550"><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 += '<img src="../../img/common/'+pic_name+(i+1)+'.jpg" border="0">';
	htmlcode += '</div>';
	htmlcode += '<div class="phototext" style="background-color:#9bc118;">';
	htmlcode += '<table style="margin:0 5px 0 5px">';
	htmlcode += '<tr height="45">';
	htmlcode += '<td width="550"><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);
}
