/* 2003 Copyright Genetrack Biolabs Inc. ALL RIGHTS RESERVED */
/* This .JS file contains tip functions for genetrackjapan.com/index.html */

function tipOf() { /* This function gets a random value and select which tip to display in the textarea. */
	var tipID = Math.floor(Math.random()*10); /* Random tip swapping. */
	var tip; /* For tip text. */
	switch (tipID) {
		case 1:
			tip = 'DNA鑑定是現今最先進的親子關係鑑定方式';
			break;
		case 2:
			tip = '“國際規格認證”確保您的鑑定品質';
			break;
		case 3:
			tip = '未出生的胎兒也可進行DNA鑑定';
			break;
		case 4:
			tip = '親子鑑定結果清楚提供您“肯定”或“否定”的答案';
			break;
		case 5:
			tip = '選擇您完全了解、信賴的化驗所';
			break;
		case 6:
			tip = '多一分了解，就少花一分冤枉錢';
			break;
		case 7:
			tip = 'DNA鑑定檢體不限於採集口腔細胞';
			break;
		case 8:
			tip = 'DNA鑑定是現今最先進的親子關係鑑定方式';
			break;
		case 9:
			tip = '“國際規格認證”確保您的鑑定品質';
			break;
		default:
			tip = '選擇您完全了解、信賴的化驗所';
			break;
		}
	document.frmTip.txaTip.value = tip;
	document.frmTip.hdnTip.value = tipID; /* Hidden value for bookmark in tip.html */
}

function tipDe() { /* This function pops up tip.html and scrolls down to the tip the users have clicked. */
	var bm = document.frmTip.hdnTip.value;
	url = 'tip.html#' + bm;
	window.open(url,'','width=450,height=220,scrollbars=1,top=50,left=50,resizable=0,menubar=0,toolbar=0,status=0,location=0');
}