﻿function random_link(){
var product_title=new Array()
product_title[1]= "立體聲藍芽耳機"
product_title[2]= "藍芽無線鍵盤滑鼠組"
product_title[3]= "KOHJINSHA S37 迷你7吋平版筆記型電腦"
product_title[4]= "隨心所欲自由配超值主機"
product_title[5]= "極緻品味家庭多媒體中心"
product_title[6]= "HP LaserJet M1005 多功能雷射事務機"
product_title[7]= "華碩ASUS MW221U 22吋LCD"
product_title[8]= "SanDisk 4G 原廠終身保固記憶卡"
product_title[9]= "VOSONIC VP5500 新世代多功能數位相簿"
product_title[10]="炫彩行動硬碟"
product_title[11]="Seagate 3.5吋 500G 32M SATAII 超大容量硬碟"
product_title[12]="GIGABYTE 影音行動硬碟"
product_title[13]="快譯通新聲代影音手寫電子辭典"
product_title[14]="造型網路攝影機"
product_title[15]="Optoma U2 數位家庭DVD投影機"
product_title[16]="NU 行動類比電視電影院"
product_title[17]="8G 超大容量優質隨身碟"
product_title[18]="AMD Phenom X4 9600 2.3Ghz 四核心電腦處理器"

var product_note=new Array()
product_note[1]= "讓演唱會的環場音效圍繞雙耳，享受歷時現場的動聽感覺！"
product_note[2]= "一堆電線纏來纏去搞得焦頭爛哦？無線一舉解決線路煩惱！"
product_note[3]= "上班讀書任何時候都很方便攜帶，簡短的文件報告就輸入這裡吧！"
product_note[4]= "外觀、顏色、機種和內容物任你隨搭隨買，人性化的選擇與價錢！"
product_note[5]= "在家享受立體環繞音響與超大螢幕的視覺刺激震撼。"
product_note[6]= "只要買上這一台，讓你家裡多出三個位置，也不用四處跑！"
product_note[7]= "超寬大螢幕直接讓你眼睛享受刺激，玩遊戲看電影最佳選擇！"
product_note[8]= "各種尺寸和容量記憶卡，手機相機ＭＰ３裝得進去就能吃檔案！"
product_note[9]= "不僅講求畫素解析度和容量，連外觀都棒人客做到精緻美觀！"
product_note[10]="又炫又彩踢掉黑色的沉悶感，讓你隨身攜帶各種影片和遊戲到處玩！"
product_note[11]="就是超大容量吸引你的目光，不要在家喊硬碟不夠，買啦！"
product_note[12]="車上多媒體還有交換網路間的小秘密擁有這台就對了啦！"
product_note[13]="扔掉手上那台黑白詞彙又不多的辭典，趕緊敗一台多功能又可以增加字彙的辭典！"
product_note[14]="和遠在外地的親人、戀人和友人享受即時的見面聊天感覺，一解相思之愁！"
product_note[15]="讓生活多點悠哉的閒情逸致，想像戰爭的大畫面你自己身歷其境吧！"
product_note[16]="走在路上隨時收聽收看時事新聞和娛樂戲劇，不容錯過的時刻再也不錯過！"
product_note[17]="把你電腦的重要檔案全部封存包裝進隨身碟內，開會絕對不會ｍｉｓｓ"
product_note[18]="讓你的電腦多兩顆心臟跑得比黑豹還快速又不容易當績！"

var product_money=new Array()
product_money[1]= "299"
product_money[2]= "880"
product_money[3]= "32000"
product_money[4]= "7990"
product_money[5]= "3600"
product_money[6]= "7480"
product_money[7]= "9000"
product_money[8]= "399"
product_money[9]= "4990"
product_money[10]="2000"
product_money[11]="4350"
product_money[12]="2250"
product_money[13]="5990"
product_money[14]="599"
product_money[15]="29900"
product_money[16]="12900"
product_money[17]="899"
product_money[18]="7790"

var product_link=new Array()
product_link[1]= "http://hibid.hinet.net/searchaction.do?searchkey=%E8%97%8D%E8%8A%BD+or+%E8%97%8D%E7%89%99&categoryid=1190&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
product_link[2]= "http://hibid.hinet.net/searchaction.do?searchkey=%E8%97%8D%E8%8A%BD+or+%E8%97%8D%E7%89%99&categoryid=852&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
product_link[3]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=758"
product_link[4]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=732"
product_link[5]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=1819"
product_link[6]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=862"
product_link[7]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=781"
product_link[8]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=1074"
product_link[9]= "http://hibid.hinet.net/searchaction.do?searchkey=%E6%95%B8%E4%BD%8D+and+%E7%9B%B8%E7%B0%BF&categoryid=0&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
product_link[10]="http://hibid.hinet.net/searchaction.do?searchkey=%E8%A1%8C%E5%8B%95+and+%E7%A1%AC%E7%A2%9F&categoryid=0&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
product_link[11]="http://hibid.hinet.net/subcategoryaction.do?categoryid=802"
product_link[12]="http://hibid.hinet.net/searchaction.do?searchkey=MP4+and+%E7%A1%AC%E7%A2%9F&categoryid=0&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
product_link[13]="http://hibid.hinet.net/subcategoryaction.do?categoryid=970"
product_link[14]="http://hibid.hinet.net/subcategoryaction.do?categoryid=1071"
product_link[15]="http://hibid.hinet.net/subcategoryaction.do?categoryid=782"
product_link[16]="http://hibid.hinet.net/searchaction.do?searchkey=MP4&categoryid=730&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
product_link[17]="http://hibid.hinet.net/subcategoryaction.do?categoryid=853"
product_link[18]="http://hibid.hinet.net/subcategoryaction.do?categoryid=795"

var number=new Array();
var flag=true;
var show=10;

var flag=true;
while (flag)
{
	flag=false;
	for (i=1;i<=show;i++) 
	{
		number[i]=Math.floor(Math.random()*(product_link.length-1))+1
		if (number[0]==0) 
		{
			flag=true;
			break;
		}
	}
	for (i=1;i<=show;i++)
	{
		for (j=1;j<i;j++)
		{
			if (number[j]==number[i])
			{
				flag=true;
				break;
			}
		}
	}
}

document.write('<table width="100%">')
var ttr=1
var j=1
var k=0
for (ttr=1;ttr<=5;ttr++)
{
	document.write('<tr>')
	for (j=1;j<=2;j++)
	{
		k=k+1
		document.write('<td><table><tr><td><a href="'+product_link[number[k]]+'" class="orange_bolder">'+product_title[number[k]]+'</a></td></tr>')
		document.write('<tr><td class="gray">'+product_note[number[k]]+'</td></tr>')
		document.write('<tr><td align="right" class="red" style="font-size:10">NT. <font style="font-size:30">'+product_money[number[k]]+'</font></td></tr></table></td>')
		document.write('<td align="center"><a href="'+product_link[number[k]]+'"><img src="images/digitalwarehouse_product_'+number[k]+'.gif"></a></td>')
	}
	document.write('</tr>')
}
document.write('</table>')
}
random_link()