
// ÄÁÅÙÃ÷º¸È£ ¿Â¿ÀÇÁ
function protectOnOff( onoff ) {
	if( onoff == null ) onoff = true;

	if( onoff ) {
		document.oncontextmenu	= function() {
			var e = window.Event ? window.Event : event;

			e.returnValue = false;
			e.cancelBubble = true;
			return false;
		};
		document.onselectstart		= new Function( "return false;" );
		document.ondragstart		= new Function( "return false;" );
	}
	else {
		document.oncontextmenu	= new Function( "return true;" );
		document.onselectstart		= new Function( "return true;" );
		document.ondragstart		= new Function( "return true;" );
	}
}

function protectKeyDown( onoff ) {
	if( onoff == null ) onoff = true;

	if( onoff ) {
		document.onkeydown = function() {
			var e = window.Event ? window.Event : event;

			e.keyCode = 0;
			e.returnValue = false;
			e.cancelBubble = true;
		}
	}
	else {
		document.onkeydown = null;
	}
}

function bluring() { 
	var e = window.Event ? window.Event : event;

	try {
		if( e.srcElement.tagName.toUpperCase() == "A" || e.srcElement.tagName.toUpperCase() == "IMG" || e.srcElement.type == "radio" || e.srcElement.type == "checkbox" || e.srcElement.type == "image" || e.srcElement.type == "button" ) {
			document.body.focus(); 
		}
	}
	catch( e ) {}
}

function noContent() {
	var e = window.Event ? window.Event : event;

	try {
		if( e.srcElement.tagName.toUpperCase() == "INPUT" || e.srcElement.tagName.toUpperCase() == "TEXTAREA" ) {
			protectOnOff( false );
			//protectKeyDown( false );
		}
		else {
			protectOnOff( true );
			//protectKeyDown( true );
		}
	}
	catch( e ) {}
}

function empty( chkval ) {
	if( event.srcElement.value == chkval ) event.srcElement.value = "";
}

function winObjClose( obj_name ) {
	var chk = obj_name.location + null;
	if( obj_name && chk != undefined ) obj_name.close();
}
