function popUpWindow(url, w, h) {
    windowName = "popUpWindow";
    param = "toolbar=0,location=0,directories=0,statusbar=1,personalbar=0,menubar=0,scrollbars=1,resizable=1,width="
          + w + ",height=" + h;
    win = window.open(url, windowName, param);
}

function magicTag(mtag)  {

    f = window.opener.document.tagform; 
    if (f.tags.value.length == 0)  {
        f.tags.value = mtag;
    }  else  {
        f.tags.value = f.tags.value + ', ' + mtag;
    }
}

function fillInImage(fieldname,fieldval)  {

	f = window.opener.document.tagform; 
	f.elements[fieldname].value = fieldval;

}

function fillInImage2(fieldname,fieldval)  {

	f = window.opener.document.thumbform; 
	f.elements[fieldname].value = fieldval;

}

function fillInThumb(index,fieldval)  {

	f = window.opener.document.thumbform; 
	f.elements[index].value = fieldval;
}

function fishSwap(imagefile,str1,str2)  {

	document.getElementById('slot2').innerHTML= str1;
	document.getElementById('slot3').innerHTML= str2;
	document.getElementById('slot1').src = "../images/full/" + imagefile;
	return false;
}
