﻿//["0Eng Name","1Chinese Name","2phone","3email","4Address line 1","5Address line 2","6Room#",7["Discount1","Discount2"],"8Website","9shop icon name@pics/sponsors0910",10[number of pics],"11show new icon"],
var udistrict=[
//U District
["Aoi Sushi","Aoi 壽司店","206-632-2698","","4545 UNIVERSITY WAY NE","Seattle, WA 98105","",["Free drink with entrée"],"","AoiSushi",[1,2,3,4,5],""],
["Best of Bento","最好便當","206-633-3262","","4245 University Way NE","Seattle, WA 98105","",["10% off on main entrées"],"","BestofBento",[1,2,3],""],
["China First","中國第一","206-547-9898","","4237 University Way NE","Seattle, WA 98105","",["10% Off on nonspecial items"],"","ChinaFirst",[1,2,3],""],
["Citra Frozen Yougurt","CITRA 冰奶酪店","206-327-9210","","4730 University Way NE","Seattle, WA 98105","",["15% off purchases"],"","Citra",[1,2,3,4],""],
["Comic Book Club","漫畫書店","206-523-6894","","1100 NE 47th St","Seattle, WA 98105","",["10% off purchases"],"","ComicBookClub",[1,2,3,4],""],
["Garam Masala Indian Cuisine","Garam Masala 印度菜","206-632-1900","","4537 UNIVERSITY WAY NE","Seattle, WA 98105","",["Free Dessert"],"","GaramMasalaIndianCuisine",[1,2,3,4],""],
["Häagen-Dazs","哈根達斯","206-632-0243","","4301 UNIVERISTY WAY NE","Seattle, WA 98105","",["10% off purchases"],"","Haagen",[1,2,3],""],
["Kiku Tempura House","KIKU 天婦羅料理","206-524-1125","","5018 UNIVERSITY WAY NE","Seattle, WA 98105","",["Free drink with entrée"],"","Kiku",[1],""],
["Little Thai","小泰國","206-548-8009","","4142 BROOKLYN AVE NE","Seattle, WA 98105","#105",["10% off with cash only"],"","LittleThai",[1,2],""],
["Lounjin Café","Lounjin 咖啡室","206-888-2827","","4527 UNIVERSITY WAY NE","Seattle, WA 98105","",["10% off on Coffee-Food Items"],"http://www.lounjin.com","Lounjin",[1,2,3,4],""],
["Mandarin Chef","美華飯店","206-528-7596","","5022 UNIVERSITY WAY NE","Seattle, WA 98105","",["15% off purchases"],"","MandarinChef",[1,2,3,4],""],
["Mee Sum Bakery","美心餅家","206-632-7298","","4343 UNIVERSITY WAY NE","Seattle, WA 98105","",["10% off of any bubble tea"],"","MeeSum",[1,2,3],""],
["Nasai Teriyaki","Nasai 照燒","206-632-3572","","4305 UNIVERSITY WAY NE","Seattle, WA 98105","",["Free Soda"],"","NasaiTeriyaki",[1,2],""],
["New China Express","新中國快餐","206-351-4820","","4232 UNIVERSITY WAY NE","Seattle, WA 98105","",["10% off purchases"],"","NewChinaExpress",[1,2],""],
["Shinka Tea","Shinka 茶","206-910-1074","","4727 UNIVERSITY WAY NE","Seattle, WA 98105","",["25¢ off on each drink per day"],"http://www.shinkatea.com","ShinkaTea",[1,2],""],
["Starberry Inc.","","206-632-1882","","4507 UNIVERSITY WAY NE","Seattle, WA 98105","",["1 Free topping"],"","StarBerry",[1,2,3,4,5],""],
["Tokyo Garden Teriyaki","東京花園餐廳","206-632-1588","","4337 UNIVERSITY WAY NE","Seattle, WA 98105","",["10% off on all meals","Free fountain Drink or Tea"],"","TokyoGarden",[1,2,3,4,5],"new"],
["What Da Phad","乜得忽泰國素食","206-547-6500","","4537 UNIVERSITY WAY NE","Seattle, WA 98105","",["10% discount on meals"],"","WhatDaPhad",[1,2,3],""],
["Yunnie Bubble Tea","Yunnie 珍珠奶茶","206-547-9648","","4511 UNIVERSITY WAY NE","Seattle, WA 98105","",["10% off purchases"],"","Yunnie",[1,2,3,4,5],""],
["Yummy Bites","","206-633-6582","","4131 UNIVERSITY WAY NE","Seattle, WA 98105","",["10% off (Cash Only)"],"","YummyBites",[1,2],"new"]
]
var chinatown=[
["Ambrosia Café","忘情水","206-623-9028","","619 S KING STREET","Seattle, WA 98104","",["25¢ off per drink"],"","AmbrosiaCafe",[1,2,3,4,5,6,7,8],""],
["Aquarium Plus","魚意水族","206-227-6752","","1207 S JACKSON STREET","Seattle, WA 98144","#108",["5 - 10% off purchases"],"","AquariumPlus",[1,2],""],
["Gossip Expresso & Tea","八卦站","206-624-5402","","651 S KING STREET","Seattle, WA 98104","",["25¢ off per drink"],"http://gossip-tea.com","Gossip",[1,2,3,4,5,6],""],
["Henry's Bento","老谷上好家","206-624-2611","","504 S KING STREET ","Seattle, WA 98104","",["10% off purchases"],"","HenryBento",[1,2,3,4,5,6,7],""],
["Home Style HK Cuisine","來來茶餐館","206-748-9168","","615 S KING STREET","Seattle, WA 98104","",["15% off purchases"],"","HomeStyleHKCuisine",[1,2,3],""],
["International Model Toys","國際模型","206-682-8534","","601 S KING STREET","Seattle, WA 98104","#104",["10% off for purchase of $50 or more"],"","InternationalModelToys",[1,2],""],
["Jade Garden","翠園酒家","206-622-8181","","424 7TH AVE S","Seattle, WA 98104","",["Free tea fee during Lunch"],"","JadeGarden",[1,2,3,4,5],""],
["King's BBQ House","皇上皇燒臘","206-622-2828","","518 6TH AVE S","Seattle, WA 98104","",["10% off purchases"],"","KingBBQ",[1,2],""],
["LA Café","羅省港式西餐","206-264-0298","","900 S Jackson St","Seattle, WA 98104","",["10% off purchases"],"","LaCafe",[1,2,3,4,5,6,7,8],"new"],
["Phnom Penh Noodle House","金邊潮州粿條","206-748-9825","","660 S KING STREET","Seattle, WA 98104","",["10% off purchases"],"","PhnomPenh",[1,2,3],""],
["SUB-SAND","潛水艇","206-682-1267","","419 6TH AVE S","Seattle, WA 98104","",["10% off for purchase of $50 or more"],"","SubSand",[1,2,3,4,5,6,7,8],""],
["Unicorn Crepes","獨角獸煎餅","206-652-0637","","421 6TH AVE S","Seattle, WA 98104","",["10% off Meal Discount"],"","UnicornCrepes",[1,2,3,4,5,6,7],""],
["Venus Karaoke","金星卡拉OK","206-264-1779","","601 S KING STREET","Seattle, WA 98104","#102",["5% off All You Can Sing"],"","Venus",[1,2,3],""],
["Young House","陽光","206-343-2318","","523 Maynard Ave S","Seattle, WA 98104","",["buy 10 phone cards one free"],"","YoungHouse",[1],""],
["Yummy House Bakery","美味屋","206-340-8838","","522 6TH AVE S","Seattle, WA 98104","",["10% off for a whole cake"],"","YummyHouse",[1,2,3,4,5,6],""]
]
var eventsponsor=[
["Hong Kong Bistro","美味來","206-682-1922","","507 Maynard Ave S","Seattle, WA 98104","511C",["HKSA event sponsor"],"","HongKongBistro",[1,2],""]
]

