function change_img(total, whereto)
{


	if (whereto == "next")
	{
		to_be_shown = curr_img + 1;
	} else 
	{ 
		to_be_shown = curr_img - 1;
	}

	if (to_be_shown < 1 || to_be_shown > total)
	{
		to_be_shown = curr_img;
	}
	curr_img = to_be_shown;


    for (i=1;i<=total;i++)
    {
		document.getElementById('img_'+i).className = "none";
    }

	document.getElementById('img_'+to_be_shown).className = "block";

}


function pop(url)
{
	if (url && url != 'undefined')
	{
		window.open(url,'imgs', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=810, height=610');
	}
}


function bg(posx, posy)
{
	document.getElementById('floor').style.backgroundPosition = posx+'px '+posy+'px';
}

function tip(appno, apparea)
{

	if (appno && appno != 'undefined' && apparea && apparea != 'undefined')
	{
		document.getElementById('tipper').style.display = 'block';
		document.getElementById('appno').innerHTML = appno;
		document.getElementById('apparea').innerHTML = apparea;
	} else 
	{
		document.getElementById('tipper').style.display = 'none';
	}
}


function change_viz(whichone)
{

	for (i=9;i<16 ;i++ )
	{
		document.getElementById('viz_'+i).className = "none";
	}
	document.getElementById('viz_'+whichone).className = "block";



}

function change_viz_img(total, whichone, whereto)
{

	if (whereto == "next")
	{
		to_be_shown = curr_img + 1;
	} else 
	{ 
		to_be_shown = curr_img - 1;
	}

	if (to_be_shown < 1 || to_be_shown > total)
	{
		to_be_shown = curr_img;
	}
	curr_img = to_be_shown;


    for (i=1;i<=total;i++)
    {
		document.getElementById('img_'+whichone+'_'+i).className = "none";
    }

	document.getElementById('img_'+whichone+'_'+to_be_shown).className = "block";

}


function set_img(total, whichone)
{

	for (i=1;i<= total ;i++ )
	{
		document.getElementById('img_'+i).className = 'none';
	}
	document.getElementById('img_'+whichone).className = 'block';

}


function unblink(url) 
{
	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="960" height="140" hspace="0" vspace="0">');
	document.write('<param name="wmode" value="opaque">');
	document.write('<param name="movie" value="'+url+'"><param name="quality" value="high">');
	document.write('<embed src="'+url+'" width="960" height="140" hspace="0" vspace="0"  wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>');
}


function flsel_chb(which)
{

	if (which)
	{
		if (which == "1")
		{
			posx = '-500px';
			posy = '0';
		}
		if (which == "2")
		{
			posx = '0';
			posy = '-375px';
		}
		if (which == "3")
		{
			posx = '-500px';
			posy = '-375px';
		}
		if (which == "4")
		{
			posx = '0';
			posy = '-750px';
		}
		if (which == "5")
		{
			posx = '-500px';
			posy = '-750px';
		}
		if (which == "ground")
		{
			posx = '0';
			posy = '-1125px';
		}

		document.getElementById('floor').style.backgroundPosition = posx+' '+posy;
	} else
	{
		document.getElementById('floor').style.backgroundPosition = '0 0';
	}

}

function tip_1(content)
{
	if (content)
	{
		document.getElementById('zfl').style.display = 'inline';
		document.getElementById('tipper').innerHTML = content;
		document.getElementById('tipper').style.display = 'inline';
	} else
	{
		document.getElementById('zfl').style.display = 'none';
		document.getElementById('tipper').style.display = 'none';
	}
}