//--------------<Public Script>
function jfIsNull(obj) {
	if (obj.value == null || obj.value.replace(/ /gi,"") == "") {
		return true;
	}
	return false;
}
function jfSendThisForm(vForm,vAction,vTarget,vMethod,vEncoding){
	f = vForm;
	f.action = vAction;
	f.target = vTarget;
	f.method = vMethod;
	if(vEncoding == "file")f.encoding = "multipart/form-data";
	f.submit();
}

function jfGetObject(objectId){
	if(document.getElementById && document.getElementById(objectId)) {
		return document.getElementById(objectId); // check W3C DOM
	}
	else if(document.all && document.all(objectID)) {
		return document.all(objectID); // IE4
	}
	else if(document.layers && document.layers[objectID]) {
		return document.layer[objectID]; // NN4
	}
	else {
		return false;
	}
}

function jfGetKeyDown(oE,vCode,vReturnFnc){
	if(oE.keyCode == vCode){
		eval(vReturnFnc+"()");
	}
}

function jfIfrResize(arg,arg1){
	try{
		if(eval(arg1+".document.body.scrollHeight") < 1 ){

			setTimeout("jsIfrResize('" + arg + "','" + arg1 + "');",500);
		}
		else{
			jfGetObject(arg).style.height = eval(arg1+".document.body.scrollHeight");
			jfGetObject(arg1).height = jfGetObject(arg).style.height;
		}
	}
	catch(e){
		setTimeout("jsIfrResize('" + arg + "','" + arg1 + "');",500);
	}
}



function jfBgImg(){
var vRandomCnt;
	try{
		vRandomCnt = Math.round(Math.random()* 45);
		document.body.style.backgroundImage = "url(/Images/ImgMainBg_" + vRandomCnt + ".gif)";
		document.body.style.backgroundRepeat = "no-repeat";	
		setTimeout("jfBgImg();",Math.round(Math.random()* 10000));
	}
	catch(e){
		setTimeout("jfBgImg();",500);
	}
}


function jfObjectWrite(url,w,h,id){

	var tempStr="<embed id='" + id + "' src='" + url + "' width='" + w + "' height='" + h + "'></embed>";
	document.write(tempStr);

}


function jfLoginMessage(){
	alert("·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.");
	document.location.href = "/Member/Login.asp?referUrl=" + escape(window.location.pathname + window.location.search);
	return;
}

function jfChangeNickName(obj){
	if(jfIsNull(obj)){
		alert("´Ð³×ÀÓÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä");
		obj.focus();
	}
	IfrHideProcess.location.href = "/Inc/IncBoard/IfrChangeNickNameProcessing.asp?vNickName=" + obj.value;
}


function jfIsChecked(obj){
	var count = obj.length;
	var iChecked = 0;
	if(count > 1){
		for(var i=0;i<count;i++){
			if (obj[i].checked) iChecked++;
		}
	} else {
		if (obj.checked) iChecked++;
	}
	if (iChecked == 0) {            
		return false;
	}
	return true;
}

function jfIsNumber(obj) {
	var chars = "0123456789";
	return jfContainsCharsOnly(obj,chars);
}

function jfContainsCharsOnly(obj,chars) {
	for (var inx = 0; inx < obj.value.length; inx++) {
	   if (chars.indexOf(obj.value.charAt(inx)) == -1)
		   return false;
	}
	return true;
}

function jfParseInt(str) {
	return parseInt(str, 10);
}


function jfSendRequest(vUrl,vReturnFnc){

    try { xmlRequest = new ActiveXObject("Msxml2.XMLHTTP"); }
    catch(e) {
        try { xmlRequest = new ActiveXObject("Microsoft.XMLHTTP"); }
        catch(e) {
            try { xmlRequest = new XMLHttpRequest(); }
            catch(e) { xmlRequest = null; }
        }
    }

//	var xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
//	xmlRequest.open("POST", vUrl, true);
	xmlRequest.open("GET", vUrl, true);

	xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlRequest.setRequestHeader("Content-length", "0");
//	xmlRequest.onreadystatechange = function() {GetRequest(xmlRequest)};
	xmlRequest.onreadystatechange = function() {eval(vReturnFnc+"(xmlRequest)")};
	xmlRequest.send(null);

	return xmlRequest;
}


