﻿// JavaScript Document

var shopCate_en = new Array();

shopCate_en[0] = "Accessories";
shopCate_en[1] = "Audio Visual, Household Product";
shopCate_en[2] = "Beauty, Personal Care";
shopCate_en[3] = "Books & Gifts, Entertainment";
shopCate_en[4] = "Department Store, Convenience store";


var shopCate_tr = new Array();

shopCate_tr[0] = "亞洲風味";
shopCate_tr[1] = "中式酒樓";
shopCate_tr[2] = "日和風味";
shopCate_tr[3] = "快餐";
shopCate_tr[4] = "悠閒小食";
shopCate_tr[5] = "西式佳餚";


var shopCate_link = new Array();
shopCate_link[0] = "asian";
shopCate_link[1] = "chinese";
shopCate_link[2] = "japanese";
shopCate_link[3] = "fast";
shopCate_link[4] = "leisure";
shopCate_link[5] = "western";


shopName = new Array();
shopName_en = new Array();
shopNo = new Array();
shopTel = new Array();
shopType = new Array();
shopNew = new Array();
shopCoupon = new Array();

CurrentShopType = 0;

/*shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "壹麵館";
shopNo[shopNo.length] = "181";
shopTel[shopTel.length] = "2628 6789";
shopType[shopType.length] = CurrentShopType;*/

/*080922
shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "易牙妙手";
shopNo[shopNo.length] = "187A";
shopTel[shopTel.length] = "2628 5995";
shopType[shopType.length] = CurrentShopType;
*/

/*080922*/
shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "海皇JPone";
shopNo[shopNo.length] = "187A";
shopTel[shopTel.length] = "2628 5225";
shopType[shopType.length] = CurrentShopType;

/*shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "紅鄉村";
shopNo[shopNo.length] = "188";
shopTel[shopTel.length] = "2703 0021";
shopType[shopType.length] = CurrentShopType;*/

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "馬泰";
shopNo[shopNo.length] = "197A";
shopTel[shopTel.length] = "2628 6906";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "太興新世代";
shopNo[shopNo.length] = "217A";
shopTel[shopTel.length] = "2628 6072";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "魚米家";
shopNo[shopNo.length] = "238";
shopTel[shopTel.length] = "2628 7001";
shopType[shopType.length] = CurrentShopType;

/*shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "龍的傳人中國廚房";
shopNo[shopNo.length] = "188";
shopTel[shopTel.length] = "2703 5888";
shopType[shopType.length] = CurrentShopType;*/


CurrentShopType++;

/* ============================================================ */
/*shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "金滬庭";
shopNo[shopNo.length] = "160-161";
shopTel[shopTel.length] = "2625 9889";
shopType[shopType.length] = CurrentShopType;*/

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "潮人飯堂";
shopNo[shopNo.length] = "188";
shopTel[shopTel.length] = "2497 8188";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "名薈酒家";
shopNo[shopNo.length] = "221";
shopTel[shopTel.length] = "2818 2898";
shopType[shopType.length] = CurrentShopType;

/*shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "利寶閣";
shopNo[shopNo.length] = "235";
shopTel[shopTel.length] = "2628 7068";
shopType[shopType.length] = CurrentShopType;*/

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "畔溪尚粵館";
shopNo[shopNo.length] = "235";
shopTel[shopTel.length] = "2336 6822";
shopType[shopType.length] = CurrentShopType;

CurrentShopType++;

/* ============================================================ */
shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "居食屋「和民」";
shopNo[shopNo.length] = "112";
shopTel[shopTel.length] = "2628 6491";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "和花亭寿司";
shopNo[shopNo.length] = "113";
shopTel[shopTel.length] = "2628 4982";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "味千拉麵";
shopNo[shopNo.length] = "236";
shopTel[shopTel.length] = "2628 7172";
shopType[shopType.length] = CurrentShopType;

CurrentShopType++;

