function popup(url, w, h, sc)
{
openpopup=window.open(url, 'popup', 'resizable=no,scrollbars=' + sc + ',width=' + w + ',height=' + h + ',menubar=no');
}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



function prgCategory(c) {
	document.frmProgramCategory.REQ_REQUEST_PAGE.value=c;
	document.frmProgramCategory.submit();
}


function imagedetailII(mid,mtp,sid,stp,url,wth,hgt,ttl,dcr) {
	document.frmmedia._mediaid.value=mid;
	document.frmmedia._mediatype.value=mtp;
	document.frmmedia._sourceid.value=sid;
	document.frmmedia._sourcetype.value=stp;
	document.frmmedia._url.value=url;
	document.frmmedia._width.value=wth;
	document.frmmedia._height.value=hgt;
	document.frmmedia._title.value=ttl;
	document.frmmedia._description.value=dcr;
	try {if (imagedetail_submit(true,mid,hgt,wth)) return;} catch(err) {};
	document.frmmedia.submit();
	try {if (imagedetail_submit(false,mid,hgt,wth)) return;} catch(err) {}; }
	
function imagedetail_submit(before,mediaid,height,width) {
if (before) {
document.frmmedia.target="_mediapopup";
document.frmmedia.media_Model.value="imageseule";
wnd=window.open('', '_mediapopup', 'menubar=no,resizable=no,status=no,titlebar=no,scrollbars=no,width='+width+',height='+height);
}
else wnd.focus(); 
}