<!-- //////////////////////////////////////////////////////////////
//*****************************************************************
//  Web Site: http://www.CginJs.Com
//  CGI 와 JavaScript가 만났을 때 = C.n.J ☞ http://www.CginJs.Com
//  CGI 와 JavaScript가 만났을 때 = C.n.J ☞ webmaster@CginJs.Com
//  C.n.J 자바스크립트 자동 생성 마법사 ☞ http://www.CginJs.Com
//  C.n.J 자바스크립트(JavaScript) 가이드 ☞ http://www.CginJs.Com
//  C.n.J CSS(Cascading Style Sheet) 가이드 ☞ http://www.CginJs.Com
//  Editer : Web Site: http://www.CginJs.Com
//*****************************************************************
/////////////////////////////////////////////////////////////// -->

document.write('<st'+'yle>');
document.write('td {font-size:12px; font-family:굴림; text-decoration:none; }');
document.write('A:link,A:active,A:visited{text-decoration:none;font-size:12PX;color:#333333;}');
document.write('A:hover {text-decoration:none; color:ff9900}');
document.write('font { font-size: 9pt; }');

document.write('.photo_action {width:20px; height:137px; background-color:rgb(240,240,240);border-width:1pt; cursor:hand;}');
document.write('.photo_action2 {border-width:1; border-color:rgb(204,204,204); border-style:solid;cursor:hand;}');
document.write('.photo_action3 { border-width:1; border-style:solid; border-color:#000000; color:#0084D4; background-color:white;cursor:hand;}');
document.write('.photo_action4 { scrollbar-face-color: #FFCC33;scrollbar-shadow-color: #ffffff;scrollbar-highlight-color: #F3f3f3;scrollbar-3dlight-color: #ffffff;scrollbar-darkshadow-color: #F3f3f3;scrollbar-track-color: #ffffff;scrollbar-arrow-color: #f9f9f9;cursor:hand; }');

document.write('.photoslide_action {background-color:rgb(240,240,240);border-width:1pt; height:16pt;cursor:hand;}');
document.write('.photoslide_action2 {border-width:1; border-color:rgb(204,204,204); border-style:solid;cursor:hand;}');
document.write('.photoslide_action3 { border-width:1; border-style:solid; border-color:#000000; color:#0084D4; background-color:white;cursor:hand;}');
document.write('.photoslide_action4 { scrollbar-face-color: #FFCC33;scrollbar-shadow-color:  #ffffff;scrollbar-highlight-color: #F3f3f3;scrollbar-3dlight-color: #ffffff;scrollbar-darkshadow-color: #F3f3f3;scrollbar-track-color: #ffffff;scrollbar-arrow-color: #f9f9f9;cursor:hand; }');
document.write('</st'+'yle>'); 

/*******************************************************************************
For Photo (Global Variables and Functions)
********************************************************************************/
var galleryList = new Array();
var galleryIndex = 0;
var gallerynum = 5; // 초기 보여줄 목록수
var default_width  = 124;
var default_height = 93;

function addGallery(img, subject, link, target) {
	galleryList.push({"img": img, "subject": subject, "link": link, "target": target});
}

function moveLeft() {
	if (galleryIndex > 0) {
		galleryIndex--;
		drawGallery();
	}
}

function moveRight() {
	if (galleryIndex < galleryList.length - gallerynum) {
		galleryIndex++;
		drawGallery();
	}
}

function drawGallery() {
	var i = 0;
	var html = "";
	var gallery;
	
	html += "<table cellspacing='0' cellpadding='0' border='0' align='left'>\n";
	html += "<tr>\n";
	html += "<td width='5'></td>\n";
	
	for (i = galleryIndex; i < galleryIndex + gallerynum && i < galleryList.length; i++) {
		gallery = galleryList[i];

    
		if(gallery.target == "") {
			targetName = "";
		} else if(gallery.target == "_blank") {
			targetName = " target='_black'";
		} else {
			targetName = " target='"+gallery.target+"'";
		}
		html += "<td valign='top' align='left'>\n";
		html += "<table cellspacing='0' cellpadding='0' border='0'>\n";
		html += "<tr><td style='border:1px solid #E5E5E3'><a href='" + gallery.link + "' " + targetName + " title='" + gallery.subject + "'><img src='" + gallery.img + "' width='" + default_width + "' height='" + default_height + "'></a></td></tr>\n";
		html += "</table>\n";
		html += "<table cellspacing='0' cellpadding='0' border='0'>\n";
		html += "<tr><td height='8'></td></tr>\n";
		html += "<tr><td align='center'><a href='" + gallery.link + "' " + targetName + " title='" + gallery.subject + "'>" + gallery.subject + "</a></td></tr>\n";
		html += "</table>\n";		
		html += "</td>\n";
		
		html += "<td width='5'></td>\n";
	}
	html += "</td>\n";
	html += "</tr>\n";
	html += "</table>\n";
	var objDiv = document.getElementById("gallerylist");
	objDiv.innerHTML = html;
}

function photoview(img)  {
  document.maplephoto.src = img;

}

/*******************************************************************************
For PhotoSlide (Global Variables and Functions)
********************************************************************************/
/* By Christian Carlessi Salvad?(cocolinks@c.net.gt). Keep this notice intact. */
// IE 전용

var g_fPlayMode = 0;
var g_iimg = -1;
var g_imax = 0;
var g_dwTimeOutSec= 2;
var g_ImageTable = new Array();


function InitPhoto(photoArray, comments)  {
	g_imax = photoArray.length;

	for (i=0; i<photoArray.length; i++) 
		g_ImageTable[i] = new Array (photoArray[i], comments[i]);
}


function ChangeImage(fFwd) { 
	if (fFwd) { 
		if (++g_iimg==g_imax) 
			g_iimg=0; 
	} 
	else { 
		if (g_iimg==0) 
			g_iimg=g_imax; g_iimg--; 
	} 
	Update(); 
}

function getobject(obj){
	if (document.getElementById)
		return document.getElementById(obj)
	else if (document.all)
		return document.all[obj]
}

function Update(){
	getobject("photoslide_img").src = g_ImageTable[g_iimg][0];
	getobject("photoslide_readme").innerHTML = g_ImageTable[g_iimg][1];
	getobject("photoslide_num_img").innerHTML = g_iimg + 1;
	getobject("photoslide_total_img").innerHTML = g_imax;
}

function Play() {
	g_fPlayMode = !g_fPlayMode;
	if (g_fPlayMode) {
		getobject("btnPrev").disabled = getobject("btnNext").disabled = true;
		Next();
	} else  {
		getobject("btnPrev").disabled = getobject("btnNext").disabled = false;
	}
}

function OnImgLoad() { 
	if (g_fPlayMode) 
		window.setTimeout("Tick()", g_dwTimeOutSec*1000); 
}

function Tick()  { 
	if (g_fPlayMode) 
		Next(); 
}

function Prev() { 
	ChangeImage(false); 
}

function Next() { 
	ChangeImage(true); 
}


