﻿//common variables

var baseImgPath='/images/bak2u/';
var modelsPath='/images/bak2u/models/';
var pageCatalog='bak2u';

var thisPage_file=thisPage_array[5].split('.');
var pageScript='<script type="text/javascript" src="'+'/CSS_JS/bak2u/'+thisPage_file[0]+'.js"></script>';

var mid_menuitemlinks=['<a href="index.php">','<a href="/'+menuLangSet+'/store.php">','<a href="activate.php">','<a href="news_awards.php">','<a target="_blank" href="http://bak2u.blogspot.com/">'];


//language variables

	if (menuLangSet=='en') {
		var mid_menuitems=['BAK2u Mobile Security Solution','Where to Buy','Products Activation','News & Awards','Bak2u Blog'];
		var spacing=60;
		
		var tt5=['Frequently Asked Questions'];
		var tt5p1a=['Is this service necessary for me?',
					'My gadget is the latest model! Will someone bother to return to me?',
					'What happens when I lose something?',
					'How does BAK2u know what items are mine?',
					'Why don\'t I just write my name on my valuable items?',
					'How do I know if PhoneBAK works?','How do I install the software?',
					'Are there any technical or local support?',
					'Can I use the same program for any other devices?',
					'How can I recover the lost device?'
					];
		var tt5p1b=['About 15,000 to 20,000 communication devices inclusive of PDA phones and mobilephones and work related devices like laptops, PDAs, USB flash drives are lost every year in Singapore and even more in Hong Kong. On top of it, there are also numerous gadgets like iPod mp3 players, digital cameras that are stolen from owners.<br/><br/>BAK2u makes it easy getting the stolen items back to you (BAK2u) through anti-theft software for laptops, PDA phones, mobile phones and any USB storage devices, all at only a small fraction of the cost of the gadgets.',
					'Which is worse? To lost a gadget with no identification or with some form of ID?<br/><br/>There are many items that are returned to the police posts, lost and found departments of various organizations but many are not returned to the owner due to the lack of identifications. Also with anti-theft software installed in the device, it increases the chance of a return when stolen when the alert is sent from the thief\'s own contact number or IP address.',
					'If you have pre-installed the Anti-theft software in your device, you can wait for the SMS text or the email alert.',
					'When you activate the BAK2u service on our website, you register your contacts to the device.',
					'Why compromise your personal information which you have no idea on whose hands they fall into?',
					'When the finder replaced the owner\'s SIM card with his, PhoneBAK will silently send a SMS to the pre-defined mobile phone number.<br/><br/>It is important to test out the pre-defined local number by simply interchanging with another SIM card first before actual use.',
					'There will be a step-by-step installation guide included.',
					'We will provide excellent after-sales services and technical support.',
					'Each copy of PhoneBAK SE program is licensed to only 01 registered device. It is therefore non-transferable.',
					'As the device has been pre-configured with contact numbers, the receiver of the alert can contact the finder directly and make the necessary arrangement or can report to the police to be dealt with too.<br/><br/>If there is no sms received to the pre-defined mobile number after the phone is lost, the device could have been lost and not found.Our products can raise the possibility of recovering lost or stolen devices, but we can\'t guarantee customers can have a 100% chance getting back their devices.'
				  ];
		
	}

	if (menuLangSet=='zh') {
		var mid_menuitems=['BAK2u 行動裝置安全防護方案','購買產品','產品啟動','消息與獎項','BAK2u部落格'];
		var spacing=110;
		
		var tt5=['Frequently Asked Questions'];
		var tt5p1a=['我需要這個服務嗎？',
					'我的行動裝置是最新款的！會有人願意歸還嗎？',
					'遺失了行動裝置該怎麼辦？',
					'BAK2u怎樣知道該裝置是娜個用戶的？',
					'在行動裝置上寫上我的名字和聯絡就好了吧？',
					'我怎樣知道程序是否有在運行？',
					'我怎樣安裝該程序？',
					'有沒有提供技術支援？',
					'我可以把程序安裝在別的裝置上嗎？',
					'我該怎樣尋回遺失或被竊的裝置？'
					];
		var tt5p1b=['在新加坡，每年大概有15,000至20,000個行動裝置遺失或被竊，而這個數字在香港更甚。這些行動裝置並不止於手提電話，還有手提電腦、PDA、USB drive、iPod、mp3機、數碼相機等等。<br/><br/>BAK2u防盜軟件可以幫助用戶更加容易的尋回失物，能夠以一個相對便宜的價錢為閣下的行動裝置買個保險。',
					'哪一樣較容易尋回？一個無從追尋的行動裝置還是一個有機會可以追查到的裝置？<br/><br/>即使報警求助，要尋回一個無法追尋的行動裝置還是有如大海撈針，透過BAK2u防盜軟件在遺失的裝置上所發出的訊息可以大大提升尋回行動裝置的機會。',
					'如果有安裝BAK2u防盜軟件，就可以等待接收短訊或電郵。',
					'當用戶啟動裝置上的BAK2u防盜軟件的時候，需要註冊閣下的資料和裝置。',
					'這並不是一個好辦法，因為不會知道該裝置會落在甚麼人手上，另一方面也還是無法追尋。',
					'當用戶或盜取者插入一張未被授權的SIM卡，該程序就會自動發送SMS短訊或電郵到預設號碼的手機或電郵地址。<br/><br/>用戶在實際使用該程序之前，應該事先測試一下程序是否正常運行。用戶可以插入一張未被授權的SIM卡，然後確認一下預設號碼的手機是否能收到該程序所發出的SMS短訊，以確保程序能夠正常運作。',
					'產品包內會附上逐步指示安裝說明書。',
					'我們會提供完善的售後服務和技術支援。',
					'每個程序只能註冊一個裝置，所以是不能轉移的。',
					'客戶可以根據訊息上的電話號碼聯絡拾獲者，作出適當的安排。<br/>又或者將訊息上的所有資料交予有關部門（如警方、報失中心和網絡供應商等）處理，有關方面應該能夠根據訊息上的資料獲得該裝置的最後地理位置。<br/><br/>如果客戶於遺失裝置後沒有於預設電話號碼的手機上收到有關訊息，那表示裝置沒有被啟動或SIM卡還沒被更換過。<br/>我們的產品可以幫助客戶提高尋回遺失的行動裝置的機會，但並不能保證客戶能有百份之百的機會尋回遺失的裝置。'
				  ];
		
	}


