//Google Analytics-----------
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21439919-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//---------------------------

root1 = "";
root2 = "";
str = document.location.pathname;
url = document.location.href;

paths = str.split("/");
len = paths.length;
filename = paths[len - 1];

len -= 2;

for (i = len; i > 0; i--)
{
	if (paths[i] == "html" || paths[i] == "")
	{
		break;
	}
	root2 += "../";
}
	

//---
if (url.substring(0,5) == "https")	
{
	root1 = "http://www.mscsys.co.jp/";
}
else
{
	root1 = root2;
}

url1_0 = root1 + "index.html";
url1_1 = root1 + "goaisatu.htm";

url2_0 = root1 + "kigyo/";
url2_1 = root1 + "kigyo/aisatu.htm";
url2_2 = root1 + "kigyo/topics.htm";
url2_3 = root1 + "kigyo/kaisha.htm";
url2_4 = root1 + "kigyo/teikan.htm";
url2_5 = root1 + "kigyo/keireki.htm";
url2_6 = root1 + "kigyo/kyujin.htm";
url2_7 = root1 + "kigyo/map.htm";

url3_0 = root1 + "service/";
url3_1 = root1 + "service/mainservice.htm";
url3_2 = root1 + "service/mediaconv.htm";
url3_3 = root1 + "casestudy/casestudy.htm";

url4_0 = root1 + "ezcd/";
url4_1 = root1 + "ezcd/ezcd_lineup_view.htm";
url4_2 = root1 + "ezcd/ezcd_lineup_auth.htm";
url4_3 = root1 + "ezcd/ezcd_info.htm";
url4_4 = root1 + "ezcd/download.htm";
url4_5 = root1 + "ezcd/ezcd_price.htm";
url4_6 = root1 + "ezcd/ezcdsp.htm";
url4_7 = root1 + "ezcd/dbs/";

//url5_0 = root1 + "form/";
//url5_1 = root1 + "form/ministry/";
//url5_2 = root1 + "form/normal/";
//url5_3 = root1 + "form/software/";
url5_0 = root1 + "formindex.html";
url5_1 = root1 + "formministry/";
url5_2 = root1 + "formnormal/";
url5_3 = root1 + "formsoftware/";

url6_0 = root1 + "privacy/";

url7_0 = root1 + "sitemap.htm";

url8_0 = root1 + "security/";
url9_0 = root1 + "quality/";

img01 = root2 + "images/toppage_logo.gif";
img02a = root2 + "images/menu_btn1a.gif";
img02b = root2 + "images/menu_btn1b.gif";
img03a = root2 + "images/menu_btn2a.gif";
img03b = root2 + "images/menu_btn2b.gif";
img04a = root2 + "images/menu_btn3a.gif";
img04b = root2 + "images/menu_btn3b.gif";
img05a = root2 + "images/menu_btn4a.gif";
img05b = root2 + "images/menu_btn4b.gif";
img06a = root2 + "images/menu_btn5a.gif";
img06b = root2 + "images/menu_btn5b.gif";
img07a = root2 + "images/submenu_btn1a.gif";
img07b = root2 + "images/submenu_btn1b.gif";
img08a = root2 + "images/submenu_btn2a.gif";
img08b = root2 + "images/submenu_btn2b.gif";
img09a = root2 + "images/submenu_btn3a.gif";
img09b = root2 + "images/submenu_btn3b.gif";
img10a = root2 + "images/submenu_btn4a.gif";
img10b = root2 + "images/submenu_btn4b.gif";
img11a = root2 + "images/submenu_btn5a.gif";
img11b = root2 + "images/submenu_btn5b.gif";
img12a = root2 + "images/submenu_btn6a.gif";
img12b = root2 + "images/submenu_btn6b.gif";
img13a = root2 + "images/submenu_btn7a.gif";
img13b = root2 + "images/submenu_btn7b.gif";
img14a = root2 + "images/submenu_btn8a.gif";
img14b = root2 + "images/submenu_btn8b.gif";
img15a = root2 + "images/submenu_btn9a.gif";
img15b = root2 + "images/submenu_btn9b.gif";
img16a = root2 + "images/submenu_btn10a.gif";
img16b = root2 + "images/submenu_btn10b.gif";
img17a = root2 + "images/submenu_btn11a.gif";
img17b = root2 + "images/submenu_btn11b.gif";
img18a = root2 + "images/submenu_btn12a.gif";
img18b = root2 + "images/submenu_btn12b.gif";
img19a = root2 + "images/submenu_btn13a.gif";
img19b = root2 + "images/submenu_btn13b.gif";
img20a = root2 + "images/submenu_btn14a.gif";
img20b = root2 + "images/submenu_btn14b.gif";
img21a = root2 + "images/submenu_btn15a.gif";
img21b = root2 + "images/submenu_btn15b.gif";
img22a = root2 + "images/submenu_btn16a.gif";
img22b = root2 + "images/submenu_btn16b.gif";
img23a = root2 + "images/submenu_btn17a.gif";
img23b = root2 + "images/submenu_btn17b.gif";
img24a = root2 + "images/submenu_btn18a.gif";
img24b = root2 + "images/submenu_btn18b.gif";

//---

document.write('<link rel="shortcut icon" href="' + root2 + 'images/favicon.ico" />');
document.write('<link rel="stylesheet" type="text/css" href="' + root2 + 'js/mscsys.css" />');

