<!--

var titles, dir, nums, prefixs, thumbs;
var arownum = 4
colors = new Array ('#CC0000', '#FF6600', '#FFFF00', '#339900', '#33CCCC', '#0066FF','#9933FF', '#339999', '#cc9966', '#cc9966', '#cc9966');
function fileNum(index) {
	if (index < 10) {
		return ('00' +index);
	} else if (index < 100) {
		return ('0' + index);
	}
	return index;	
}
function filePath(dirIndex, fileIndex) {
	return photoPath + dirs[dirIndex] + prefixs[dirIndex] + fileNum(fileIndex) + '.jpg';
}
function thumbPath(dirIndex, fileIndex) {
	return photoPath + dirs[dirIndex] + 'thumbs/' + prefixs[dirIndex]  + fileNum(fileIndex) + '.jpg';
}
function imageExists(exists) 
{ 
	if(exists) 
		return true;
	else
		return false;
} 

function writeAlbum(dirIndex) {
	text = "";
	var i = 0;
	text += "<table cellspacing='20px'>"
	
	for (i = 0; i < nums[dirIndex]; i++) {
		if ( i % arownum == 0)
			text += '<tr>';
		text += '<td  >';
		text += '<a target="blank" href="' + filePath(dirIndex, i) + '" >';
		text += '<img src="' + thumbPath(dirIndex, i) + '" />';
		text += '</a>';
		text += '</td>';
		if ( i % arownum == arownum - 1 || i == nums[dirIndex])
			text += '</tr>';
	}	
	text += "</table>";
	//return text;		
	getObject('photoAlbum').innerHTML = text;
}
function album_change (id) {
	getStyle(getObject('photoAlbum')).borderColor = colors[id];
	writeAlbum (id);	
}
/* video */
function playVideo (name, url) {
	url = photoPath + url;
	getObject("videoTitle").innerHTML = name;
	text = "";
	text += '<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="400" height="345" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" id="WinMediPlay" type="application/x-oleobject"><param name="src" value="';
			text += url;
			text += '" /><param name="autoStart" value="true" /><param name="showControls" value="true" /> <param name="ShowStatusBar" value="true"> <embed type="video/x-ms-asf-plugin" pluginspace="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="';
			text += url;
			text += '" name="mediaplayer" showcontrols=2 showdisplay=0 showstatusbar=0 autostart=1 width="400" HEIGHT="345"></embed>           </object> ';
	getObject("videoClip").innerHTML = text;
}
-->