var G_o=-1,G_start,G_i=0,G_f=new Array()

function G_a(v)
{
	if(!G_start)
	{
		G_start=1
		document.getElementById("Gc").onmouseover=function(){}
		G_Gd=document.getElementById("Gd")
		//G_Gd.onmouseover=function(){G_p()}
		//G_Gu=document.getElementById("Gt").getElementsByTagName("u")[0]
		//document.getElementById("Gt").onmouseover=function(){G_p()}
		G_Gl=document.getElementById("Gl")
		G_Gl.onmouseover=function(){G_d(-1)}
		G_Gl.onmouseout=function(){G_d()}
		G_Gl.onclick=function(){Gq(-1)}
		setTimeout("G_fd('Gl',40)",1000)
		G_Gr=document.getElementById("Gr")
		G_Gr.onmouseover=function(){G_d(1)}
		G_Gr.onmouseout=function(){G_d()}
		G_Gr.onclick=function(){Gq(1)}
		setTimeout("G_fd('Gr',40)",1500)
		//G_Gp=document.getElementById("Gp")
		//G_Gp.onmouseover=function(){G_d();G_fd("Gp")}
		//G_Gp.onmouseout=function(){G_fd("Gp",40)}
		//setTimeout("G_fd('Gp',40)",2000)
		G_Gvl=document.getElementById("Gvl")
		G_Gvl.onmouseover=function(){G_fd("Gvl");G_fd("Gvr");G_fd("Gl")}
		G_Gvl.onmouseout=function(){G_d()}
		G_Gvl.onclick=function(){Gq(-1)}
		G_Gvr=document.getElementById("Gvr")
		G_Gvr.onmouseover=function(){G_fd("Gvl");G_fd("Gvr");G_fd("Gr")}
		G_Gvr.onmouseout=function(){G_d()}
		G_Gvr.onclick=function(){Gq(1)}
		//G_G0=document.getElementById("G0")
		//G_G0.onmouseover=function(event){G_e(event);G_fd("Gp")}
		//G_G0.onclick=function(){Go()}
		//G_G2=G_G0.getElementsByTagName("div")
		//G_G1=G_G2[0]
		//G_G2=G_G2[1]
		G_i=document.getElementById("G2")
		G_i.onmouseover=function(event){G_e(event)}
		G_i.onclick=function(){Go()}
		G_i=G_i.getElementsByTagName("img")
		var i=0
		while(G_i[i])
		{
			G_i[i].id=i
			i++
		}
	}
}

function G_e(e)
{
	m00vO=FF?e.target:event.srcElement
}

function G_p(d)
{
	if(d)
	{
		item_XY(G_G2)
		var h=i_H+20
		G_G1.style.height=h
		item_XY(G_Gd)
		G_G0.style.top=i_Y+(i_H/2)-(h/2)
		G_G0.style.left=i_X
		G_fd("G0")
	}
	else
		G_fd("G0",0)
}

function Gq(d)
{
	G_o=G_o+d
	m00vO=G_i[G_o<0?G_i.length-1:G_o>=G_i.length?0:G_o]
	Go(d)
}

function Go(d)
{
	//G_p()
	if(m00vO.tagName=="IMG")
	{
		var e=m00vO
		var i=e.src
		document.getElementById("tBi").innerHTML=(e.alt?e.alt:"")
		i="/i/images/gallery/big/"+i.substr(i.lastIndexOf("/"))
		G_Gd.innerHTML="<center><img src="+i+" id=GdL></center>"
		G_o=parseInt(e.id)
		G_d(d)
	}
}

function G_d(d)
{
	//G_fd("G0",0)
	//G_fd("Gp",40)
	if(d&&G_i.length)
	{
		G_Gvl.src=G_i[G_o>0?G_o-1:G_i.length-1].src
		G_Gvr.src=G_i[G_o+1<G_i.length?G_o+1:0].src
		item_XY(G_Gl)
		G_Gvl.style.top=i_Y-(G_Gvl.offsetHeight/2)+(i_H/2)
		G_Gvl.style.left=i_X+G_Gl.offsetWidth-8
		item_XY(G_Gr)
		G_Gvr.style.top=i_Y-(G_Gvr.offsetHeight/2)+(i_H/2)
		G_Gvr.style.left=i_X-G_Gvr.offsetWidth+8
		G_fd("Gl")
		G_fd("Gr")
		G_fd("Gvl")
		G_fd("Gvr")
	}
	else
	{
		G_fd("Gvl",0)
		G_fd("Gvr",0)
		G_fd("Gl",40)
		G_fd("Gr",40)
	}
}

function G_fd(t,v)
{
	if(!G_f[t])
	{
		G_f[t]=new Array()
		G_f[t][1]=document.getElementById(t)
		G_f[t][2]=100
	}
	clearTimeout(G_f[t][0])
	if(v==undefined)
	{
		G_f[t][2]=100
		G_f[t][1].style.visibility="visible"
		if(FF)
			G_f[t][1].style.opacity=1
		else
			G_f[t][1].style.filter="alpha(opacity=100)"
	}
	else
	{
		if(G_f[t][2]>v-1)
		{
			G_f[t][2]=G_f[t][2]-10
			FF?G_f[t][1].style.opacity=G_f[t][2]/100:G_f[t][1].style.filter="alpha(opacity="+G_f[t][2]+")"
			G_f[t][0]=setTimeout("G_fd('"+t+"',"+v+")",50)
		}
		else if(!v)
			G_f[t][1].style.visibility=""
	}
}
