// Goodweber for EzCam

//隨機出現範例圖片，並附連結
//宣告圖片陣列 [圖片檔名,連結網址]
var myImg = new Array(
					  ["example_01","story/add_01.php","EzCam讓相隔兩地的戀人相愛零距離！"],
					  ["example_02","story/add_02.php","EzCam線上討論作業沒煩惱"],
					  ["example_03","story/add_03.php","EzCam陪你度過每個孤單的日子"],
					  ["example_04","story/add_04.php","EzCam讓你天天視訊連線沒煩惱"],
					  ["example_05","story/add_05.php","只有EzCam影音通訊可解鄉愁"],
					  ["example_06","story/add_06.php","用EzCam創意表白讓愛升溫"],
					  ["example_12","story/add_07.php","EzCam讓您生活更多采多姿"],
					  ["example_07","story/business_02.php","用網頁電話 PP Talk隨時與客戶聯絡"],
					  ["example_08","story/business_03.php","用EzCam更有效益的運用時間"],
					  ["example_09","story/business_04.php","EzCam讓您與客戶溝通無障礙"],
					  ["example_13","story/business_05.php","EzCam多組客戶同時線上看屋"],
					  ["example_14","story/business_06.php","EzCam讓您低成本大效益"]
					 );
function showImg(){
	//乘以陣列的長度以取得從0~(陣列長度-1)的數字
	var imgIndex = Math.floor(Math.random()*myImg.length);
	document.getElementById("example_img").innerHTML  = "<div class="+myImg[imgIndex][0]+"><span><a href='"+myImg[imgIndex][1]+"' title="+myImg[imgIndex][2]+"></a></span>";
}
//end


//選項卡 star
function setTab01(area,id) {
	var tabArea=document.getElementById(area);

	var contents=tabArea.childNodes;
	for(i=0; i<contents.length; i++) {
		if(contents[i].className=='tabcontent01'){contents[i].style.display='none';}
	}
	document.getElementById(id).style.display='';

	var tabs=document.getElementById(area+'tabs').getElementsByTagName('a');
	for(i=0; i<tabs.length; i++) { tabs[i].className='tab'; }
	document.getElementById(id+'tab').className='tab curtab';
	document.getElementById(id+'tab').blur();
}
//選項卡 end


