
if(document.all)var isIE=true;
var fotos = new Array();
function artworx(url,text)

{

	Artworx = fotos.length;
	fotos[Artworx] = new Array();
	fotos[Artworx]["text"]=text;
	fotos[Artworx]["pic"]=new Image()
	fotos[Artworx]["pic"].src=url;

}


exakt=false;        
height=400;
width=600;          
preview=0;          
time=3000        

// eddig lehet editkedni

function skalieren(x,h,w,e)

{

	H=fotos[x]["pic"].height;
	W=fotos[x]["pic"].width;
	W1=W;
	H1=H;

	if(!e)

	{

		if(H>h)

		{

			W1=W*h/H;

			H1=h;

		}

		if(W>w)

		{

			H1=H*w/W;

			W1=w;

		}

	}else

	{

		H1=h;
		W1=w;

	}

	var re = new Array();
	re["w"]=W1;
	re["h"]=H1;
	return(re); W1=""; H1=""; W=""; H="";

}

thumb_height=height/preview;
thumb_width=100000;
thumb_exakt=false;


function thumb_table(offset)

{

	table="<table width=100% height=100%>";
	for(var x=offset; x<=offset+preview-1; x++)

	{

		if(fotos[x])

		{

			var Size = skalieren(x,thumb_height,thumb_width,thumb_exakt);
			size="width="+Size["w"]+" height="+Size["h"];
			table+="<tr><th><img "+size+" onclick=\"show('"+x+"',true)\" class='thumb' "+size+" src='"+fotos[x]["pic"].src+"' alt=\""+fotos[x]["text"]+"\"></th></tr>"

		}

	}

	table+="</table>";
	return(table);

}

var nav=0;
function navi(v)

{

	v=Number(v);
	if(nav+v>fotos.length-preview)

	{

			V=fotos.length-preview;

	}else

	{

		if(nav+v<0)

		{

			V=0;

		}else

		{

			V=nav+v;

		}

	}

	nav=V;
	if(isIE)	document.getElementById("thumbs").filters.blendTrans.Apply();
	document.getElementById("thumbs").innerHTML=thumb_table(V);
	if(isIE)	document.getElementById("thumbs").filters.blendTrans.Play();

}

NAV=-1;

function show(x,fs)

{

	x=Number(x);
	if(fotos[x])

	{

		var Size = skalieren(x,height,width,exakt);
		if(fs){size="width="+Size["w"]+" height="+Size["h"]; alt="alt=\"Gyorfi gallery by artWorx 5711\""; was=false} else {size=""; alt="alt=\"[show scaled size]\""; was=true}
		if(isIE)	document.getElementById("inhalt").filters.blendTrans.Apply();
		document.getElementById("inhalt").innerHTML="<table height=100% width=100%><tr><th><b><img src="+fotos[x]["pic"].src+" "+alt+"></th></tr></table>";
		if(isIE)	document.getElementById("inhalt").filters.blendTrans.Play();
		

	}

	NAV=x

}

var Timer; running=false;
function start()

{

	if(!running)

	{

		slideshow();
		running=true;

	}

}

function slideshow()

{

		NAV++;
		if(NAV>=fotos.length)NAV=0;
		show(NAV,true);
		Timer = setTimeout("slideshow()",time);
		

}

start();

function kill()

{



}
