/*製品コード取得*/
window.onload=function(){
	var	myLocation	= window.location;
		imgPath		= (myLocation.port)?'':'http://a248.e.akamai.net/f/248/9338/20m/www.sourcenext.com';
		genArray	= new Array('kid','sel','sys','use','hob','ent')
	if(myLocation.search){
		myProfile=new Array();
		var mySearch=myLocation.search.replace(/\?/,'').split('&');
		for(i=0; mySearch.length>i; i++){
			var temp=mySearch[i].split('=');
			myProfile[temp[0]]=temp[1];
		}
	}
	if(myLocation.pathname.match(/list/ig)){
/*		makeInnerHTML();*/
		var xmlURI='./'+myProfile['xml']+'.xml?i='+Math.ceil(Math.random()*1000);
		makeInnerHTML();
		requestFileList(xmlURI);
	}else{
		var xmlURI='/downstall/product/'+genArray[myProfile['gen']]+'/'+myProfile['ID']+'.xml?i='+Math.ceil(Math.random()*1000);

		makeInnerHTML();
		requestFile(xmlURI);
	}
}

/*HTTPアラート*/
var	alertMsg=new Array();
	alertMsg[401]='認証が必要です';
	alertMsg[403]='アクセスできませんでした';
	alertMsg[404]='ファイルが見つかりませんでした';
	alertMsg[500]='内部サーバー・エラー';
	alertMsg[503]='サーバーが利用不可';

/*難易度表記*/
var	difficultyArray= new Array('初心者','中級者','上級者')
var	dsLevelArray= new Array('','★','★★')

/*DOM操作用*/
function $(ID){
	return document.getElementById(ID);
}
function $$(tagName){
	return document.getElementsByTagName(tagName);
}

/*****************************************************
#Objet d'import de javascript .js
******************************************************/
function ImportJS() {
	var nbr_att = arguments.length;
	var js_effets=document.createElement("script");
	js_effets.setAttribute("type", "text/javascript");
	js_effets.setAttribute("src", arguments[0]);
	if(nbr_att>1){
		for (var i = 1; i<nbr_att; i++){
			js_effets.setAttribute(arguments[i][0], arguments[i][1]);
		}
	}
	$$("head")[0].appendChild(js_effets);
}

function xmlTag(xmlObj,tag,num){
	num=(num)? num:0;
	var	temp	= (xmlObj.getElementsByTagName(tag))?xmlObj.getElementsByTagName(tag):false;
	return (temp[num])?temp[num].firstChild.nodeValue.replace(/\n/ig,'<br />'):'-';
}

