﻿/**
 * 클래스명 : MyArtist()
 * 기    능 : 작가에 사용되는 함수/메서드
 * 작 성 일 : 2008.02.11, 이지미디어, 홍주현
 *
 */
MyArtist = function () {
	// 작가 갤러리
	this.GetGallery = function (idx) {
		MyLib.WinOpen(MyLib.TopDir + '/ATS/Gallery.aspx?n=' + idx, 'GALLERY', 800, 650);
	}

	// 작품리스트
	this.GetPicture = function (idx) {
		MyLib.WinOpen(MyLib.TopDir + '/ATS/Gallery.PIC.aspx?n=' + idx, 'GALLERY', 800, 650);
	}

	// 정렬 선택
    this.SetOrder = function (v1, v2) {
        var frm = document.search;
        
        frm.of.value = v1;
        frm.ot.value = v2;
        frm.submit();
    }

	// 공지글
    this.Notice = function () {
        var xml;

        xml = new XmlHttp("GET", MyLib.TopDir + "/AUC/AucNotice.aspx?k=ATS&l=3", []);
        xml.Init();

        if (xml.Msg != "") {
            var BannerArr = xml.Msg.split("||");
            
            document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">');

            for (var i = 0; i < BannerArr.length; i++) {
                document.write('<tr><td class="popup-bot">');
                document.write('<img src="' + MyLib.TopDir + '/images/common/popup/dot.gif" align="absmiddle" /> ' + BannerArr[i]);
                document.write('</td></tr>');
            }

            document.write('</table>');
        } else {
            document.write('<table width="100%" cellpadding="0" cellspacing="0" border="0">');
            document.write('<tr><td class="popup-bot">');
            document.write('</td></tr>');
            document.write('</table>');
        }
    }

	// 정렬 선택
    this.SelectTd = function (Idx, ArtistIdx) {
       for (var i = 0; i < ArtTd.length; i++) {
           if (Idx == i) {
               ArtTd[i].style.backgroundImage = "url('" + MyLib.TopDir + "/images/common/list/mid-img-bg02.gif')";
               MyLib.Object("_ATS_PIC_FRM").src = "./ArtistPic.aspx?at=" + ArtistIdx;
               MyLib.Object("_ATS_PIC_FRM").style.display = "";
           } else {
               ArtTd[i].style.backgroundImage = "url('" + MyLib.TopDir + "/images/common/list/mid-img-bg01.gif')";           
           }
       }
    }
}

var MyArtist = new MyArtist();
