﻿//---------------------------------------------------------
// 투데이3D / 투데이리셀러
//---------------------------------------------------------
function changeBbs(todayNum, moreUrl, targetout) {
		var tab;
		var tabImage;
		var tbl;
		for (var i = 30; i <= 31; i++) {
			// 탭 이미지 초기화
			tab = eval("document.all.todayTab" + i);
			tab.src = "/images/main/left_bt_" + i + "_off.gif";
			// 게시판 테이블 초기화
			tbl = eval("document.all.today" + i);
			tbl.style.display = 'none';
		}
		// 선택된 탭 Highlight, 선택된 게시판 노출!
		eval("document.all.todayTab" + todayNum).src = "/images/main/left_bt_" + todayNum + "_on.gif";
		eval("document.all.today" + todayNum).style.display = '';
		
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function imageEditor (param, flag, imgList) {
   //var str_url = "app_launch.php?layout_type=0&layout_size=0";
   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;
   //myty=window.open(str_url,"popup1","scrollbars=0,width=800,height=665,status=yes,resizable=No");
   
   //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");
 }

function BlogOpen(a,b){
	//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")

}

function id_value(str){
    var chk
    var chk2 = 0
    var id_length = str.value.length
    for(i = 0 ; i < id_length ; i++){
        chk = str.value.charCodeAt(i)
        if((chk >= 97 && chk <= 122) || (chk >= 48 && chk <= 57)){}
        else chk2++
        }
    if(chk2 != 0){
        alert('아이디에는 a~z , 0~9 만 입력할 수 있습니다.');
        str.value = "";
        str.focus();
    }
    else if(id_length < 5 && id_length > 0 ) {
        alert('아이디는 최소 5자 이상입니다.');
        str.focus();
    }
}


function sysmsg(valcode){
	alert("꿍");
	if (valcode == "loginErr")
	{
		alert("로그인 후 이용가능 합니다.");
		return;
	}
}

//리스트 페이지 OpenWindow
function OpenWinList(FR,PageAddr,ItemType){
	var F = document.PageVal;
		F.ItemT.value = ItemType;

	var IdC = IdChk();
	if (IdC == true){
		F.ChkVal1.value = FR;
//		F.DreamVal.value = ItemType
		if (F.ChkVal1.value == ""){
			alert("선택된 아이템이 없습니다.");
		}
		
		else{
			window.open(PageAddr,"POP1","width=422,height=345,status=no,toolbar=no,titlebar=no,location=no,menubar=no,scrollbar=no");
			F.action = PageAddr;
			F.target = "POP1";
			F.submit();
		}
	}
}
function IdChk(){
	if (document.PageVal.idc.value == ""){
		alert("로그인후 사용하실수 있습니다.");
		return false;
	}
	else{
		return true;
	}
}
