function ScreenShot(name, description, filename){
this.name=name;
this.desc=description;
this.filename=filename;
}
function Category(name,screenList){
this.name=name;
this.screenShots=screenList;
}

var categories = new Array(
  new Category("Charcoal sketches",
                new Array(new ScreenShot("my reflection", "", "../Pictures/art/sketch0.jpg"),
                          new ScreenShot("John", "", "../Pictures/art/sketch1.jpg"),
                          new ScreenShot("Andrea", "This is how it\'s done!", "../Pictures/art/sketch2.jpg"),
                          new ScreenShot("Beefeater add", "from a magazine", "../Pictures/art/sketch3.jpg"),
                          new ScreenShot("Laura", "", "../Pictures/art/sketch4.jpg"),
                          new ScreenShot("Sarah\, not complete", "need to finish the teeth some day", "../Pictures/art/sketch5.jpg"))));
function refresth_no_warn(){
loadCatOptions();
loadCategory(0);
}

function picturerefresh(){
alert("Disclaimer: none to give");
loadCatOptions();
loadCategory(0);
}
			
function loadCategory(catNum){
deleteImageOptions();
loadImageOptions(categories[catNum].screenShots);
loadSS(0);
}

function loadSS(ssNum){
catNum = document.imageForm.catList.selectedIndex;
if (catNum==-1){catNum=0;document.imageForm.catList.options[0].selected=true;}
ss = categories[catNum].screenShots[ssNum];
document.imageForm.imageList.options[ssNum].selected=true;
document.screenImage.src=ss.filename;

if (document.getElementById)
{
	document.getElementById("desc").innerHTML = ss.desc;
}
else if (document.all){
	desc.innerHTML = ss.desc;
}
else{
	document.layers["descNS"].document.write(ss.desc);
	document.layers["descNS"].document.close();
}
}

function deleteImageOptions(){
for (i=0;i<document.imageForm.imageList.options.length;i=i+0){
document.imageForm.imageList.options[i]=null;
}}

function loadImageOptions(imageOptions){
for (i=0;i<imageOptions.length;i++){
document.imageForm.imageList.options[i]=new Option(imageOptions[i].name, i);
}}

function loadCatOptions(){
for (i=0;i<categories.length;i++){
document.imageForm.catList.options[i]=new Option(categories[i].name,i);
}}