function jfReplaceStr(str, find, replace){
	var pos = 0;
	pos = str.indexOf(find);

	while(pos != -1)
	{
		pre_str = str.substring(0, pos);
		post_str = str.substring(pos + find.length, str.length);
		str = pre_str + replace + post_str;
		pos = str.indexOf(find);
	}
	return str;
}


function jfMainNaviOver(arg){
	tempObj = document.getElementsByName("imgMainNavi");
	tempObjSub = document.getElementsByName("DvMainNavi");
	for(i=0;i<tempObj.length;i++){
		tempObj[i].src = "/Images/Main/menu_n_0" + (i + 1) + ".gif";
	}
	tempObj[arg].src = "/Images/Main/menu_o_0" + (arg + 1) + ".gif";

	for(i=0;i<tempObjSub.length;i++){
		tempObjSub[i].style.display = "none";
	}
	tempObjSub[arg].style.display = "inline";
}
function jfMainaNaviOut(arg){
}


function jfResizeImage(arg,arg1){
	tempObj = document.getElementsByName(arg1);
	for(i=0;i<tempObj.length;i++){
		if(tempObj[i].width > arg){
			tempObj[i].width = arg;
		}
	}
}



function jfCheckThisFormLogin(){

	f = document.frmLogin;

	if(jfIsNull(f.txtUserId)){
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		f.txtUserId.focus();
		return;
	}

	if(jfIsNull(f.pwdUserPassword)){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		f.pwdUserPassword.focus();
		return;
	}

	jfSendThisForm(f,"/Member/LoginProcess.asp","","post","");
}


function jfWriteActivexObject(vDiv,vId,vSrc,vWidth,vHeight){
	var vStrActivex = "";

	if(vDiv == "flash"){
		vStrActivex += "<object id=\"" + vId + "\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\"  width=\"" + vWidth + "\" height=\"" + vHeight + "\">";
		vStrActivex += "   <param name=movie value=\"" + vSrc + "\">";
		vStrActivex += "   <param name=quality value=high>";
		vStrActivex += "   <param name=\"wmode\" value=\"transparent\">";
		vStrActivex += "   <embed src=\"" + vSrc + "\" quality=high wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"" + vWidth + "\" height=\"" + vHeight + "\">";
		vStrActivex += "   </embed>";
		vStrActivex += "</object>";
	}

	document.write(vStrActivex);
}


function jfChangeFamilySite(arg,arg1){
	if(arg1 == undefined) arg1 = ""; 
	window.open("/Member/OutSideLogin.asp?vToSite=" + arg + "&referUrl=" + arg1).focus();
}

