if (document.layers){
	pre = 'document.'
	post = ''
}
if (document.getElementById){
	pre = 'document.getElementById("'
	post = '")'
}
if (document.all){
	pre = 'document.all.'
	post = ''
}


function ShowWin(cwin) {
eval(pre + cwin + post).style.visibility = 'visible'
}

function HideWin(cwin) {
eval(pre + cwin + post).style.visibility = 'hidden'
}

function AddImg(aswitchto,atotalimgs,afilename,aheight,awidth,ablurb) {
atotcnt = 1+atotalimgs;
	for (i=1;i < atotcnt;i++) {
		if (i == aswitchto) {
		eval(pre + 'on' + i + post).style.display = 'inline'
		eval(pre + 'off' + i + post).style.display = 'none'
		}
		else {
		eval(pre + 'off' + i + post).style.display = 'inline'
		eval(pre + 'on' + i + post).style.display = 'none'
		}
	}
eval(pre + 'mainimage' + post).src = "clrpixel.gif"
eval(pre + 'mainimage' + post).src = "img_closet/" + afilename
eval(pre + 'mainblurb' + post).innerHTML = ablurb
}



function AddThis(what,where) {
var artf = document.forms['uploadform']
if (artf.elements[where].value != '') artf.elements[where].value += ','
artf.elements[where].value += what
}

function NewCat() {
eval(pre + 'catswitch' + post).innerHTML = '<select name="maincat"><option value="photography">photography</option><option value="art">art</option><option value="other">other</option></select> <input class="inputsamerow" type="text" name="category" size="12" value=""><br><a class="showex" href="javascript:OldCat();">Show old categories</a>'
}

function OldCat() {
var origcf = document.forms['temporigcat']
eval(pre + 'catswitch' + post).innerHTML = origcf.elements[0].value
}
