	function xmlList() {
		this.initList = initList;
		
		this.pageURL = "";
		this.pagePath = "";
		
		this.queryString_keys = new Array();
		this.queryString_values = new Array();
		
		this.npage = 1;
		this.pageterm = 10;
		this.listnum = 10;
		
		this.xmlDoc = null;
		this.xmlSection = null;
		
		this.otherParameter = "";

		this.getParameter = getParameter;
		this.getOtherParameter = getOtherParameter;
		this.syncXMLDocument = syncXMLDocument;
		this.geonlyfileName = geonlyfileName;

		this.getList = getList;
		this.getNavigation = getNavigation;
		this.getNavigationN = getNavigationN;
		
		this.getPrevLink = getPrevLink;
		this.getNextLink = getNextLink;
		this.getListLink = getListLink;
		
		this.prevArtURL;
		this.nextArtURL;

		this.setText = setText;
		this.getText = getText;
	}


	function getPrevLink(prevStr) {
		if (this.prevArtURL != null) {
			document.write ("<a href=" + this.prevArtURL + ">"+prevStr+"</a>")  
		} else {
			document.write (prevStr);
		}
	}
	
	function getNextLink(nextStr) {
		if (this.nextArtURL != null) {
			document.write ("<a href=" + this.nextArtURL + ">"+nextStr+"</a>");
		} else {
			document.write (nextStr);
		}
	}
	
	function getListLink(listStr, listUrl) {
		if (listUrl != null) {
			if(listUrl.indexOf("?") == -1)
				listUrl += "?npage=" + this.npage;
			else
				listUrl += "&npage=" + this.npage;
			
			document.write ("<a href=" + listUrl + ">"+listStr+"</a>");
		}
	}
	
	function initList( xmlListFileUrl, listnum, pageterm) {
		pageHref = self.location.href ;
		if(listnum != null) this.listnum = listnum;
		if(pageterm != null) this.pageterm = pageterm;

		try {
			if ( pageHref.indexOf('?') >=0 )
			{ 
				this.pageURL = pageHref.substring(0, pageHref.indexOf('?'));
			}
			else
			{
				this.pageURL = pageHref;
			}
		}
		catch(e) 
		{
			this.pageURL = '';
		}
		
		
		var query = self.location.search.substring(1);
		var pairs = query.split("&");
		for ( var i = 0; i < pairs.length; i++ )
		{
			var pos = pairs[i].indexOf('=');
			if ( pos >= 0 )
			{
				var argname = pairs[i].substring( 0, pos );
				var value = pairs[i].substring(pos+1);
				this.queryString_keys[this.queryString_keys.length] = argname;
				this.queryString_values[this.queryString_values.length] = value;
			}
		}

		this.npage = this.getParameter('npage');
		if (this.npage == null) {
			this.npage = 1;
		} else if (this.npage < 1) {
			this.npage = 1;
		}
		
		this.otherParameter = this.getOtherParameter('npage');
		
		this.xmlDoc = this.syncXMLDocument(this.geonlyfileName(xmlListFileUrl));
		this.xmlSection = this.xmlDoc.getElementsByTagName('a');
	}
	
	function getOtherParameter( key ) {
		var value = "";
		for ( var i = 0; i < this.queryString_keys.length; i++ )
		{
			if ( this.queryString_keys[i] != key )
			{
				value += this.queryString_keys[i] + "=" + this.queryString_values[i] + "&";
			}
		}
		return value;
	}
	
	function getParameter( key ) {
		var value = null;
		for ( var i = 0; i < this.queryString_keys.length; i++ )
		{
			if ( this.queryString_keys[i] == key )
			{
				value = this.queryString_values[i];
				break;
			}
		}
		return value;
	}
	

	function syncXMLDocument(filename) {
		if (document.implementation && document.implementation.createDocument) 
		{
			// Mozilla
			private_xmlDoc = document.implementation.createDocument("", "", null);
		}else if (window.ActiveXObject) 
		{
			// MSIE 5.x later
			private_xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		}
		private_xmlDoc.async="false"
		private_xmlDoc.load(filename);
		return private_xmlDoc;
	}

	function geonlyfileName( HTTPaddress ) {
		if ( HTTPaddress.toUpperCase().indexOf('HTTP://') > -1 ) 
			filename = HTTPaddress.substring(HTTPaddress.lastIndexOf('/')+1, HTTPaddress.length );
		else
			filename = HTTPaddress;
		
		return filename;
	}

	function getList() {
		intNowPage = this.npage;
		listnum = this.listnum; 
		intBlockPage = this.pageterm;
		
		intTotalPage = this.xmlSection.length / listnum;
		intTemp = ((intNowPage - 1) / intBlockPage) * intBlockPage + 1;
		intLoop = (intTemp-1) * listnum;
		
		htmlSource = document.all("xlist").innerHTML;
		headSource = htmlSource.substring( 0, htmlSource.indexOf("<!--xRoofStart-->"));
		bodySource = htmlSource.substring( htmlSource.indexOf("<!--xRoofStart-->")+"<!--xRoofStart-->".length, htmlSource.indexOf("<!--xRoofEnd-->"));
		bottomSource = htmlSource.substring(htmlSource.indexOf("<!--xRoofEnd-->")+"<!--xRoofEnd-->".length, htmlSource.length);

		tmpbodySource = headSource;
		while ( (intLoop < ((intTemp-1) * listnum) + listnum ) && intLoop < this.xmlSection.length ) {
			childs = this.xmlSection[intLoop].childNodes;
			
			catId = childs[0].text;
			artId = childs[1].text;
			catId2 = childs[0].text;
			artId2 = childs[1].text;
			artTitle = childs[2].text;
			artImage = childs[3].text;
			artText = childs[4].text;
			tvNum = childs[5].text;
			startDate = childs[6].text;
			payMent = childs[7].text;
			gnVod = childs[8].text;
			hiVod = childs[9].text;
			ckLine = childs [10].text;

			artText= artText.replace("<!--I-ON Communications ICSS ArtText Start-->","");
			artText= artText.replace("<!--I-ON Communications ICSS ArtText End-->","");

			limit = 40;
			if (artTitle.length > limit) {
				artTitle = artTitle.substring(0, limit-2);
				artTitle += "...";
			}

			artImageText = ""
			if(artImage != "") {
				artImageText = "<img src='" + artImage + "' width='118' height='66' class='imgline3' border='0'>";
			}

			if(tvNum != "") {
				tvNum = "[" + tvNum + "È¸]";
			}

			hiVodButton = ""
			if (hiVod == "t") hiVod = gnVod;
			if(hiVod != "") {
				hiVodButton = "<img src='http://img.golf.sbs.co.kr/www/common/btn_high.gif' vspace='5' border='0' alt='°íÈ­Áú' style='cursor:hand'>";
			}

			tmpSource = bodySource;
			tmpSource = tmpSource.replace("<!--ArtIndex-->",intLoop);
			tmpSource = tmpSource.replace("<!--CatId-->",catId);
			tmpSource = tmpSource.replace("<!--ArtId-->",artId);
			tmpSource = tmpSource.replace("<!--CatId2-->",catId2);
			tmpSource = tmpSource.replace("<!--ArtId2-->",artId2);
			tmpSource = tmpSource.replace("<!--ArtTitle-->",artTitle);
			tmpSource = tmpSource.replace("<!--ArtImage-->",artImage);
			tmpSource = tmpSource.replace("<!--ArtImageYn-->",artImageText);
			tmpSource = tmpSource.replace("<!--ArtText-->",artText);
			tmpSource = tmpSource.replace("<!--TvNum-->",tvNum);
			tmpSource = tmpSource.replace("<!--StartDate-->",startDate);
			tmpSource = tmpSource.replace("<!--Gn_Vod_Link-->",gnVod);
			tmpSource = tmpSource.replace("<!--Hi_Vod_Link-->",hiVod);
			tmpSource = tmpSource.replace("<!--Payment-->",payMent);
			tmpSource = tmpSource.replace("<!--Check_Line-->",ckLine);
			tmpSource = tmpSource.replace("<!--Check_HighVod-->",hiVodButton);
			tmpbodySource += tmpSource;

			intLoop++;
		}
		tmpbodySource +=  bottomSource;
		document.all("xlist").innerHTML = tmpbodySource;
	}
	
	function getNavigation(firstTermStr, lastTermStr, prevTermStr, nextTermStr, currColor, sMark, eMark) 
	{
		if(currColor == null)
			currColor = "red"
		
		countPerPage = this.listnum;
		currPageNo = this.npage;
		pagePerScreen = this.pageterm;
		totalCnt = this.xmlSection.length;

		countOfCurrScreen = 0;
		tmpCnt = parseInt((currPageNo - 1 )/ pagePerScreen) * (countPerPage * pagePerScreen);
		if(totalCnt > tmpCnt ){
			tmpCnt2 = countPerPage * pagePerScreen + 1;
			if(totalCnt > tmpCnt2) {
				if((totalCnt - tmpCnt) < (countPerPage * pagePerScreen)){
					countOfCurrScreen = (totalCnt - tmpCnt);
				}else{
	countOfCurrScreen = tmpCnt2;
				}
			}else{
				countOfCurrScreen = totalCnt;
			}
		}

		xscreen = parseInt((currPageNo-1) / pagePerScreen);
		npage = xscreen*pagePerScreen + 1;
		maxpage = parseInt((countOfCurrScreen / countPerPage) + ((countOfCurrScreen % countPerPage) == 0 ? 0 : 1)) ;
		mPage = parseInt(totalCnt/countPerPage) + ((countOfCurrScreen % countPerPage) == 0 ? 0 : 1);
		
		if (countOfCurrScreen == 0) 
			maxpage = 0 ;
		
		result = "" ;
		if (totalCnt > 0) {
			result += "<a href=" +this.pageURL + "?npage=" + 1 + "&"+this.otherParameter+ ">"+firstTermStr+"</a>";
		}

		if (xscreen > 0) {
			result += "<a href=" +this.pageURL + "?npage=" + (npage - 1) + "&"+this.otherParameter+ ">"+prevTermStr+"</a>";
			
		}
		
		i = 1;
		while(true){
			if ((i > pagePerScreen) || (i > maxpage)) 
				break ;
			if (npage == currPageNo)
				result += sMark+"<font color="+currColor+"><b>" + npage + "</b></font>"+eMark;
			else
				result += sMark+"<a href=" +this.pageURL + "?npage=" + npage + "&"+this.otherParameter + " class='history'>" + npage + "</a>"+eMark;
			npage++ ; 
			i++ ;
		}

		if (countPerPage * pagePerScreen < countOfCurrScreen){
			result += "<a href=" +this.pageURL + "?npage=" + npage + "&"+this.otherParameter + ">"+nextTermStr+"</a>";
		}

		if (totalCnt > 0) {
			result += "<a href=" +this.pageURL + "?npage=" + mPage + "&"+this.otherParameter + ">"+lastTermStr+"</a>";
		}

		document.write (result);
	}

	function getNavigationN() 
	{
		
		countPerPage = this.listnum;
		currPageNo = this.npage;
		pagePerScreen = this.pageterm;
		totalCnt = this.xmlSection.length;

		countOfCurrScreen = 0;
		tmpCnt = parseInt((currPageNo - 1 )/ pagePerScreen) * (countPerPage * pagePerScreen);
		if(totalCnt > tmpCnt ){
			tmpCnt2 = countPerPage * pagePerScreen + 1;
			if(totalCnt > tmpCnt2) {
				if((totalCnt - tmpCnt) < (countPerPage * pagePerScreen)){
					countOfCurrScreen = (totalCnt - tmpCnt);
				}else{
	countOfCurrScreen = tmpCnt2;
				}
			}else{
				countOfCurrScreen = totalCnt;
			}
		}

		xscreen = parseInt((currPageNo-1) / pagePerScreen);
		npage = xscreen*pagePerScreen + 1;
		maxpage = parseInt((countOfCurrScreen / countPerPage) + ((countOfCurrScreen % countPerPage) == 0 ? 0 : 1)) ;
		mPage = parseInt(totalCnt/countPerPage) + ((countOfCurrScreen % countPerPage) == 0 ? 0 : 1);
		
		if (countOfCurrScreen == 0) 
			maxpage = 0 ;
		
		result = "" ;
		if (totalCnt > 0) {
			result += "<a href=" +this.pageURL + "?npage=" + 1 + "&"+this.otherParameter+ ">Ã³À½</a>";
		}

		if (xscreen > 0) {
			result += "<a href=" +this.pageURL + "?npage=" + (npage - 1) + "&"+this.otherParameter+ " class='prev'>ÀÌÀü</a>";
		}
		
		i = 1;
		while(true){
			if ((i > pagePerScreen) || (i > maxpage)) 
				break ;
			if (npage == currPageNo)
				result += "<a href='#'>" + npage + "</a>";
			else
				result += "<a href=" +this.pageURL + "?npage=" + npage + "&"+this.otherParameter + ">" + npage + "</a>";
				npage++ ; 
				i++ ;
		}

		if (countPerPage * pagePerScreen < countOfCurrScreen){
			result += "<a href=" +this.pageURL + "?npage=" + npage + "&"+this.otherParameter + " class='next'>´ÙÀ½</a>";
		}

		if (totalCnt > 0) {
			result += "<a href=" +this.pageURL + "?npage=" + mPage + "&"+this.otherParameter + ">³¡</a>";
		}

		document.write (result);
	}

	function setText(artIndex){
		childs = this.xmlSection[artIndex].childNodes;
			catId = childs[0].text;
			artId = childs[1].text;
			catId2 = childs[0].text;
			artId2 = childs[1].text;
			artTitle = childs[2].text;
			artImage = childs[3].text;
			artText = childs[4].text;
			tvNum = childs[5].text;
			startDate = childs[6].text;
			payMent = childs[7].text;
			gnVod = childs[8].text;
			hiVod = childs[9].text;
			ckLine = childs [10].text;

			artText= artText.replace("<!--I-ON Communications ICSS ArtText Start-->","");
			artText= artText.replace("<!--I-ON Communications ICSS ArtText End-->","");
	}

	function getText(artIndex, idx){
		childs = this.xmlSection[artIndex].childNodes;
			return childs[idx].text;

	}