var others=[
["Flavor Bakery & Café","","425-556-3999","","16118 NE 87TH STREET","Redmond, WA 98052","",["10% off purchases"],"","Flavor",[1],""]
]

var partnership=[
["Hong Kong Association of Washington","華州香港會","206-588-5452","info@hkaw.org","PO Box 3422, ","Seattle, WA 98114","",["$5 OFF on HKAW Membership Card"],"http://www.hkaw.org","HKAW",[1,2],""]
];

var numofsponsors= udistrict.length+chinatown.length+eventsponsor.length+others.length+partnership.length

//Random Function
function randOrd(){
return (Math.round(Math.random())-0.5)
} 


//Sponsor Links in first page
function sponsorsview(num){
if (num==1) {hksasponsors=udistrict}
else if (num==2) {hksasponsors=chinatown}
else if (num==3) {hksasponsors=eventsponsor}
else if (num==4) {hksasponsors=others}
else if (num==5) {hksasponsors=partnership}
document.write("<ul>")
for (c = 0; c < hksasponsors.length; c++){
	document.write("<li><a href=\"sponsors.html?scrollto="+hksasponsors[c][2]+"\" class=\"sponsornewsinfo\">"+hksasponsors[c][0]+"")
		if (hksasponsors[c][11].length>0) document.write(" <img src=\"./pics/new.gif\" class=\"new\">")
	document.write("<span> - "+hksasponsors[c][0]+" - <br />")
	document.write("<ul style=\"list-style-type: disc\">")
		for (k = 0; k < hksasponsors[c][7].length; k++){
	document.write("<li>"+hksasponsors[c][7][k]+"</li>")}
	document.write("</ul>")
	document.write("<br />"+hksasponsors[c][4]+ " "+hksasponsors[c][6]+"<br />"+hksasponsors[c][5]+"</span>")
	document.write("</a></li>")}
document.write("</ul>")

}


