ar = [];
ar[0] = new Image();
ar[1] = new Image(); ar[1].src='/i/3ara.gif';

gar = [];
gar[0] = new Image();
gar[1] = new Image(); gar[1].src='/i/g3ara.gif';

al = [];
al[0] = new Image();
al[1] = new Image(); al[1].src='/i/3ala.gif';

gal = [];
gal[0] = new Image();
gal[1] = new Image(); gal[1].src='/i/g3ala.gif';

a = [];
a[0] = new Image();
a[1] = new Image(); a[1].src='/i/aa.gif';

ga = [];
ga[0] = new Image();
ga[1] = new Image(); ga[1].src='/i/gaa.gif';

li = [];
li[0] = new Image();
li[1] = new Image(); li[1].src='/i/lia.gif';

function changeImage(id, type, state)
{
	e = document.getElementById(id);
	if(e)
	{
		var img = '';
		if(type == 'ar'){
			img = ar;
			if(state==1) ar[0].src = e.src;
		} else if(type == 'al') {
			img = al;
			if(state==1) al[0].src = e.src;
		} else if(type == 'li') {
			img = li;
			if(state==1) li[0].src = e.src;
		} else if(type == 'gar'){
			img = gar;
			if(state==1) gar[0].src = e.src;
		} else if(type == 'gal') {
			img = gal;
			if(state==1) gal[0].src = e.src;
		} else if(type == 'ga') {
			img = ga;
			if(state==1) ga[0].src = e.src;
		} else {
			img = a;
			if(state==1) a[0].src = e.src;
		}
		e.src = state ? img[1].src : img[0].src;
	}
}

function uploadWindow(url) {
	window.open(url, 'STPUploadWindow', 'width=400,height=220,scrollbars=0,resizable=0');
}

function changeUploaded(f) {
	u = document.getElementById("uploaded");
	u.innerHTML = f.join(", ");
}
function clearUploaded(url) {
	u = document.getElementById("uploaded");
	if(u.innerHTML != "") {
		window.open(url, 'STPUploadWindow', 'width=400,height=200,scrollbars=0,resizable=0');
		u.innerHTML = "";
	}
	return true;
}

