//home (English)

//random solutions
function randomSol(which,displayNum) {
	var ramdomLine;
	var ramdomItems;
	var solution3dItems = new Array ();
	var solutionBsdItems = new Array ();
	var solutionStorageItems = new Array ();
	//Solution items for 3D analysis
	solution3dItems[0] = '<a href="/english/solutions/3d/d_engineer/index.html">Can design department get feedback of measurement data?</a>';
	solution3dItems[1] = '<a href="/english/solutions/3d/d_engineer/index.html">Do you possess the means for quality maintenance and improvement?</a>';
	solution3dItems[2] = '<a href="/english/solutions/3d/d_engineer/index.html">Are you using general-purpose system that does not fit your business?</a>';
	solution3dItems[3] = '<a href="/english/solutions/3d/communication/index.html">Is the volume of 3D data too heavy to share in the network environment?</a>';
	solution3dItems[4] = '<a href="/english/solutions/3d/communication/index.html">Is the data from design, manufacturing department effectively utilized at other department?</a>';
	solution3dItems[5] = '<a href="/english/solutions/3d/communication/index.html">Is the product shape clearly presented to the Internet users?</a>';
	solution3dItems[6] = '<a href="/english/solutions/3d/communication/index.html#item_02">Are you satisfied with traceability only by texts?</a>';
	//Business solution items
	solutionBsdItems[0] = '<a href="/english/solutions/bsd/p_arrange/index.html">Is new construction/switch of product line going as planned?</a>';
	solutionBsdItems[1] = '<a href="/english/solutions/bsd/p_manage/index.html">Is your time occupied with handwritten daily production report?</a>';
	solutionBsdItems[2] = '<a href="/english/solutions/bsd/inventory/index.html">Is increase in inventory cost compressing the profit?</a>';
	solutionBsdItems[3] = '<a href="/english/solutions/bsd/inventory/index.html#item_02">Are you suffering from complex ordering work?</a>';
	solutionBsdItems[4] = '<a href="/english/solutions/bsd/equipment/index.html">Is running cost of your facility increasing?</a>';
	solutionBsdItems[5] = '<a href="/english/solutions/bsd/others/index.html">Is main system of your company utilized among departments?</a>';
	//Solution items for storage system
	solutionStorageItems[0] = '<a href="/english/solutions/storage/s_manage/index.html">Are you in trouble with finding a file?</a>';
	solutionStorageItems[1] = '<a href="/english/solutions/storage/s_manage/index.html#item_02">Do you have a hard time managing increasing backups?</a>';
	solutionStorageItems[2] = '<a href="/english/solutions/storage/s_manage/index.html#item_03">Is capacity expansion of file server taking your time?</a>';
	switch (which) {
		case 'solution3d':
			ramdomLine = solution3dItems.length;
			ramdomItems = solution3dItems;
			break;
		case 'solutionBsd':
			ramdomLine = solutionBsdItems.length;
			ramdomItems = solutionBsdItems;
			break;
		case 'solutionStorage':
			ramdomLine = solutionStorageItems.length;
			ramdomItems = solutionStorageItems;
			break;
	}
	//select items at random
	var ramdomItems2 = new Array();
	for (i=0;i<displayNum;i++) {
		var ramdomOK = 1;
		var ramdomNum = Math.floor(Math.random()*ramdomLine);
		for (j=0;j<i+1;j++) {
			if (ramdomItems[ramdomNum]==ramdomItems2[j]) {
				ramdomOK = 0;
				i--;
				break;
			}
		}
		if (ramdomOK==1) {
			ramdomItems2[i] = ramdomItems[ramdomNum];
			document.write("<li>",ramdomItems2[i],"</li>");
		}
	}
}

//ramdom banner
function randomAdv() {
	m = 0, x = 0, y = 0;
	ad  = new Array();
	adv = new Array();
	hit = new Array();
	//input relative percentage into 'hit'
	hit[0] = 1; adv[0] = '<a href="/english/products/3d/3d_magic/index.html"><img src="/images/banner/3dmagic.gif" alt="3D Magic 2000" width="158" height="63" border="0"><br>Visualized inspection, judgement of acceptance with 3D CMM on a product</a>';
	hit[1] = 3; adv[1] = '<a href="/english/products/storage/remotebackup/index.html"><img src="/english/images/banner/remotebackup.gif" alt="NASadapter Remote Site Backup" width="158" height="45" border="0"><br>In preparation for wide-area disaster, important data is backed up in a remote site</a>';
	hit[2] = 1; adv[2] = '<a href="/english/products/therma/therma_cntrl/index.html"><img src="/english/images/banner/therma.gif" alt="Therma-Slab" width="158" height="45" border="0"><br>Floor heating system to keep an entire building at a comfortable temperature</a>';
	for(i=0; i<=hit.length - 1; i++) {
		m += hit[i];
	}
	n = Math.floor(Math.random() * m);
	n++;
	for(i=0;i<=hit.length-1;i++) {
		x = y;
		y += hit[i];
		if(x<n && n<=y) {
			ad = adv[i];
		}
	}
	document.write('<li>',ad,'</li>');
	document.write('<li><img src="/images/global/dots160.gif" alt="" width="160" height="1"></li>');
}