	function ReqpdsContents(ctype) {
		var REQ;
		if(ctype=="wallpaper") {
			locationString="/template/xml/wallpaper.xml";
			REQ = new clsReqXML(locationString, "", getWallpaper);			
		} else if(ctype=="bgm") {
			locationString="/template/xml/bgm.xml";
			REQ = new clsReqXML(locationString, "", getBGM);
		}
		
		REQ.send();
	}
	
	function getWallpaper(XMLResult) {
		var pdsXML = new clsParseXML();
		pdsXML.setXML(XMLResult);
		pdsXML.setXMLName("wallpapers");
		
		var idx, output, thumbImageSrc, previewImageSrc, download1024, download1280;
		var i = 0;
		var contents = "";
		
		pdsXML.setElementName("wallpaper");
		
		contents += "<h3 class=\"barTitle space20\">FreeStyle Wallpaper</h3>";
		contents += "<ul class=\"lstWallpaper\">";
		while(pdsXML.fetchXML()) {
			idx = pdsXML.BindCol("id");
			output = pdsXML.BindCol("output");
			thumbImageSrc = pdsXML.BindCol("thumbImageSrc");
			previewImageSrc = pdsXML.BindCol("previewImageSrc");
			download1024 = pdsXML.BindCol("download1024");
			download1280 = pdsXML.BindCol("download1280");

			if(output !="false") {
				contents += "<li>";
				contents += "<a href=\"" + SImage_SERVER_DOMAIN + previewImageSrc + "\" rel=\"lytebox[theme]\" title=\"\" class=\"btnWallpaper\" onmouseover=\"this.lastChild.src=this.lastChild.src.replace('_off','_on');\" onmouseout=\"this.lastChild.src=this.lastChild.src.replace('_on','_off');\"><img src=\"" + SImage_SERVER_DOMAIN + thumbImageSrc + "\" alt=\"Wallpaper Concept Image\" title=\"\" width=\"170\" height=\"125\" /><img src=\"" + SImage_SERVER_DOMAIN + "/gsp/images/fs/download/btn_view_off.gif\" class=\"btnView\" alt=\"VIEW\" title=\"\" /></a>";
				contents += "<a href=\"" + FS_SERVER_DOMAIN + download1024 + "\" class=\"btnDown1024\"><img src=\"" + SImage_SERVER_DOMAIN + "/gsp/images/fs/download/btn_wallpaper1024.gif\" alt=\"1024x768\" title=\"1027x768\" /></a>";
				contents += "<a href=\"" + FS_SERVER_DOMAIN + download1280 + "\" class=\"btnDown1280\"><img src=\"" + SImage_SERVER_DOMAIN + "/gsp/images/fs/download/btn_wallpaper1280.gif\" alt=\"1280x1024\" title=\"1280x1024\" /></a>";
				contents += "</li>";
			}
			i++;
		}
		contents += "</ul>";
		contents += "<div class=\"clearBoth\"></div>";
		contents += "<hr />";

		SafeInnserHTML("wallpaper", contents);
	}
	
	function getBGM(XMLResult) {
		var pdsXML = new clsParseXML();
		pdsXML.setXML(XMLResult);
		pdsXML.setXMLName("bgms");
		
		var idx, output, title1, title2, desc1, desc2, desc3, coverSrc, playSrc, download;
		var i = 0;
		var contents = "";
		
		pdsXML.setElementName("bgm");
		
		contents += "<h3 class=\"barTitle space20\">FreeStyle BGM</h3>";
		contents += "<ul class=\"lstBGM\">";
		while(pdsXML.fetchXML()) {
			idx = pdsXML.BindCol("id");
			output = pdsXML.BindCol("output");
			title1 = pdsXML.BindCol("title1");
			title2 = pdsXML.BindCol("title2");
			desc1 = pdsXML.BindCol("desc1");
			desc2 = pdsXML.BindCol("desc2");
			desc3 = pdsXML.BindCol("desc3");
			coverSrc = pdsXML.BindCol("coverSrc");
			playSrc = pdsXML.BindCol("playSrc");
			download = pdsXML.BindCol("download");

			if(output !="false") {
				contents += "<li>";
				contents += "<h4 class=\"bgmTitle\">" + title1 + "<span class=\"bgmSing\">" + title2 + "</span></h4>";
				contents += "<p class=\"bgmCover\"><a href=\"" + SImage_SERVER_DOMAIN + playSrc + "\"><img src=\"" + SImage_SERVER_DOMAIN + coverSrc + "\" alt=\"\" title=\"\" /></a></p>";
				contents += "<p class=\"bgmDesc\">";
				contents += desc1 + "<BR/>" + desc2 + "<BR/>" + desc3;
				contents += "<a href=\"" + SImage_SERVER_DOMAIN + playSrc + "\" class=\"btnPlay button type2\"><span class=\"bgl\"><span class=\"bgr\">Play</span></span></a>";
				contents += "<a href=\"" + SImage_SERVER_DOMAIN + download + "\" class=\"btnBGMDown button type3\"><span class=\"bgl\"><span class=\"bgr\">Download</span></span></a>";
				contents += "</p>";
				contents += "</li>";
			}
			i++;
		}
		contents += "</ul>";
		contents += "<div class=\"clearBoth\"></div> <!-- Float bug fix for FF -->";
		contents += "<hr />";
		SafeInnserHTML("bgm", contents);
	}