/*XMLobject作成*/
function createXMLHttp(){
    if (window.XMLHttpRequest) {
        return(new XMLHttpRequest());
    } else if (window.ActiveXObject) {
        try {
            return(new ActiveXObject("Msxml2.XMLHTTP"));
        } catch(e) {
            return(new ActiveXObject("Microsoft.XMLHTTP"));
        }
    } else {
        return(false);
    }
}
/*wiki構文もどき処理*/
function wiki(str){
	var	HTML	= new String();
		HTML	= ('∴∵'+str).replace(/∴∵''([^'])/ig,'∴∵\'\'\'$1');
		HTML	= HTML.replace(/\(R\)/ig,'&reg;').replace(/\(C\)/ig,'&copy;').replace(/\(TM\)/ig,'&#8482;');
		HTML	= HTML.replace(/\（R）/ig,'&reg;').replace(/（C）/ig,'&copy;').replace(/（TM）/ig,'&#8482;');
		HTML	= HTML.replace(/'''(.*?)'''/ig,'<strong>$1</strong>').replace(/\(\((.*?)\)\)/ig,'<span style="font-size:80%;">$1</span>').replace(/<<(.*?)>>/ig,'<span style="font-size:80%;">$1</span>').replace(/\((.*?)\|(.*?)\)/ig,'<a href="$2" target="_blank">$1</a>').replace(/∴∵/,'');
	return HTML
}

/* ジャンルリンク */
function makeGenreLink(num) {
var HTML	= new Array(); 
	HTML[0]	='<a href="/downstall/list/index_genre.html?xml=gen_0"><span class="kid">■</span>子供向け</a>'
	HTML[1]	='<a href="/downstall/list/index_genre.html?xml=gen_1"><span class="sel">■</span>自己啓発</a>'
	HTML[2]	='<a href="/downstall/list/index_genre.html?xml=gen_2"><span class="sys">■</span>システム</a>'
	HTML[3]	='<a href="/downstall/list/index_genre.html?xml=gen_3"><span class="use">■</span>実用</a>'
	HTML[4]	='<a href="/downstall/list/index_genre.html?xml=gen_4"><span class="hob">■</span>趣味</a>'
	HTML[5]	='<a href="/downstall/list/index_genre.html?xml=gen_5"><span class="ent">■</span>娯楽</a>'
	return(HTML[num])
}


/*ダウンロードサイズチェック*/
function chkDLsize(num){
	var	DL	= new String();
		DL	= (num*1/1024>1)?Math.ceil(num*1/1024*10)/10+'GB':Math.ceil(num*10)/10+'MB';
	return '<a href="javascript:sizeWindow('+num+');">ダウンロードサイズ</a>：'+DL;
}

/* マイル数 */
function showMileage(num){
	return '<span>'+num+'</span>マイル'
}
/*製品仕様*/
function makeSystem(xmlObject){
	var systemHTML	= new String();
		systemHTML	+= '<H3>こんなパソコンで使えます</H3><UL>';
		systemHTML	+= '<li>'+wiki(xmlTag(xmlObject,'os'))+'</li>';
		systemHTML	+= '<li>'+wiki(xmlTag(xmlObject,'requirements'))+'</li>';
		systemHTML	+= '<li>'+wiki(xmlTag(xmlObject,'others'))+'</li>';
		systemHTML	+= '</UL>'
		return systemHTML.replace(/<li>-<\/li>/ig,'').replace(/<UL><\/UL>/ig,'').replace(/<H3>こんなパソコンで使えます<\/H3>/ig,'');
}

/*カート*/
function makeCart(ID,type){
var btnType	= new Array();
	btnType['ダウンロード']		='<p><a href="https://www.sourcenext.com/eshop/action/es_cartadd?com_id='+ID+'&amp;quantity=1"><img onmouseover="this.src=\'/cp/img/pageitem/cart_no_o.gif\'" onmouseout="this.src=\'/cp/img/pageitem/cart_no.gif\'" src="//a248.e.akamai.net/f/248/9338/20m/www.sourcenext.com/cp/img/pageitem/cart_no.gif" alt="カートに入れる" border="0" height="27" width="138"></a></p>'
	btnType['ダウンストール']	='<p><a href="https://www.sourcenext.com/eshop/action/es_cartadd?com_id='+ID+'&amp;campaignID=DS0000000001"><img onmouseover="this.src=\'/img/common_img/cart_ds_o.jpg\'" onmouseout="this.src=\'/img/common_img/cart_ds.jpg\'" src="//a248.e.akamai.net/f/248/9338/20m/www.sourcenext.com/img/common_img/cart_ds.jpg" alt="カートに入れる" border="0" height="33" width="138"></a></p>'
var HTML	= 	new String();
	HTML	+=	'<div class="cart">';
	HTML	+=	(type=='ダウンロード')?'<DIV class=caption>ダウンロード版</DIV><div></div>':'';
	HTML	+=	btnType[type];
	HTML	+=	'</div>';
	return (ID=='-')? '':HTML;
}

/*桁取り*/
function ketatori(num){
	return (num!='-')?num.replace( /([0-9]+?)(?=(?:[0-9]{3})+$)/g , '$1,' ):'';
}

/*価格表記*/
function myPrice(num1,num2){
	var priceHTML	= new String();
	if(num1==num2){
		priceHTML	= '<P><SPAN>eSHOP価格</SPAN> <strong>'+ketatori(num1)+'</strong><strong><SPAN>円</SPAN></strong><SPAN><SPAN>（税込）</SPAN></SPAN></P>'
	}else{
		priceHTML	=	(num1.match(/オープン/))?'<P><SPAN>オープン価格</SPAN></P>':'<P><SPAN>標準価格 '+ketatori(num2)+'円<SPAN>（税込）</SPAN></SPAN></P>';
		priceHTML	+=	'<p class="sankaku">▼</p>'
		priceHTML	+=	'<P class="red"><SPAN>eSHOP価格</SPAN> <strong>'+ketatori(num1)+'</strong><strong><SPAN>円</SPAN></strong><SPAN><SPAN>（税込）</SPAN></SPAN></P>'
	}
	return priceHTML;
}

/*製品情報・XML読み込み*/
function requestFile(fileName) {
	var	difficultyArray	= new Array('初心者','中級者','上級者')
	var	dsLevelArray	= new Array('','★','★★')
	var	priceArray		= new Array();
	
	var xmlhttp = createXMLHttp();
    if (!xmlhttp) alert("XMLHttpRequest非対応のブラウザです。");
    xmlhttp.onreadystatechange = function (){
		if (xmlhttp.readyState == 4){
			if(xmlhttp.status == 200){
				xmlObject=xmlhttp.responseXML;
				if(xmlTag(xmlObject,'maker').match(/ソースネクスト/)){
					window.location.href='/titles/'+genArray[xmlTag(xmlObject,'genrecode')]+'/'+xmlTag(xmlObject,'code')+'/?lef=DS' 
				}else{
					var	myID	= xmlTag(xmlObject,'code');
					var	myName	= xmlTag(xmlObject,'productName').replace(/\(R\)/ig,'&reg;').replace(/\(C\)/ig,'&copy;').replace(/\(TM\)/ig,'&#8482;');
					$('productName').innerHTML 	= myName.replace(/\(R\)|（R）/ig,'&reg;').replace(/\(C\)|（C）/ig,'&copy;').replace(/\(TM\)|（TM）/ig,'&#8482;');
					$('pImag').innerHTML 		= '<img src="/img/product_img/'+myID+'_l.gif" title="'+myName+'" border="0" height="140" width="100">';
	
	
					$('genrecode').innerHTML	= makeGenreLink(xmlTag(xmlObject,'genrecode'));
	
					$('genre').innerHTML 		= xmlTag(xmlObject,'genre');
					$('summary').innerHTML 		= xmlTag(xmlObject,'summary');
					$('outline').innerHTML 		= wiki(xmlTag(xmlObject,'outline'));
					$('difficulty').innerHTML	= difficultyArray[xmlTag(xmlObject,'difficulty')];
					$('maker').innerHTML 		= xmlTag(xmlObject,'maker');
					$('dsllev').innerHTML		= dsLevelArray[xmlTag(xmlObject,'dsllev')];
					$('dlsize').innerHTML 		= chkDLsize(xmlTag(xmlObject,'dlsize'));
					$('mileage').innerHTML 		= showMileage(xmlTag(xmlObject,'mileage'));
					/*特定製品コードの例外処理*/
	
	
					var	tempMes	=(myID.match(/-------------/))?'':'ダウンストールなら5％OFF';
	
					var	TEMP				= (priceArray[xmlTag(xmlObject,'eShopPrice').toString()])?'<p style="font-size:80%; margin-bottom:-1.5em; color:#e00; text-align:center;">'+ tempMes +'<br>特別価格 '+ketatori(priceArray[xmlTag(xmlObject,'eShopPrice').toString()].toString())+'円（税込）</p>':'';
					$('priceBox').innerHTML = myPrice(xmlTag(xmlObject,'eShopPrice'),xmlTag(xmlObject,'basePrice'))
					$('cartBox').innerHTML 	= TEMP+makeCart(xmlTag(xmlObject,'com_ID2'),'ダウンストール')+makeCart(xmlTag(xmlObject,'com_ID1'),'ダウンロード');
	
/*
					$('mileage').innerHTML 		= xmlTag(xmlObject,'mileage');
					$('release').innerHTML		= xmlTag(xmlObject,'release');
					$('keyWord').innerHTML		= xmlTag(xmlObject,'keyWord');
*/
					var tempHTML	=	'<li>●'+xmlTag(xmlObject,'feature1')+'</li>\n';
						tempHTML	+=	'<li>●'+xmlTag(xmlObject,'feature2')+'</li>\n';
						tempHTML	+=	'<li>●'+xmlTag(xmlObject,'feature3')+'</li>\n';
	
					$('feature').innerHTML		= '\n'+tempHTML+'\n';
					var	temp	= xmlTag(xmlObject,'notes');
					$('notes').innerHTML		= wiki(temp);
					$('notesBox').style.display	=(temp.length<5)?'none': 'block';
	
					if(xmlTag(xmlObject,'notes').length>10){
						var HTML	= new String();
							HTML += '<DIV ID="notesBox">\n<h4>重要</h4>\n';
							HTML += '<p ID="notes">'+wiki(xmlTag(xmlObject,'notes'))+'</p>\n</DIV>'
					}
					$('support').innerHTML	= 'サポート先：<A href="javascript:exMenu(\'treeMenu1\')">'+xmlTag(xmlObject,'maker')+'</A>';
					$('treeMenu1').innerHTML= (xmlTag(xmlObject,'maker').match(/ソースネクスト/))? $('treeMenu1').innerHTML:wiki(xmlTag(xmlObject,'support'));
					$('system').innerHTML	= makeSystem(xmlObject);
	
					var	temp	= xmlTag(xmlObject,'agrement');
					$('agrement').innerHTML		= wiki(temp);
					$('kyodaku3').style.display	=	$('kyodaku2').style.display	= (temp.length<5)?'none': 'block';
					var	temp	= xmlObject.getElementsByTagName('explanation');
					var li1		= new Array();
					var li2		= new Array();
					kinouArray	= new Array();
					for(var i=0; i<temp.length; i++){
						kinouArray[i]	=wiki(xmlTag(xmlObject,'explanation',i));
						var	display	= (i>0)?'none':'block';
						li1[i]		= '<li><a href="javascript:void($(\'textBox\').innerHTML=kinouArray['+i+']);void(changeImage('+i+'));">'+xmlTag(xmlObject,'name',i)+'</a></li>';
						$('imgPool').innerHTML	+= '<img src="'+imgPath+'/downstall/product/img/'+myProfile['ID']+'/'+(i+1)+'.jpg">';
	
					}
					$('kinou').innerHTML		= '\n'+li1.join('\n')+'\n';
					$('textBox').innerHTML	= xmlTag(xmlObject,'explanation',0);
					$('screenImage').style.backgroundImage	= 'url('+imgPath+'/downstall/product/img/'+myProfile['ID']+'/1.jpg)';
					(xmlTag(xmlObject,'maker').match(/ソースネクスト/))?requestSYSfile(myID):'';
					requestFAQfile(myID);
					$$('body')[0].style.display='block'
				}
			}else{
				alert(alertMsg[xmlhttp.status]);
			}
		}
	}
    xmlhttp.open("GET", fileName+'?+Math.ceil(Math.Math.random()*10)+' , true);
    xmlhttp.send(null);
}
/*スクリーンショット切り替え*/
function changeImage(num){
//	$('screenImage').innerHTML	= '<img src="'+imgPath+'/downstall/product/img/'+myProfile['ID']+'/'+(num+1)+'.jpg" border="0">';
	$('screenImage').style.backgroundImage	= 'url('+imgPath+'/downstall/product/img/'+myProfile['ID']+'/'+(num+1)+'.jpg)';
}

function display(ID,length){
	var displayArray= new Array()
	for(var i=0; i<length; i++){
		displayArray[i]=new Array($('tBox'+i).style,(i==ID)? 'block':'none');
	}
	for(var i=0; i<length; i++){
		displayArray[i][0].display=	displayArray[i][1];
	}
}

function po(str){
	var HTML= str;
	HTML	= HTML.replace(/\n/g,'∴∴');
	HTML	= HTML.replace(/\r/g,'∴∴');
	HTML	= HTML.replace(/∴∴∴∴/g,'∴∴');
	HTML	+= '∴';
	return(HTML);
}
/*FAQ*/
function requestFAQfile(fileName) {
	var xmlhttp2 = createXMLHttp();
    if (!xmlhttp2) alert("XMLHttpRequest非対応のブラウザです。");
    xmlhttp2.onreadystatechange = function (){
		if (xmlhttp2.readyState == 4){
			if(xmlhttp2.status == 200){
				var	HTML	= '∴'+xmlhttp2.responseText;
					HTML	= po(HTML);
					HTML	= HTML.replace(/∴Q\.(.*?)∴/g,'<dt class="faq-q">Q.$1</dt>\n');
					HTML	= HTML.replace(/∴A\.(.*?)∴/g,'<dd class="faq-a">A.$1</dd>\n');
					HTML	= HTML.replace(/∴(.*?)∴/g,'<dd>$1</dd>\n');
					HTML	= HTML.replace(/\(R\)/ig,'&reg;');
					HTML	= HTML.replace(/\(TM\)/ig,'&#8482;');
					HTML	= HTML.replace(/∴/g,'');
					HTML	= HTML.replace(/\/\/\//ig,'<br />');
					HTML	= HTML.replace(/\(\((.*?)\|(.*?)\)\)/g,'<a href="$2">$1</a>');
					HTML	= HTML.replace(/∴/g,'');
					$('qaHTML').innerHTML		= HTML;
					$('FAQ').style.display	=(HTML.length>20)? 'block':'none';
			}else{
//				alert(alertMsg[xmlhttp2.status]);
			}
		}
	}
    xmlhttp2.open("GET", '/produce/qa/'+fileName+'.txt?+Math.ceil(Math.Math.random()*10)+' , true);
    xmlhttp2.send(null);
}
/*SYSTEM*/
function createList(str){
	return(str.replace(/安心サービス/,'<a href="/support/free/">安心サービス</a>').replace(/([^∴])※/g,'$1<span class="caption">※</span>').replace(/∴※(.*?)∴/g,'<li class="note">※$1</li>\n').replace(/∴\[(.*?)\]∴/g,'<li class="b">$1</li>\n').replace(/∴●(.*?)∴/g,'<li>$1</li>\n').replace(/∴/g,''));
}
function requestSYSfile(fileName) {
	var xmlhttp3 = createXMLHttp();
    if (!xmlhttp3) alert("XMLHttpRequest非対応のブラウザです。");
    xmlhttp3.onreadystatechange = function (){
		if (xmlhttp3.readyState == 4){
			if(xmlhttp3.status == 200){
				var	sysDoc	= xmlhttp3.responseText;
					sysDoc	= po(sysDoc);
					sysDoc	= sysDoc.replace(/\(C\)/ig,'&copy;');
					sysDoc	= sysDoc.replace(/\(R\)/ig,'&reg;');
					sysDoc	= sysDoc.replace(/\(TM\)/ig,'&#8482;');
					sysDoc	= sysDoc.replace(/\(\((.*?)\|(http.*?:\/\/.*?)\)\)/g,'<a href="$2" target="_blank">$1</a>（別ウィンドウで開きます）');
					sysDoc	= sysDoc.replace(/\(\((.*?)\|(http.*?:\/\/.*?)\|(.*?)\)\)/g,'<a href="$2" target="_blank">$1</a>（$3のページが別ウィンドウで開きます）');
					sysDoc	= sysDoc.replace(/\/\/\//ig,'<br />');
					sysDoc.match(/【製.*?】∴(.*?)∴【こ.*?】∴(.*?)∴【ご.*?】∴(.*?)∴【著.*?】∴(.*?)∴【サ.*?】∴(.*?)∴【(.*?)】∴(.*?)∴【マイル】∴∴(.*?)∴$/);
		
				var	systemHTML		= new String(RegExp.$2);
				var	warningHTML		= new String(RegExp.$3);
				var	supportHTML		= new String(RegExp.$5);
				var	supportSUB		= new String(RegExp.$6);
				var	conditionHTML	= new String(RegExp.$7);

				var	HTML			=	new String();
					HTML			+=	'<h2>こんなパソコンで使えます</h2>'
					HTML			+=	'<ul>'+createList(systemHTML)+'</ul>';
					HTML			+= (warningHTML.length>15)?'<h2>ご注意</h2><ul>'+createList(warningHTML)+'</ul>':'';
					supportHTML		= createList(supportHTML);
					conditionHTML	= createList(conditionHTML);
					$('system').innerHTML		= HTML.replace(/∴/g,'');
					$('support1').innerHTML	= (supportHTML.length<15)?	$('support1').innerHTML:'<strong>サポート情報</strong><ul>'+supportHTML.replace(/∴/g,'')+'</ul>';
					$('support2').innerHTML	= (conditionHTML.length<15)?$('support2').innerHTML:'<strong>'+supportSUB.replace(/∴/g,'')+'</strong>\n<ul>'+conditionHTML.replace(/∴/g,'')+'</ul>';
			}else{
//				alert(alertMsg[xmlhttp3.status]);
			}
		}
	}
    xmlhttp3.open("GET", '/produce/system/'+fileName+'.txt?+Math.ceil(Math.Math.random()*10)+' , true);
    xmlhttp3.send(null);
}

/*製品一覧*/
/*製品一覧情報・XML読み込み*/
function requestFileList(fileName) {
	var xmlhttp = createXMLHttp();
    if (!xmlhttp) alert("XMLHttpRequest非対応のブラウザです。");
    xmlhttp.onreadystatechange = function (){
		if (xmlhttp.readyState == 4){
			if(xmlhttp.status == 200){
				xmlObject	= xmlhttp.responseXML;
				/*index作成*/
				itemIndex	= new Array();

				temp	= xmlObject.getElementsByTagName('item');
				indexCode	= new Array();
				indexName	= new Array();
				indexMaker	= new Array();
				indexGenre	= new Array();
				indexColor	= new Array();
				indexDSlv	= new Array();
				indexDiff	= new Array();
				indexPrice	= new Array();
				var	TEMP	= new String();
				for(var i=0;i<temp.length; i++){
					var	j= new Number()
					var	_maker	= xmlTag(temp[i],'maker');
					
					var myURI	= (_maker.match(/ソースネクスト/))?'/titles/'+genArray[xmlTag(temp[i],'genrecode')]+'/'+xmlTag(temp[i],'code')+'/?lef=DSlst': '/downstall/product/?gen='+xmlTag(temp[i],'genrecode')+'&ID='+xmlTag(temp[i],'code');
					indexName[i]	= new Array(xmlTag(temp[i],'productName'),i,myURI);
					indexMaker[i]	= new Array(_maker,i,myURI);
					indexGenre[i]	= new Array(xmlTag(temp[i],'genre'),i,myURI);
					indexColor[i]	= new Array(xmlTag(temp[i],'genrecode'),i,myURI);
					indexDSlv[i]	= new Array(xmlTag(temp[i],'dsllev'),i,myURI);
					indexDiff[i]	= new Array(xmlTag(temp[i],'difficulty'),i,myURI);
					indexPrice[i]	= new Array((xmlTag(temp[i],'eShopPrice')*1+100000000),i,myURI);
				}
				itemAlign(indexName,temp,true)
			}else{
				alert(alertMsg[xmlhttp.status]);
			}
		}
	}
    xmlhttp.open("GET", fileName+'?+Math.ceil(Math.Math.random()*10)+' , true);
    xmlhttp.send(null);
}
/*並べ替え*/
function itemAlign(array,listXMLobj,tgl){
	var genrecode	= new Array('kid','sel','sys','use','hob','ent');
	var cTgl	= true;
	var Top='<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse">';
	var End='</table>';
	var	TEMP	= new String();
		(tgl)?array.sort():array.reverse();
	for(var i=0;i<array.length; i++){
		var	_maker	= xmlTag(listXMLobj[array[i][1]],'maker');
		var bColor	= (cTgl)?'#f1efea':'#e8e4da';
		var cColor	= (cTgl)?'bar1':'bar2';
			TEMP	+='<tr class="'+cColor+'" onmouseover="this.style.backgroundColor=\'#fff\'" onmouseout="this.style.backgroundColor=\''+bColor+'\'" onclick="location.href=\''+array[i][2]+'\'">';
			TEMP	+='<td class="'+genrecode[xmlTag(listXMLobj[array[i][1]],'genrecode')]+'">■</td>';
			TEMP	+='<td>'+xmlTag(listXMLobj[array[i][1]],'genre')+'</td>';
			TEMP	+='<td class="seihinmei">'+wiki(xmlTag(listXMLobj[array[i][1]],'productName'))+'</td>';
			TEMP	+='<td>'+wiki(xmlTag(listXMLobj[array[i][1]],'summary'))+'</td>';
			TEMP	+='<td>'+ketatori(xmlTag(listXMLobj[array[i][1]],'eShopPrice'))+'円</td>';
			TEMP	+='<td>'+_maker+'</td>';
			TEMP	+='<td>'+dsLevelArray[xmlTag(listXMLobj[array[i][1]],'dsllev')]+'</td></tr>';
			cTgl=!cTgl;
	}
	HTML='<tr id="btnTR">';
	HTML+='<th onClick="itemAlign(indexColor,temp,true);"  class="sort1" onmouseover="this.style.backgroundColor=\'#fff\'" onmouseout="this.style.backgroundColor=\'#e8e4da\'">';
	HTML+='<!--img onClick="itemAlign(indexColor,temp,true);" src="/downstall/img/index/arrow2.gif" style="vertical-align:middle" /><br--><img onClick="itemAlign(indexColor,temp,false);" src="/test/downstall/img/sort_v3_c.gif" width="15" height="15" style="vertical-align:middle"/>';
	HTML+='</th>';
	HTML+='<th onClick="itemAlign(indexGenre,temp,true);" width="10%" class="sort1" onmouseover="this.style.backgroundColor=\'#fff\'" onmouseout="this.style.backgroundColor=\'#e8e4da\'">'
	HTML+='<img src="/test/downstall/img/sort_v3_c.gif" width="15" height="15" style="vertical-align:middle;" />'
	HTML+=' 中ジャンル</th>';
	HTML+='<th onClick="itemAlign(indexName,temp,true)" style="padding:3px;" width="20%" class="sort1" onmouseover="this.style.backgroundColor=\'#fff\'" onmouseout="this.style.backgroundColor=\'#e8e4da\'"><img src="/test/downstall/img/sort_v3_c.gif" width="15" height="15" style="vertical-align:middle" />	 製品名</th>';
	HTML+='<th width="43%" >ひと言説明文</th>';
	HTML+='<th onClick="itemAlign(indexPrice,temp,true)"  width="7%" class="sort1" onmouseover="this.style.backgroundColor=\'#fff\'" onmouseout="this.style.backgroundColor=\'#e8e4da\'"><img src="/test/downstall/img/sort_v3_c.gif" width="15" height="15" style="vertical-align:middle" /> 価格</th>';
	HTML+='<th onClick="itemAlign(indexMaker,temp,true)"  width="13%" class="sort1" onmouseover="this.style.backgroundColor=\'#fff\'" onmouseout="this.style.backgroundColor=\'#e8e4da\'"><img src="/test/downstall/img/sort_v3_c.gif" width="15" height="15" style="vertical-align:middle" /> メーカー</th>';
	HTML+='<th onClick="itemAlign(indexDSlv,temp,true)"  width="7%" class="sort1" onmouseover="this.style.backgroundColor=\'#fff\'" onmouseout="this.style.backgroundColor=\'#e8e4da\'"><img src="/test/downstall/img/sort_v3_c.gif" width="15" height="15" style="vertical-align:middle" /> ';
	HTML+='<span style="font-size:90%">ダウンストールレベル</span></th></tr>';

	$('bar_top').innerHTML=Top+HTML+TEMP+End;

}

function btn(num,tgl){
	
}

//以下、汎用Script//
/*折りたたみ*/
function exMenu(tName) {
	tMenu = $(tName).style;
	tMenu.display = (tMenu.display == 'block') ? 'none' : 'block' ;
}
/*ダウンロードサイズ*/
function sizeWindow(num) {
	if(window.nwin){
		window.nwin.close();
	}
	nwin = window.open("/dl/simulation.html?"+num,"mileWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,WIDTH=475,HEIGHT=360");
	window.nwin.focus();
}


/*汎用*/

function open_window(url) {
	(window.nwin)?	window.nwin.close():void(0);
	nwin = window.open(url,"nwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,WIDTH=640,HEIGHT=480");
	window.nwin.focus();
}
