﻿function random_link(){
var hot_title=new Array()
hot_title[1]= "500萬照相旗艦機"
hot_title[2]= "內建GPS導航手機"
hot_title[3]= "雙卡雙號同時待機"
hot_title[4]= "熱門3G影像手機"
hot_title[5]= "防刮防滑絨布套"
hot_title[6]= "鏡面超耐磨保護貼"
hot_title[7]= "大容量記憶卡"
hot_title[8]= "彩色金融股票機"
hot_title[9]= "商務導航PDA手機"
hot_title[10]="時尚品味藍芽耳機"

var hot_note=new Array()
hot_note[1]= "外型出眾,功能出色,照片.遊戲或網頁完美呈現"
hot_note[2]= "突破性的設計-衛星定位功能"
hot_note[3]= "一機雙卡雙號同時待機,訊息不漏接"
hot_note[4]= "視訊通話"
hot_note[5]= "低調的奢華風,讓您的手機更美觀"
hot_note[6]= "貼著後可修補已刮傷之細小痕跡"
hot_note[7]= "超大容量瘋殺登場!原廠終保!"
hot_note[8]= "軟硬體升級、選股分析更精準"
hot_note[9]= "人性化介面,內建GPS衛星導航"
hot_note[10]="釋放您的雙手，盡情享受解脫"

var hot_link=new Array()
hot_link[1]= "http://hibid.hinet.net/searchaction.do?searchkey=500&categoryid=1085&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
hot_link[2]= "http://hibid.hinet.net/searchaction.do?searchkey=GPS&categoryid=1085&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
hot_link[3]= "http://hibid.hinet.net/searchaction.do?searchkey=%E9%9B%99%E5%8D%A1&categoryid=1085&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
hot_link[4]= "http://hibid.hinet.net/searchaction.do?searchkey=3G&categoryid=1085&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
hot_link[5]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=1234"
hot_link[6]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=1235"
hot_link[7]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=1074"
hot_link[8]= "http://hibid.hinet.net/subcategoryaction.do?categoryid=964"
hot_link[9]= "http://hibid.hinet.net/searchaction.do?searchkey=%E5%B0%8E%E8%88%AA+or+gps&categoryid=937&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
hot_link[10]="http://hibid.hinet.net/searchaction.do?searchkey=%E8%97%8D%E7%89%99%E8%80%B3%E6%A9%9F+or+%E8%97%8D%E8%8A%BD%E8%80%B3%E6%A9%9F&categoryid=0&location=0&memsn=&condition=&Submit=%E9%96%8B%E5%A7%8B%E6%90%9C%E5%B0%8B"
    
var number=new Array();
var flag=true;
var show=5;

var flag=true;
while (flag)
{
	flag=false;
	for (i=1;i<=show;i++) 
	{
		number[i]=Math.floor(Math.random()*(hot_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;
			}
		}
	}
}

var promotions=Math.floor(Math.random()*5)+1
document.write('<table width="100%"><tr>')
document.write('<td rowspan="2"><a href="'+hot_link[number[1]]+'"><img src="images/digitalwarehouse_hot_mobile_'+number[1]+'.jpg"></a></td>')
document.write('<td><a href="'+hot_link[number[1]]+'" class="orange_bolder">'+hot_title[number[1]]+'</a></td>')
document.write('</tr><tr>')
document.write('<td class="gray">'+hot_note[number[1]]+'.<img src="images/digitalwarehouse_promotions_'+promotions+'.gif" align="absmiddle"></td>')
document.write('</tr>')
var j=1
for (j=2;j<=show;j++)
{
document.write('<tr>')
document.write('<td colspan="2">&nbsp;<img src="images/digitalwarehouse_number_'+j+'.gif" align="absmiddle">&nbsp;&nbsp;<a href="'+hot_link[number[j]]+'" class="gray_bolder">'+hot_title[number[j]]+'...</a></td>')
document.write('</tr>')
}
document.write('</table>')


}
random_link()