//データ
var new_stocks  = new Array(
'2010/02/24','Dust To Dearth(Aus) / Lysergene(UK)|The Death Of The Sun|20100224002832|CD',
'2010/02/23','Vociferian(Fra)|Glorificia Bestials|20100223081553|CD',
'2010/02/22','Night Must Fall(Fin)|Funeral Of Mankind|20060614222724|CD==Mad V(Rus)|War Is The Same|20080304014150|CD==Habsyll(Fra)|MMVIII|20090501011230|digi-CD==Sidus Tenebrarum(Ita)|Born from the Dark Rib|20100222213543|CD==Abyssphere(Rus)|Images and Masks|20100222225448|digi-CD==Sculptor(Rus)|Dark October|20100222231432|CD',
'2010/02/21','Morbifer(Pol)|Moroi|20100221145905|CD==Torture Eternal(Swe)|Mentally Killed Before the Birth|20100221151832|CD==Cryptic Tales(Pol)|Anathema|20100221202431|CD==Soul Snatcher(Pol)|Pylons Of Dispersion/Azazel|20100221220732|CD==Ferosity(Pol)|Primordial Cruelty|20100221232438|CD',
'2010/02/20','gallileous(Pol)|Equideus|20100219201708|CD==Nebiros(Ger)|Stacheldraht|20100219205029|CD==Joyless(Nor) / Dekadent Aesthetix(Rom)|Split|20100220113934|7"==Arizmenda(USA)|Within the Vacuum of Infinity...|20100220122927|Pro Cass.==Nebiros(Ger)|Komando 666|20100220134956|CD',
'2010/02/19','Belketre(Fra)|Ambre Zuetki Vuordrevartre|20081126023552|CD==Varathron(Grc)|Walpurgisnacht|20081130233211|CD'
);

//スクリプト
var max = 20;
function makeNewStocks(lang){
	var diSEMBOWELMENT = '';//more new stocks flag
	var langflag = '';
	var tables = '';
	var howmany = 1;
	if(lang == 'jp'){
		langflag = '_j';
	}
	for(var i=0; i<new_stocks.length; i+=2){
		tables += '<span class="newstock_date">: : ' + new_stocks[i] + ' : :</span><br />\n';
		tables += '<ul>\n';
		var this_stuffs = new_stocks[i+1].split("==");
		for(var j=0; j<this_stuffs.length; j++){
			var this_datas = this_stuffs[j].split("|");
			tables += '<li>' + this_datas[0] + '<br />\n';
			tables += '<a href="' + top_url + 'cgi-bin/webstore/store' + langflag + '.cgi?pmode=detail&selected_id=' + this_datas[2] + '">';
			tables += '"' + this_datas[1] + '" - ' + this_datas[3] + '</a></li>\n';
			howmany++;
			if(howmany > max){
				if(this_stuffs.length > (j+1)){
					diSEMBOWELMENT = 'on';
				}
				break;
			}
		}
		tables += '</ul>\n<br />\n';
		if(howmany > max){
			diSEMBOWELMENT = 'on';
			break;
		}
	}
	
	if(diSEMBOWELMENT){
			tables += '&gt;&gt;<a href="' + top_url + 'webstore_datas/newstock_' + lang + '.html" target="newstocks" onclick="var newstocks = window.open(\'' + top_url + 'webstore_datas/newstock_' + lang + '.html\',\'newstocks\',\'width=500, height=600,resizable, scrollbars\'); newstocks.focus(); return false;">more new stocks</a>\n';
	}
	document.write(tables);
}