//Sponsor Links in sponsor page
function sponsorslinks(num,start,end){
if (num==1) {hksasponsors=udistrict}
else if (num==2) {hksasponsors=chinatown}
else if (num==3) {hksasponsors=eventsponsor}
else if (num==4) {hksasponsors=others}
else if (num==5) {hksasponsors=partnership}

document.write("<ul style=\"padding-left:20px\">")
for (c = start-1; c < end; c++){
if (hksasponsors[c][9].length>0) {
	document.write("<li><a href=\"javascript:bookmarkscroll.scrollTo('"+hksasponsors[c][2]+"')\" class=\"sponsorinfo\">"+hksasponsors[c][0]+"")
	document.write("<span><img src=\"./pics/sponsors0910/"+hksasponsors[c][9]+".jpg\" style=\"width:150px;height:150px\"></span></a>")
		if (hksasponsors[c][11].length>0) document.write(" <img src=\"./pics/new.gif\" class=\"new\">")
	document.write("</li>")
	}
else
{
	document.write("<li><a href=\"javascript:bookmarkscroll.scrollTo('"+hksasponsors[c][2]+"')\">"+hksasponsors[c][0]+"")
		if (hksasponsors[c][11].length>0) document.write(" <img src=\"./pics/new.gif\" class=\"new\">")
	document.write("</a></li>")
}
}
document.write("</ul>")

}

//Sponsor Photos
$(document).ready(function(){
for (j = 0; j < udistrict.length; j++)
$("a[rel=\"photo"+udistrict[j][2]+"\"]").colorbox({maxHeight:'80%',maxWidth:'80%',opacity:"0.6"});
for (j = 0; j < chinatown.length; j++)
$("a[rel=\"photo"+chinatown[j][2]+"\"]").colorbox({maxHeight:'80%',maxWidth:'80%',opacity:"0.6"});
for (j = 0; j < eventsponsor.length; j++)
$("a[rel=\"photo"+eventsponsor[j][2]+"\"]").colorbox({maxHeight:'80%',maxWidth:'80%',opacity:"0.6"});
for (j = 0; j < others.length; j++)
$("a[rel=\"photo"+others[j][2]+"\"]").colorbox({maxHeight:'80%',maxWidth:'80%',opacity:"0.6"});
for (j = 0; j < partnership.length; j++)
$("a[rel=\"photo"+partnership[j][2]+"\"]").colorbox({maxHeight:'80%',maxWidth:'80%',opacity:"0.6"});
})