/*
	var vCssCnt;
	var vCssTitle = new Array("¦…²ç","Fox");
	try{
		vCssCnt = Math.round(Math.random()* 1);
		document.write ("<link href=\"/Inc/Css/CssPinkRice_" + vCssCnt + ".css\" rel=\"stylesheet\" type=\"text/css\">");
		document.title = vCssTitle[vCssCnt] + " ´ÔÀÇ ½ºÅ¸ÀÏ½ÃÆ® " + document.title;
	}
	catch(e){
		document.write ("<link href=\"/Inc/Css/CssPinkRice.css\" rel=\"stylesheet\" type=\"text/css\">");
	}
*/
/*
	function SendThisForm(vForm,vAction,vTarget,vMethod,vEncoding){
		f = vForm;
		f.action = vAction;
		f.target = vTarget;
		f.method = vMethod;
		if(vEncoding == "file")f.encoding = "multipart/form-data";
		f.submit();
	}

    function IsNull(obj) {
        if (obj.value == null || obj.value.replace(/ /gi,"") == "") {
            return true;
        }
        return false;
    }
	function ClearThisForm(vForm){
		f = vForm;
		f.reset();
	}

	function PopUpWin(Url,PopName,Condition) {
	    if (Url != ""){
			vPopUpWin = window.open(Url, PopName, Condition);
			vPopUpWin.focus();
		}
	}

    function RemoveSpaces(str) {
        var ret = "";
        if (str.length == 0) return ret;

        for (var i=0; i<str.length; i++) {
            if (str.charAt(i) != " ") ret += str.charAt(i);
        }
        return ret;
    }

    function ContainsCharsOnly(obj,chars) {
        for (var inx = 0; inx < obj.value.length; inx++) {
           if (chars.indexOf(obj.value.charAt(inx)) == -1)
               return false;
        }
        return true;
    }

    function IsAlphaNum(obj) {
        var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        return ContainsCharsOnly(obj,chars);
    }
    function IsNumber(obj) {
        var chars = "0123456789";
        return ContainsCharsOnly(obj,chars);
    }



    function IsDay(year, month, day) {
        if (day.length > 2) return false;
        year  = ParseInt(year, 10);
        month = ParseInt(month, 10);
        day   = ParseInt(day, 10);
        if ((day <= 0) || (day > GetEndDay(year, month))) return false;
        return true;
    }
    function IsDay2(day) {
        if (day.length > 2) return false;
        day = ParseInt(day, 10);
        if ((day <= 0) || (day > 31)) return false;
        return true;
    }
    function IsMonth(month) {
        if (month.length > 2) return false;
        month = ParseInt(month);
        if ((month <= 0) || (month > 12)) return false;
        return true;
    }
    function ParseInt(str) {
        return parseInt(str, 10);
    }


	function IsChecked(obj){
	    var count = obj.length;
        var iChecked = 0;
	    if(count > 1){
	        for(var i=0;i<count;i++){
	            if (obj[i].checked) iChecked++;
	        }
	    } else {
	        if (obj.checked) iChecked++;
	    }
        if (iChecked == 0) {            
            return false;
        }
	    return true;
	}


	function LoginMessage(){
		alert("·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.");
		document.location.href = "/aMember/Login.asp?referUrl=" + escape(window.location.pathname + window.location.search);
		return;
	}

	function IfrResize(arg,arg1){
		if(eval(arg1+".document.body.scrollHeight") < 1 ){

			setTimeout("IfrResize('" + arg + "','" + arg1 + "');",500);
		}
		else{
			document.getElementById(arg).style.height = eval(arg1+".document.body.scrollHeight");
			document.getElementById(arg1).height = document.getElementById(arg).style.height;
		}
	}


function runObj(string){
	if(string != undefined)	{
		document.write(string);
	}	
}


function fWriteActivexObject(vDiv,vSrc,vWidth,vHeight){
	var vStrActivex = "";

	if(vDiv == "falsh"){
		vStrActivex += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\"  width=\"583\" height=\"82\">";
		vStrActivex += "   <param name=movie value=\"/aImages/main_menu_navi.swf\">";
		vStrActivex += "   <param name=quality value=high>";
		vStrActivex += "   <param name=\"wmode\" value=\"transparent\">";
		vStrActivex += "   <embed src=\"/aImages/main_menu_navi.swf\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"583\" height=\"82\">";
		vStrActivex += "   </embed>";
		vStrActivex += "</object>";
	}
}

	function fChangeFamilySite(arg,arg1){
		if(arg1 == undefined) arg1 = ""; 
		window.open("/aMember/OutSideLogin.asp?vToSite=" + arg + "&referUrl=" + arg1).focus();
	}
//--------------<Public Script>
*/
//-->