//ソフトウェアに関する問い合わせフォームの、アプリケーション項目のコンボボックスを選択した際の処理
function ComboCheck1()
{
	//コンボボックスの選択された内容を取得
	if (document.form1.application != null && document.form1.applicationname != null)
	{
		SelectedItem = document.form1.application.value;
	
		//「その他」だった場合、テキストボックスをEnableにする
		if (SelectedItem == "その他")
		{
			document.form1.applicationname.style.backgroundColor = "#FFFFFF";
			document.form1.applicationname.disabled = "";
		}
		else
		{
			document.form1.applicationname.style.backgroundColor = "#E0E0E0";
			document.form1.applicationname.disabled = "disabled";
		}
	}
}

//DB Sお見積り依頼フォームの、基本データ項目のコンボボックスを選択した際の処理
function ComboCheck2()
{
	//導入をSEに依頼する場合
	if (document.form1.introduction != null)
	{
		SelectedItem3 = document.form1.introduction.value;
	
		//「その他」だった場合、テキストボックスをEnableにする
		if (SelectedItem3 != "全て自社／自団体で対応する" && SelectedItem3 != "")
		{
			document.form1.clientcount.style.backgroundColor = "#FFFFFF";
			document.form1.clientcount.disabled = "";
		}
		else
		{
			document.form1.clientcount.style.backgroundColor = "#E0E0E0";
			document.form1.clientcount.disabled = "disabled";
		}
	}

	//電子化案件の有無
	if (document.form1.havingjob != null)
	{
		SelectedItem2 = document.form1.havingjob.value;
	}
	
	//基本データの有無
	if (document.form1.haveezcddata != null)
	{
		SelectedItem = document.form1.haveezcddata.value;
	
		//「その他」だった場合、テキストボックスをEnableにする
		if (SelectedItem == "イージーCDシステム基本データを所有している")
		{
			document.form1.havingmedia.style.backgroundColor = "#FFFFFF";
			document.form1.havingmedia.disabled = "";
			document.form1.mediacount.style.backgroundColor = "#FFFFFF";
			document.form1.mediacount.disabled = "";
			document.form1.datasize.style.backgroundColor = "#FFFFFF";
			document.form1.datasize.disabled = "";
			document.form1.datasizeunit.style.backgroundColor = "#FFFFFF";
			document.form1.datasizeunit.disabled = "";
			document.form1.recordcount.style.backgroundColor = "#FFFFFF";
			document.form1.recordcount.disabled = "";
			document.form1.havingjob.style.backgroundColor = "#E0E0E0";
			document.form1.havingjob.disabled = "disabled";
				
			//「その他」だった場合、テキストボックスをEnableにする
			if (SelectedItem2 == "電子化の予定はない" || SelectedItem2 == "")
			{
				document.form1.aboutcount.style.backgroundColor = "#E0E0E0";
				document.form1.aboutcount.disabled = "disabled";
			}
			else
			{
				document.form1.aboutcount.style.backgroundColor = "#FFFFFF";
				document.form1.aboutcount.disabled = "";
			}
		}
		else if (SelectedItem == "イージーCDシステム基本データを所有していない")
		{
			document.form1.havingmedia.style.backgroundColor = "#E0E0E0";
			document.form1.havingmedia.disabled = "disabled";
			document.form1.mediacount.style.backgroundColor = "#E0E0E0";
			document.form1.mediacount.disabled = "disabled";
			document.form1.datasize.style.backgroundColor = "#E0E0E0";
			document.form1.datasize.disabled = "disabled";
			document.form1.datasizeunit.style.backgroundColor = "#E0E0E0";
			document.form1.datasizeunit.disabled = "disabled";
			document.form1.recordcount.style.backgroundColor = "#E0E0E0";
			document.form1.recordcount.disabled = "disabled";
			document.form1.havingjob.style.backgroundColor = "#FFFFFF";
			document.form1.havingjob.disabled = "";
			
			//「その他」だった場合、テキストボックスをEnableにする
			if (SelectedItem2 == "電子化の予定はない" || SelectedItem2 == "")
			{
				document.form1.aboutcount.style.backgroundColor = "#E0E0E0";
				document.form1.aboutcount.disabled = "disabled";
			}
			else
			{
				document.form1.aboutcount.style.backgroundColor = "#FFFFFF";
				document.form1.aboutcount.disabled = "";
			}
		}
		else
		{
			document.form1.havingmedia.style.backgroundColor = "#E0E0E0";
			document.form1.havingmedia.disabled = "disabled";
			document.form1.mediacount.style.backgroundColor = "#E0E0E0";
			document.form1.mediacount.disabled = "disabled";
			document.form1.datasize.style.backgroundColor = "#E0E0E0";
			document.form1.datasize.disabled = "disabled";
			document.form1.datasizeunit.style.backgroundColor = "#E0E0E0";
			document.form1.datasizeunit.disabled = "disabled";
			document.form1.recordcount.style.backgroundColor = "#E0E0E0";
			document.form1.recordcount.disabled = "disabled";
			document.form1.havingjob.style.backgroundColor = "#E0E0E0";
			document.form1.havingjob.disabled = "disabled";
			document.form1.aboutcount.style.backgroundColor = "#E0E0E0";
			document.form1.aboutcount.disabled = "disabled";
		}
	}
	
}