/* ============================================================ */
shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "美心MX";
shopNo[shopNo.length] = "108";
shopTel[shopTel.length] = "2628 5010";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "MOS Burger";
shopNo[shopNo.length] = "161";
shopTel[shopTel.length] = "2628 6272";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "大家樂";
shopNo[shopNo.length] = "163";
shopTel[shopTel.length] = "2628 4535";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "肯德基";
shopNo[shopNo.length] = "183 &185";
shopTel[shopTel.length] = "2628 5273";
shopType[shopType.length] = CurrentShopType;

CurrentShopType++;

/* ============================================================ */
/*shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "西貢滿記甜品";
shopNo[shopNo.length] = "217F &G";
shopTel[shopTel.length] = "2628 6231";
shopType[shopType.length] = CurrentShopType;*/

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "檀島咖啡";
shopNo[shopNo.length] = "Area A";
shopTel[shopTel.length] = "2628 4925";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "太平洋咖啡";
shopNo[shopNo.length] = "Area C";
shopTel[shopTel.length] = "2628 6827";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "海天堂";
shopNo[shopNo.length] = "107";
shopTel[shopTel.length] = "2628 6758";
shopType[shopType.length] = CurrentShopType;

CurrentShopType++;

/* ============================================================ */
shopCoupon[shopCoupon.length] ="T";
shopName[shopName.length] = "euro go go";
shopNo[shopNo.length] = "106";
shopTel[shopTel.length] = "2882 6997";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "The Spaghetti House";
shopNo[shopNo.length] = "160";
shopTel[shopTel.length] = "2628 5212";
shopType[shopType.length] = CurrentShopType;

shopCoupon[shopCoupon.length] ="F";
shopName[shopName.length] = "必勝客";
shopNo[shopNo.length] = "265";
shopTel[shopTel.length] = "2274 2100";
shopType[shopType.length] = CurrentShopType;

/* ============================================================ */



/*function popup(n)
{
	newwin = window.open('shop_popup.html?i='+n,'popup1','toolbar=0,location=0,directories=0, status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,top=0,left=0,width=320,height=280');
	newwin.focus();
}*/

