﻿/* ==== 공통 common ==== */


/* popup function */
function fn_winOpen(winURL,winName,winSize) {
	window.open(winURL, winName, winSize);
}

/* check popup function */

function fn_popupSubmit(winURL,winName,winSize,formName,boxName,chkMsg){
	
	var FN = eval("document."+formName);
	var FN2 = eval("document."+formName+"."+boxName);
	

	if (FN2.value == chkMsg){
		alert("내용을 입력하셔야합니다.");
		FN2.focus();
		return;
	}else{
		window.open(winURL, winName, winSize);
		
		FN.action=winURL;
		FN.target=winName;
		FN.submit();
	}

}

/* image uploader popup */
function imageEditor (param, flag, imgList) {
	//var str_url = "app_launch.php?layout_type=0&layout_size=0";
	//myty=window.open(str_url,"popup1","scrollbars=0,width=800,height=665,status=yes,resizable=No");
	var str_url = "http://blog.vicco.net/nPaint2/app_client.php?layout_type=1&layout_size=1&uid="+param+"&rnd=1818542&flag="+flag+"&imgList="+imgList;
		
	//popupwin(str_url, '1', '1003', '726');
	//myty=window.open("http://dream.vicco.net/getImageURL.asp","index","scrollbars=0,width=802,height=675,status=yes,resizable=No");
	myty=window.open(str_url,"index","scrollbars=0,width=802,height=675,status=yes,resizable=No");
 }
 
 
 /* text box default msg clear */
function clickClearTextBox(formName,chkMsg){
	var f = eval("document."+ formName)
	if (f.value == chkMsg){
		f.value = "";
	}	
}

function blurTextBoxInsertMsg(formName,insertMsg){
	var f = eval("document."+ formName)
	if (f.value == ""){
		f.value = insertMsg;
	}	
}

/* popup choise yes */
function choiseYes(formName,val){
	var OFN = eval("window.opener.document."+formName);
	var OFN2 = eval("window.opener.document."+formName+"2");

	OFN.value=val;
	OFN2.value=val;

	window.close();
}

/* toggleMenu */
function toggleMenu(currMenu) {
        if (document.all) {
                thisMenu = eval("document.all." + currMenu + ".style")
                if (thisMenu.display == "block") {
                        thisMenu.display = "none"
                }
                else {
                        thisMenu.display = "block"
                }
                return false
        }
        else {
                return true
        }
}

var old_menu = '';
function menuclick( submenu) {
    if( old_menu != submenu ) {
	    if( old_menu !='' ) {
	        old_menu.style.display = 'none';
		}
	    submenu.style.display = 'block';
	    old_menu = submenu;
	} else {
	        submenu.style.display = 'none';
	        old_menu = '';
	}
}

function BlogOpen(a,b){
	alert(a);
	//window.open(a, b, "fullscreen=yes,channelmode,scrollbars=no,toolbar=no,location=no,resizable=no,status=no,width="+(screen.availwidth)+",height="+(screen.availHeight)+", left=10")
window.open(a, b, "fullscreen=yes,scrollbars=no,toolbar=no,location=no,resizable=yes,status=no,width="+(screen.availwidth)+",height="+(screen.availHeight)+", left=10")

}