function writeModels(thisPageProduct,selectContentModelsClass){
	if (selectContentModelsClass==null){
		selectContentModelsClass = 'selectContentModels';
	}

	function imgObj(filename){
		this.src=modelsPath+thisPageProduct+'/'+filename;
		this.fullname=filename.split('.');;
		this.brand=this.fullname[0].slice(0,this.fullname[0].indexOf('_'));
		this.model=this.fullname[0].slice(this.fullname[0].indexOf('_')+1);
	}

	var	IMGs = new Array();

	for (b=0;b<galleryarray.length;b++){
		IMGs[b] = new imgObj(galleryarray[b]);
	}

	var brands=getBrand(IMGs);
	
	function getBrand(linksObj) {
		var brand = "";

		for (var i=0;i<linksObj.length;i++){
			var links=linksObj[i].brand;
			if (!brand.include(links)) {
				brand += links+',';
			}
		}

		brand=brand.split(',');
		return brand.slice(0,brand.length-1);
	}

	for (var j=0;j<brands.length;j++){
		document.write('<div class="spacer"></div>');
		document.write('<div class="'+selectContentModelsClass+'">');
		document.write('	<table style="width:100%;height:100%" valign="bottom"><tr><td>');
		document.write('<img src="'+modelsPath+'brands/'+brands[j]+'.jpg"/>');
		document.write('	</td></tr></table>');
		document.write('</div>');
		for (var k=0;k<IMGs.length;k++){
			if (brands[j]==IMGs[k].brand){
				writeSq(IMGs[k]);
			}
		}
		document.write('<div class="spacer"></div>');
		document.write('<div style="height:10px;border-bottom:1px gray solid"></div>');
	}

	function writeSq(img,index){
		var src='<img src="'+img.src+'"/>';
		document.write('<div class="'+selectContentModelsClass+'">');
		document.write('	<table style="width:100%;height:100%" valign="bottom"><tr><td>');
		document.write(src+'<br/>'+img.model);
		document.write('	</td></tr></table>');
		document.write('</div>');
	}

}