var tblpic;
var x=0; 

var arypic = new Array();
arypic[0]= '2009_child|img_9294';
arypic[1]= '2006_12|1d2dre2';
arypic[2]= '200908|img_2373';
arypic[3]= '2009_child|img_9312';



arypic[4]= '2009_child|img_9363';
arypic[5]= '200908|200801';
arypic[6]= '2009_child|2009_e';
arypic[7]= '2009_child|img_9383';

arypic[8]= '2009_child|img_9408';
arypic[9]= '2009_child|2009_ri';
arypic[10]= '2009_child|img_9315';
arypic[11]= '200908|200805';

arypic[12]= '2009_child|img_9343';
arypic[13]= '2009_child|img_9285';
arypic[14]= '200908|200804';
arypic[15]= '2009_child|img_9298';


arypic[16]= '2009_child|img_9289';
arypic[17]= '2009_child|img_9319';
arypic[18]= '200908|img_0754';
arypic[19]= '200908|img_1118';

arypic[20]= '200908|200806';
arypic[21]= '2009_child|img_9282';
arypic[22]= '200908|200802';
arypic[23]= '2009_child|img_9331';

arypic[24]= '2006_12|cc21re2';
arypic[25]= '200908|img_1214';
arypic[26]= '2006_12|eadcre2';
arypic[27]= '2009_child|img_93801';


arypic[28]= '2006_12|img_1141';
arypic[29]= '2006_12|686dre2';
arypic[30]= '2009_child|img_9359';
arypic[31]= '200908|img_1272';




arypic[32]= '2009_child|cuongnhu33';
arypic[33]= '2006_12|f90are2';
arypic[34]= '200908|200803';
arypic[35]= '2009_child|2006_01';

arypic[36]= '2009_child|b1';
arypic[37]= '2009_child|b2';
arypic[38]= '2009_child|b3';
arypic[39]= '2009_child|b4';


arypic[40]= '200908|y1';

var path_split;

//alert(arypic.length);

tblpic = '';
for (x=0; x<arypic.length; x++) { 

path_split=arypic[x].split("|");

//alert("images/" + path_split[0] + "/t/" + path_split[1] + "_t.jpg");

if (path_split[1] == 'b1') 
{

tblpic = tblpic  + '</tr><tr><td class=headings colspan=4 align=center>Kobushin Kai Jujutsu</td></tr><tr>'
}

if (path_split[1] == 'y1') 
{

tblpic = tblpic  + '</tr><tr><td class=headings colspan=4 align=center>Yamagata Ryu Kenjutsu</td></tr><tr>'
}

	tblpic = tblpic  + '<td align="center" style="cursor:hand" onclick=showpicture(' + x + ');><img src="images/' + path_split[0] + '/t/' + path_split[1] + '_t.jpg" border="0"> <br>' +  '</td>'; 
	if (((x+1) % 4 ) == 0) {
		tblpic = tblpic  + '</tr><tr>'
	}
} 


function showpicture(idx){
var navbar;
var jpgcontent;
var pixframe;
var lpath_split;

lpath_split=arypic[idx].split("|");

navbar = '<table width="100%"><tr>';
if (idx == 0){
navbar = navbar  + '<td>&nbsp&nbsp&nbsp&nbsp&nbsp';
}else{
navbar = navbar  + '<td align=left width="33%" onclick=showpicture(' + (idx - 1) + '); style="cursor: hand"><strong><u>back</u></strong>';

}

navbar = navbar  + '</td><td width="33%"><a href="pictures.htm"><strong><u>return</u></strong></a> </td>'

if ((idx+1) < arypic.length) {
navbar = navbar  + '<td align=right width="33%" onclick=showpicture(' + (idx + 1) + '); style="cursor: hand"><strong><u>forward</u></strong>';
}else{
navbar = navbar  + '<td>&nbsp&nbsp&nbsp&nbsp&nbsp';
}

navbar = navbar  + '</td></tr></table>'

jpgcontent = '<img src="images/' + lpath_split[0] + '/' + lpath_split[1] + '.jpg"  target="_blank">'

//alert(jpgcontent);
pixframe = navbar + '<br>' +  jpgcontent
// + '<br>' + 'images/' + lpath_split[0] + '/' + lpath_split[1] + '.jpg'
document.getElementById('divspace').innerHTML = pixframe ;
}

