<!--
//	author: by Hiroshi Enomoto

function	strPrice( code )
{
	var		priceProduct;
	
	if( ( priceProduct = ip[code][1] ) == -1 )
	{
		return( "price error" );
	}
	return( priceWithComma( priceProduct ) );
}

function	priceWithComma( price )
{
	var cDigit = 0;
	priceComma		= "";
	for( var i = 0 ; price > 0 ; ++i )
	{
		if( cDigit >= 3 )
		{
			priceComma	= "," + priceComma;
			cDigit = 0;
		}
		priceComma	= ( price % 10 ) + priceComma;
		++cDigit;
		price	= ( price - ( price % 10 ) ) / 10;
	}
	return( priceComma );
}

function	strPostJP( code )
{
	if( ( priceProduct = ip[ code ][ 3 ] ) == -1 )
	{
		return( "post error" );
	}
	return( priceWithComma( priceProduct ) );
}

function	dispSiteMap( urlHome, urlEN, urlSP )
{	//	for 日本語用
	document.write( "<table border=\"0\"><tr><td bgcolor=\"#E6994C\">\n" );
	document.write( "<table border=\"0\" cellpadding=\"6\" cellspacing=\"3\"><tr>\n" );
	document.write( "<td bgcolor=\"#FFFFD7\" align=\"center\">\n" );
	document.write( "\t<font size=\"-1\"><a href=\"" + urlHome + "index.html\">ホーム</a></font></td>\n" );
	
	document.write( "</td>\n" );
	if( urlEN != "" )
	{
		document.write( "<td bgcolor=\"#FFE8D3\" align=\"center\">\n" );
		document.write( "\t<font size=\"-1\"><a href=\"" + urlEN + ".html\">English</a></font></td>\n" );
	}
	if( urlSP != "" )
	{
		document.write( "<td bgcolor=\"#FFE8D3\" align=\"center\">\n" );
		document.write( "\t<font size=\"-1\"><a href=\"" + urlSP + ".html\">Espanol</a></font></td>\n" );
	}
	document.write( "</tr></table>\n" );
	document.write( "\n" );
	document.write( "</td></tr></table>\n" );
}

function	dispCategoryMap( currentPageName, lastElementIsAll )
{	//	for 日本語用
	var	ptrAll	= -1;
	document.write( "<tr>\n" );
	if( lastElementIsAll == "all" )
	{
		for( var jj = 0 ; jj < category.length ; ++jj )
		{
			if( category[jj][1] == "all" )	{	break;	}
		}
		ptrAll	= jj;
	}
	for( jj = 0 ; jj < category.length ; ++jj )
	{
		nameCellId	= "";
		if( jj == ptrAll && lastElementIsAll == "all" )
		{
			nameCellId	= " id=\"cellMoreCategory\"";
		}
		if( category[jj][0] == currentPageName )
		{
			tdBgcolor	= "#FFFFD7";
			textColor	= "#177517";
		}
		else
		{
			tdBgcolor	= "#fc7e18";
			textColor	= "white";
		}
		document.write( "\t<td align=\"center\" style=\"background-color: " + tdBgcolor + "\"" + nameCellId + ">\n" );
		document.write( "\t\t<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\"><tr>\n" );
		document.write( "\t\t<td align=\"center\">\n" );
		if( jj == ptrAll && lastElementIsAll == "all" )
		{
			document.write( "\t\t<a href=\"javascript:;\" onMouseOver=\"moreCategory( '', 'white', '" + category[jj][0] + "', 'blue' )\"><div id=\"textMoreCategory\"><font color=\"" + textColor + "\"><b>" + category[jj][0] + "</b></font></div></a>\n" );
		}
		else
		if( category[jj][0] == currentPageName )
		{
			document.write( "\t\t<font color=\"#177517\"><b>" + category[jj][0] + "</b></font>\n" );
		}
		else
		{
			document.write( "\t\t\t<a href=\"" + category[jj][1] + ".html\"><font color=\"white\">" + category[jj][0] + "</font></a>\n" );
		}
		document.write( "\t\t</td></tr></table>\n" );
		document.write( "\t</td>\n" );
		if( jj == ptrAll && lastElementIsAll == "all" )
		{
			++jj;
			break;
		}
	}
	document.write( "</tr>\n" );
	if( lastElementIsAll == "all" )
	{
		document.write( "<tr id=\"trCategoryAll\" style=\"display: none\">\n" );
		document.write( "<td align=\"center\" colspan=\"" + jj + "\" bgcolor=\"white\">\n" );
		document.write( "\t\t<br>\n" );
		document.write( "\t\t<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\" width=\"80%\">\n" );
		for( jj = 0 ; jj < category.length ; ++jj )
		{
			if( category[jj][1] != "all" )
			{
				document.write( "\t\t<tr>\n" );
				document.write( "\t\t\t<td nowrap><a href=\"" + category[jj][1] + ".html\"><font size=\"+1\"><b>" +  category[jj][0] + "</b></font></a></td>\n" );
				document.write( "\t\t\t<td><font style=\"line-height:150%\">" +  category[jj][2] + "</font></td>\n" );
				document.write( "\t\t</tr>\n" );
			}
		}
		document.write( "\t\t</table>\n" );
		document.write( "\t\t<br>\n" );
		document.write( "\t\t<a href=\"javascript:;\" onclick=\"moreCategory( 'none', '" + tdBgcolor + "', '" + category[ptrAll][0] + "', '" + textColor + "' )\">Close</a><br>\n" );
		document.write( "\t\t<br>\n" );
		document.write( "\t</td>\n" );
		document.write( "</tr>\n" );
	}
}

