// ----------------------------------------------------------------------
// - WSSS JavaScript
// ----------------------------------------------------------------------

/*
< Procedure >
1. If the link of a menu is clicked, the submit_wsss() method of Java Script will be called and a menu code will be passed as an argument.
	Menu-Name			Menu-Code
	Download Manuals		MA
	Download Drivers		DR
	Technical Specifications	TS
	Frequently Asked Questions	FA
	Interactive Troubleshooting	TR
2. checkBrowser() method is called within a submit_wsss() method.
   Acquisition of a browser name, and acquisition of OS name.
   When the return value of checkBrowser() method is true (a browser except [ Netscape4x ]), submitWsssForm() method is called and a menu code is passed as an argument.
   When the return value of checkBrowser() method is false (a browser is Netscape4x), a submitWsssFormNN4 () method is called and a menu code is passed as an argument.
   false is returned when OS is MAC.
3. By submitWsssForm() method, the menu code received as an argument is set and submited to form form_wsss.
   submit point is set to alpha01.
4. By the submitWsssFormNN4 () method, the menu code received as an argument is set and submited to form form_wsss_nn4.
   submit point is set to alpha02.
*/

// ----------------------------------------------------------------------
// - submit_wsss
// - A browser check method (checkBrowser) is called and a return value distributes submit point.
// ----------------------------------------------------------------------
	function wsss_submitWsssForm(m){
		if(wsss_checkBrowser()) {
			wsss_submitWsssFormIE(m);
		} else {
			wsss_submitWsssFormNN4(m);
		}
	}
// ----------------------------------------------------------------------
// - checkBrowser
// - A browser name acquisition method (getBrowserName) is called and the name of a browser is acquired.
// - Then, the version information on a browser is acquired.
// - true is returned when a browser is Netscape4x.
// - false is returned when a browser is except Netscape4x.
// - false is returned when OS is MAC.
// ----------------------------------------------------------------------
	function wsss_checkBrowser() {
		var browserName = wsss_getBrowserName();
		var platformName = wsss_getPlatformName();
		var st;
		var versionInfo;
		var version;
		var flgNN4 = true;

		if(browserName == "Netscape") {
		        
			versionInfo  = navigator.appVersion;
			
			st = versionInfo.indexOf(" ", 0);
			version = versionInfo.substring(0, 1);
			
			if(version ==4) {
				flgNN4 = false;
			}
		}

		if(platformName == "MAC") {
			flgNN4 = false;
		}

		return flgNN4;
	}
// ----------------------------------------------------------------------
// - getBrowserName
// - A browser name is acquired and a browser name is returned as a return value.
// - "Netscape" / "Internet Explorer" / "Other"
// ----------------------------------------------------------------------
	function wsss_getBrowserName() {
		var browserName = navigator.appName.toUpperCase();

		if(browserName.indexOf("NETSCAPE") >= 0) {
			return "Netscape";
		} else if(browserName.indexOf("MICROSOFT") >= 0) {
			return "Internet Explorer";
		} else {
			return "Other";
		}
	}
// ----------------------------------------------------------------------
// - getPlatformName
// - A platform name is acquired and a platform name is returned as a return value.
// - "WIN" / "MAC" / "Other"
// ----------------------------------------------------------------------
	function wsss_getPlatformName() {
		var platformName = navigator.platform.toUpperCase();

		if(platformName.indexOf("WIN") >= 0) {
			return "WIN";
		} else if(platformName.indexOf("MAC") >= 0) {
			return "MAC";
		} else {
			return "Other";
		}
	}
// ----------------------------------------------------------------------
// - submitWsssForm
// - The menu code received as an argument is set to form form_wsss.
// - Then, a new window is opened and submit is carried out.
// - action of form form_wsss is alpha01.
// ----------------------------------------------------------------------
	function wsss_submitWsssFormIE(m){

		document.form_wsss.menu.value=m;
		document.form_wsss.action="http://alpha01u.c-wss.com/wsss/ApplServlet?SV=WWUCA900";
		wsssWin = window.open('', 'wsss','toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=720,height=450');
		wsssWin.focus();

		document.form_wsss.submit();
	}
// ----------------------------------------------------------------------
// - submitWsssFormNN4
// - The menu code received as an argument is set to form form_wsss_nn4.
// - Then, a new window is opened and submit is carried out.
// - action of form form_wsss_nn4 is alpha02.
// ----------------------------------------------------------------------
	function wsss_submitWsssFormNN4(m){

		document.form_wsss.menu.value=m;
		document.form_wsss.action="http://alpha02u.c-wss.com/wsss/ApplServlet?SV=WWUCA900";
		wsssWin = window.open('', 'wsss','toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=720,height=450');
		wsssWin.focus();

		document.form_wsss.submit();
	}