function shopTable(lang)
{
	/*document.write('<table width="728" border="0" cellspacing="0" cellpadding="0">',
				     '<tr>',
					   '<td width="249" background="images/shop_head_bg.gif" style="background-position:bottom; background-repeat:repeat-x; padding-left:18px;"><img src="images/shop_cate.gif" width="76" height="43" /></td>',
					   '<td width="202" background="images/shop_head_bg.gif" style="background-position:bottom; background-repeat:repeat-x"><img src="images/shop_name.gif" width="75" height="43" /></td>',
					   '<td width="158" background="images/shop_head_bg.gif" style="background-position:bottom; background-repeat:repeat-x"><img src="images/shop_no.gif" width="75" height="43" /></td>',
					   '<td background="images/shop_head_bg.gif" style="background-position:bottom; background-repeat:repeat-x"><img src="images/shop_tel.gif" width="75" height="43" /></td>',
					 '</tr>',
					 '</table>',
					 '<ul class="navmenu-v">');*/
	counter = 0;
	
	//background="images/bg_tableTitle.gif"
	for (var i = 0; i < shopName.length; i++)
	{
		if (counter % 2 == 0){
			bg_color = "#FFFFFF";
			bg_image = "images/bg_dinner_title.gif";
			bg_image_shopName = null;
			bg_image_shopNo = null;
			bg_image_shopTel = null;
		}
		else{
			bg_color = "#C9C3DD";
			bg_image = "images/bg_tableContent.gif";
			bg_image_shopName = "images/bg_tableContent_1.gif";
			bg_image_shopNo = "images/bg_tableContent_2.gif";
			bg_image_shopTel = "images/bg_tableContent_3.gif";
        }

		if (lang == "tr")
		{
			document.write('<tr height="35">');
			if (i == 0 || (i > 0 && shopCate_tr[shopType[i]] != shopCate_tr[shopType[i-1]])){
				document.write('<td background="',bg_image,'" style="background-repeat:no-repeat;  padding-left:27px; padding-top:5px; padding-bottom:5px"><span style="color:#FFFFFF; font-size:16px;"><a name="',shopCate_link[shopType[i]],'" id="',shopCate_link[shopType[i]],'"></a>',shopCate_tr[shopType[i]],'</span></td>');
			}else{
				document.write('<td style="padding-left:27px; padding-top:5px; padding-bottom:5px">&nbsp;</td>');
			}
			
			//if (i == 0)
			//	document.write('<td bgcolor="',bg_color,'" width="202" style="padding-left:13px; padding-top:5px; padding-bottom:5px"><a href="iframeModal.html?type='+i+'&KeepThis=true&TB_iframe=true&height=520&width=650" class="thickbox">',shopName[i],'</a></td>');
			//else
			//------<img src="images/icon_shop.gif" width="18" height="23">
				document.write('<td bgcolor="',bg_color,'" width="260" border="0" style="padding-left:5px; padding-top:5px; padding-bottom:5px;">&nbsp;&nbsp;');
				if (shopCoupon[i]=="T")
				{
					document.write('<img src="images/icon_shop.gif" width="18" height="23">&nbsp;&nbsp;');
				}else{
					document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
				}
				document.write(shopName[i],'</td>');
				document.write('<td bgcolor="',bg_color,'" width="110" style="padding-left:17px; padding-top:5px; padding-bottom:5px">',shopNo[i],'</td>');
				document.write('<td bgcolor="',bg_color,'"width="80" style="padding-left:11px; padding-top:5px; padding-bottom:5px">',shopTel[i],'</td>');
				document.write('</tr>');
		}
		
		counter++;
		
		if (shopCate_tr[shopType[i]] != shopCate_tr[shopType[i+1]])
		{   
			document.write('<tr>');
			document.write('<td colspan="4"><br/><div align="right"><a href="#" class="back_top">回頁頂</a></div></td>');
			document.write('</tr>');
			document.write('<tr>');
			document.write('<td colspan="4"><hr /></td>');
			document.write('</tr>');
			document.write('<tr>');
			document.write('<td colspan="4">&nbsp;</td>');
			document.write('</tr>');
			counter = 0;
		}

	
	}                   
           /*               
          	document.write('<tr>');
			document.write('<td colspan="4">&nbsp;</td>');
			document.write('</tr>');
			document.write('<tr>');
			document.write('<td colspan="4"><a href="#" class="footer_link">Back to top</a></td>');
			document.write('</tr>');              
             */             
                        


		/*if (i == 0)
			document.write('<a href="iframeModal.html?type='+i+'&KeepThis=true&TB_iframe=true&height=310&width=400" class="thickbox"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tbody><tr>',
            				'<td width="230" style="padding-left:20px; padding-right:10px">',shopCate_tr[shopType[i]],'</td>',
            				'<td width="180" style="padding-left:13px; padding-right:10px">',shopName[i],'</td>',
            				'<td width="130" style="padding-left:16px; padding-right:10px">',shopNo[i],'</td>',
            				'<td style="padding-left:11px;">',shopTel[i],'</td></tr></tbody></table></a></div></li>');
		else
			document.write('<a href="#" class="selectShop"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tbody><tr>',
            				'<td width="230" style="padding-left:20px; padding-right:10px">',shopCate_tr[shopType[i]],'</td>',
            				'<td width="180" style="padding-left:13px; padding-right:10px">',shopName[i],'</td>',
            				'<td width="130" style="padding-left:16px; padding-right:10px">',shopNo[i],'</td>',
            				'<td style="padding-left:11px;">',shopTel[i],'</td></tr></tbody></table></a></div></li>');
	}
    document.write('</ul>');*/
}