function	moreCategory( display, bgcolor, nameText, nameColor )
{
	document.getElementById( "cellMoreCategory" ).style.backgroundColor	= bgcolor;

	document.getElementById( "textMoreCategory" ).innerHTML	= "<a href=\"javascript:;\" onMouseOver=\"moreCategory( '', 'white', '" + nameText + "', 'blue' )\"";
	document.getElementById( "textMoreCategory" ).innerHTML	+= "<div id=\"textMoreCategory\"><font style=\"color: " + nameColor + ";\"><b>" + nameText + "</b></font></div></a>";

//	document.getElementById( "textMoreCategory" ).innerHTML	= "<a href=\"javascript:;\" onMouseOver=\"moreCategory( '', 'white', '" + nameText + "', 'blue' )\"<div id=\"textMoreCategory\"><font style=\"color: " + nameColor + ";\"><b>" + nameText + "</b></font></div></a>";

	document.getElementById( "trCategoryAll" ).style.display	= display;
}

function	dispContentsGroupProduct( noTD, nameArray )
{
	document.write( "\t\t<tr>\n" );
	document.write( "\t\t\t<td align=\"center\">\n" );
	document.write( "\t\t\t\t<table cellpadding=\"5\" border=\"0\">\n" );
	document.write( "\t\t\t\t<tr>\n" );
	for( var ii = 0 ; ii < nameArray.length ; ++ii )
	{
		document.write( "\t\t\t\t\t<td align=\"center\" bgcolor=\"#FFFFD7\"><a href=\"#" + nameArray[ii][1] + "\">" + nameArray[ii][0] + "</a></td>\n" );
		if(( ii % parseInt( noTD ) == parseInt( noTD ) - 1 )  && ( ii+1 < nameArray.length ))
		{
			document.write( "\t\t\t\t</tr>\n" );
			document.write( "\t\t\t\t<tr>\n" );
		}
	}
	document.write( "\t\t\t\t</tr>\n" );
	document.write( "\t\t\t\t</table>\n" );
	document.write( "\t\t\t</td>\n" );
	document.write( "\t\t</tr>\n" );
}

function	dispNameGroupProduct( nameAtag, nameGroupProduct )
{
	document.write( "\t\t<table border=\"0\" cellpadding=\"10\" cellspacing=\"3\" width=\"100%\"><tr>\n" );
	document.write( "\t\t<tr>\n" );
	document.write( "\t\t\t<td align=\"center\" bgcolor=\"#95FFCC\">\n" );
	document.write( "\t\t\t\t<a name=\"" + nameAtag + "\">\n" );
	document.write( "\t\t\t\t<font size=\"+2\" color=\"#FF4D4D\"><b>" + nameGroupProduct + "</b></font>\n" );
	document.write( "\t\t\t\t</a>\n" );
	document.write( "\t\t\t</td>\n" );
	document.write( "\t\t</tr></table>\n" );
}

function	dispFooterInPage( email, homepage, dateLastUpdate )
{
	document.write( "<table border=\"0\" width=\"600\"><tr>\n" );
	document.write( "<td width=\"33%\"><font size=\"-1\"><a href=\"mailto:" + email + "@oq83.jp\">Email</a></font></td>\n" );
	document.write( "<td width=\"33%\" align=\"center\"><font size=\"-1\"><a href=\"" + homepage + "\">Home</a></font></td>\n" );
	document.write( "<td width=\"33%\" align=\"right\"><font size=\"-1\">Last Update: " + dateLastUpdate + "</font></td>\n" );
	document.write( "</tr></table>\n" );
}

function	procOnload()
{	//	現在何もなし
}
//!-->

