/* 2008-10-30 GEOKOSMOS Japan LLC.  K.Nakaizumi */

function InitializeMenu()
{
	var path = window.location.href; 
	var Index = path.substring(path.lastIndexOf('/', path.length) + 1, path.lastIndexOf('.', path.length)); 
	var Cnt = 0;
	
	Index = (Index == 'index' || Index == 'n.com/') ? '10' : Index;

	if (parseInt(Index, 10) < 10)
	{
		while(document.getElementById('tab' + Cnt))
		{
			document.getElementById('tab' + Cnt).className = (parseInt(Index, 10) == Cnt) ? 'selected' : 'tab';
			document.getElementById('sheet' + Cnt).className = (parseInt(Index, 10) == Cnt) ? "cursheet" : "nonsheet";
			Cnt++;
		}
	}
	else
	{
		while(document.getElementById('menu' + Cnt))
		{
			document.getElementById('menu' + Cnt).style.Color = (parseInt(Index, 10) == Cnt) ? '#ffffff' : '#dddddd';
			Cnt++;
		}
	}
	
	/*if (navigator.language == "ja" || navigator.systemLanguage == "ja" || navigator.userLanguage == "ja" || navigator.browserLanguage == "ja")
	{
		document.getElementById("tab3").style.backgroundImage = "url(images/tab3j.gif)";
		document.getElementById("tab3").removeChild(document.getElementById("tab3").childNodes.item(0));
		document.getElementById("tab3").appendChild(document.createTextNode("ALICE LABS"));

		document.getElementById("sheet3").removeChild(document.getElementById("sheet3").childNodes.item(0));
		document.getElementById("sheet3").innerHTML = "<div class='servicepanel'><h2></h2><img src='images/sheet3j.jpg' alt='' /></div>";


	}*/
}


var w = window;
var t;

function openViewCustom(url, w1, h1, target)
{
    	if ((w == window) || w.closed || t != target)
    	{
        	w = open(url, target, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+w1+",height="+h1);
        	t = target;
    	}
    	else
    	{
        	w.location = url;
        	w.focus();
     	}
     	return false;
}