//Sponsor body
function sponsors(num){
if (num==1) {hksasponsors=udistrict}
else if (num==2) {hksasponsors=chinatown}
else if (num==3) {hksasponsors=eventsponsor}
else if (num==4) {hksasponsors=others}
else if (num==5) {hksasponsors=partnership}
//hksasponsors.sort(randOrd);
for (j = 0; j < hksasponsors.length; j++){
		document.write("<a href=\"#top\" style=\"font-size:17px;float:right\">Top</a><h1 style=\"text-align:left\" id=\""+hksasponsors[j][2]+"\">")
		
		document.write(""+hksasponsors[j][0]+"")
		if (hksasponsors[j][1].length>0) document.write(" - "+hksasponsors[j][1]+"")
		document.write("</h1>")
		
		
		document.write("<div style=\"padding:10px;height:200px;line-height: 200%;letter-spacing: 1pt; \">")
		document.write("<div style=\"padding:10px;float:left;width:230px\">")
		document.write("Phone : "+hksasponsors[j][2]+"<br />")
		if (hksasponsors[j][3].length>0) document.write("E-Mail : "+hksasponsors[j][3]+"<br />")
		
		if (hksasponsors[j][8].length>0) {document.write("<br />Website :")
		document.write("<div style=\"padding-left:10px\">")
		document.write("<a href=\""+hksasponsors[j][8]+"\" target=\"_blank\">"+hksasponsors[j][8]+"</a><br />")
		document.write("</div>")}
			
		document.write("<br />Address <a href=\"http://maps.google.com/maps?q="+hksasponsors[j][4]+", "+hksasponsors[j][5]+"&z=16&output=embed\" class=\"googlemap\">(Google Maps)</a> :")
		document.write("<div style=\"padding-left:10px\">")
		document.write(""+hksasponsors[j][4]+ " "+hksasponsors[j][6]+"<br />"+hksasponsors[j][5]+"")
		document.write("</div>")
		document.write("</div>")
		document.write("<div style=\"padding:10px;float:left;width:250px\" class=\"about\">")
		document.write("Member Discount")
		document.write("<ul style=\"list-style-type: square;margin:0px\">")
		for (k = 0; k < hksasponsors[j][7].length; k++){
		document.write("<li>"+hksasponsors[j][7][k]+"</li>")}
		document.write("</ul>")
		document.write("</div>")
		if (hksasponsors[j][9].length>0)
		{
		if (hksasponsors[j][10].length>0){
			document.write("<a href=\"./pics/sponsors0910/"+hksasponsors[j][9]+hksasponsors[j][10][0]+".jpg\" rel=\"photo"+hksasponsors[j][2]+"\" style=\"float:right;text-align:center\"><img src=\"./pics/sponsors0910/"+hksasponsors[j][9]+".jpg\" class=\"sponsorpics\"><br>[ Image x " + hksasponsors[j][10].length + " ]</a>")
			for (a = 1; a < hksasponsors[j][10].length; a++)
			document.write("<a href=\"./pics/sponsors0910/"+hksasponsors[j][9]+hksasponsors[j][10][a]+".jpg\" rel=\"photo"+hksasponsors[j][2]+"\"></a>")
			}
			else{
			document.write("<img src=\"./pics/sponsors0910/"+hksasponsors[j][9]+".jpg\"  class=\"sponsorpics\" style=\"float:right\">")
			}
		}
		document.write("</div>")
		
		}
}