﻿function imgSlide(strCHK) {
	this.name		= "clipSlide" + strCHK;
	this.item			= new Array();
	this.itemcount		= 0;
	this.startPoint		= 0;
	
	this.add = function () {
		this.itemcount = arguments.length - 1;
		
		for (intNUM = 0; intNUM < arguments.length; intNUM++) {
			this.item[intNUM] = arguments[intNUM];
		}
	};
	
	this.startHTML = function(intSTART, strDIV, intCOUNT, intPAGE) {
		this.startPoint	= intSTART;
		
		var strHTML	= "";
		var intNUM2	= 0;
		var intNUM3	= 0;
		var intNUM4	= 0;
		var strTEMP	= "";
		
		if (intCOUNT < intPAGE) {
			intNUM3 = intCOUNT;
		} else {
			intNUM3 = intPAGE;
		}

		strHTML += "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
		for (intNUM = 0; intNUM < intNUM3; intNUM++) {
			strTEMP = this.item[intSTART + intNUM2].split("|//|");
			if (strTEMP[0] == "MAIN_OUT") {
				strHTML += "<td>";
				strHTML += "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
				strHTML += "<td width=\"103\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
				strHTML += "<tr><td><a href=\""+ strTEMP[4] +"\" onFocus=\"blur()\"><img src=\""+ strTEMP[9] +"\" width=\"103\" height=\"72\"></a></td></tr><tr><td height=\"5\"></td>";
				strHTML += "</tr><tr><td align=\"center\"><a href=\""+ strTEMP[4] +"\" onFocus=\"blur()\"><font class=\"gray9px_b\">"+ strTEMP[1] +"</font></a></td>";
				strHTML += "</tr></table></td><td><img widht=\"1\" height=\"1\"></td></tr></table>";
				strHTML += "</td>";
			} else {
				if (intNUM != 0) {
					if (strTEMP[0] == "MAIN") {
						strHTML += "<td width=\"15\"></td>";
					} else {
						strHTML += "<td width=\"7\"></td>";
					}
				}
				
				if (strTEMP[0] == "OUT") {
					strHTML += "<td valign=\"top\">";
					strHTML += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"140\"><tr>";
					strHTML += "<td><a href=\""+ strTEMP[4] +"\" onFocus=\"blur()\"><img src=\""+ strTEMP[9] +"\" width=\"120\" height=\"90\"></a></td>";
					strHTML += "</tr><tr><td height=\"5\"></td></tr><tr>";
					strHTML += "<td><font class=\"gray9px_b\">"+ strTEMP[1] +"</font></td>";
					strHTML += "</tr><tr><td style=\"padding:1,0,5,0;\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
					
					for (intNUM4 = 1; intNUM4 <= 5; intNUM4++) {
						if (parseInt(strTEMP[10]) >= intNUM4) {
							strHTML += "<td><img src=\"/images/engage/icon_star2_on.gif\"></td>";
						} else {
							strHTML += "<td><img src=\"/images/engage/icon_star2.gif\"></td>";
						}
					}
					
					strHTML += "</tr></table></td></tr><tr>";
					strHTML += "<td><font class=\"gray9px\"><font class=\"orange9px\"><b>"+ strTEMP[3] +"</b> ~</font></td>";
					strHTML += "</tr></table>";
					strHTML += "</td>";
				} else {
					strHTML += "<td valign=\"top\">";
					strHTML += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"124\"><tr>";
					strHTML += "<td class=\"seoul\"  height=\"100\"><a href=\""+ strTEMP[4] +"\" onFocus=\"blur()\"><img src=\""+ strTEMP[9] +"\" width=\"120\" height=\"96\"></a></td>";
					strHTML += "</tr><tr><td height=\"5\"></td></tr><tr>";
					strHTML += "<td><font class=\"gray9px_b\"><a href=\""+ strTEMP[4] +"\" onFocus=\"blur()\"><font class=\"gray9px_b\">"+ strTEMP[1] +"</font></a></font></td>";
					strHTML += "</tr><tr><td><font class=\"gray8px\">"+ strTEMP[5] +"</font></td></tr><tr>";
					strHTML += "<td><font class=\"gray9px\"><s>"+ strTEMP[2] +"</s></font><img src=\"/images/inc/icon/icon_arrow.gif\"><font class=\"orange9px\"><b>"+ strTEMP[3] +"</b></font></td>";
					strHTML += "</tr><tr><td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>";
					
					if (strTEMP[6] == 1) {strHTML += "<img src=\"/images/inc/icon/icon_event.gif\" hspace=\"1\">";}
					if (strTEMP[7] == 1) {strHTML += "<img src=\"/images/inc/icon/icon_single.gif\" hspace=\"1\">";}
					if (strTEMP[8] == 1) {strHTML += "<img src=\"/images/inc/icon/icon_sale.gif\" hspace=\"1\">";}
					
					strHTML += "</td></tr></table></td></tr></table>";
					strHTML += "</td>";
				}
			}
			
			if ((intSTART + intNUM2) >= this.itemcount) {
				intSTART = 0;
				intNUM2 = 0;
			} else {
				intNUM2++;
			}
		}
		strHTML += "</tr></table>";
		
		document.getElementById("imgROOL_"+ strDIV).innerHTML = strHTML;
	};
	
	this.prevIMG = function(strDIV, intCOUNT, intPAGE) {
		if (this.startPoint == 0) {
			eval("img_Slide_"+ strDIV).startHTML(this.itemcount, strDIV, intCOUNT, intPAGE);
		} else {
			eval("img_Slide_"+ strDIV).startHTML(this.startPoint - 1, strDIV, intCOUNT, intPAGE);
		}
	};
	
	this.nextIMG = function(strDIV, intCOUNT, intPAGE) {
		if (this.startPoint == this.itemcount) {
			eval("img_Slide_"+ strDIV).startHTML(0, strDIV, intCOUNT, intPAGE);
		} else {
			eval("img_Slide_"+ strDIV).startHTML(this.startPoint + 1, strDIV, intCOUNT, intPAGE);
		}
	};
} 