var photograph = new Array(
"./img/top_img.png","My CG-products Album --- Click to Right-button",
"./img/GreenLuxor.jpg","Even so you also outwardly appear righteous to men",
"./img/RedLuxor.jpg","He who swears by the temple swears by it and in it",
"./img/PurpleLuxor.jpg","Blind guides who strain out a gnat and swallow a camel",
"./img/GoldLuxor.jpg","For I say to you --- you shall see Me no more till you say",
"./img/SpaceLuxor.jpg","Blessed is He who comes in the name of the Lord"
);
action=0;
img_num=0;
dot_lng=2;
prev_btn="./img/prev.gif";
next_btn="./img/next.gif";
back_btn="./img/back.gif";

function changeImage(action)
{
	if(action==1)
	{
		if(img_num < photograph.length/dot_lng-1)
			img_num++;
	}
	else
	{
		if(img_num > 0)
			img_num--;
	}
	
	if(action==0)
	{
		var qstr = new String(location.search);
		for(i=0;i<photograph.length/dot_lng;i++)
		{
			buf=photograph[i*dot_lng].split("/");
			if(buf[buf.length-1]==qstr.substring(1))
			{
				document.images["photos"].src = photograph[i*dot_leg];
				img_num=i;
			}
		}
	}
	else
	{
		document.images["photos"].src = photograph[img_num*dot_lng];
	}
	
	document.board.text.value = photograph[img_num*dot_lng+1];

	if(img_num==0)
	{
		document.images["prev"].src = back_btn;
		document.images["next"].src = next_btn;
	}
	else
	{
		if(img_num==(photograph.length/dot_lng)-1)
		{
			document.images["prev"].src = prev_btn;
			document.images["next"].src = back_btn;
		}
		else
		{
			document.images["prev"].src = prev_btn;
			document.images["next"].src = next_btn;
		}
	}
}
window.onload=changeImage;

function newopen(w,x,y){
var subWin; subWin = window.open(w,'siteMap','width='+x+',height='+y+',titlebar=no,scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,status=yes');subWin.window.moveTo(100,100);subWin.focus();
}


