// 次選單
function menu_sub_in(id) {
//document.getElementById('menu_sub_travel').style.display = "block";
	document.getElementById(id).style.display = 'block';
	//menu_sub_travel.style.display = 'block';
} 
function menu_sub_out(id){ 
	//menu_sub_travel.style.display = 'none';
	document.getElementById(id).style.display = 'none';
} 

// Facebook 社群專用
function Facebook() {
　void(window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(location.href)) ));
}

function Plurk() {
　void(window.open('http://www.plurk.com/?qualifier=shares&status=' .concat(encodeURIComponent(location.href)) .concat(' ') .concat('(') .concat(encodeURIComponent(document.title)) .concat(')')));
}

function Twitter() {
　void(window.open('http://twitter.com/home/?status=' .concat(encodeURIComponent(document.title)) .concat(' ') .concat(encodeURIComponent(location.href))));
}

// 優惠券 Coupon
function coupon(n_id) { 
window.open('preview.php?n_id='+n_id,'','width=680,height=350,scrollbars=no,resizable=no') 
} 
function coupon_nimuch() { 
window.open('coupon_nimuch.php','width=680,height=1350,scrollbars=no,resizable=no') 
} 


// 景點呼叫大圖片
function showpic1(pic,txt){
//alert(pic);
document.getElementById("PIC").innerHTML ='<img src="gallery/images/'+pic+'" border="0" width="400" height="300"><br>'+txt;
}

function showpic2(pic,txt){
//alert(pic);
document.getElementById("PIC").innerHTML ='<img src="gallery/images2/'+pic+'" border="0" width="400" height="300"><br>'+txt;
}

function showpic3(pic,txt){
//alert(pic);
document.getElementById("PIC").innerHTML ='<img src="gallery/images3/'+pic+'" border="0" width="400" height="300"><br>'+txt;
}

function showpic4(pic,txt){
//alert(pic);
document.getElementById("PIC").innerHTML ='<img src="gallery/images4/'+pic+'" border="0" width="451" height="300"><br>'+txt;
}

function showpic5(pic,txt){
//alert(pic);
document.getElementById("PIC").innerHTML ='<img src="gallery/images5/'+pic+'" border="0" width="400" height="300"><br>'+txt;
}

function showpic6(pic,txt){
//alert(pic);
document.getElementById("PIC").innerHTML ='<img src="gallery/images6/'+pic+'" border="0" width="400" height="300"><br>'+txt;
}

// 使 li產生 hover背景變顏色功能 homestay.php 之服務項目20種
stuHover = function() {
var cssRule;
var newSelector;
for (var i = 0; i < document.styleSheets.length; i++)
   for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
    {
    cssRule = document.styleSheets[i].rules[x];
    if (cssRule.selectorText.indexOf("LI:hover") != -1)
    {
     newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
     document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
    }
   }
var getElm = document.getElementsByTagName("li");
for (var i=0; i<getElm.length; i++) {
   getElm[i].onmouseover=function() {
    this.className+=" iehover";
   }
   getElm[i].onmouseout=function() {
    this.className=this.className.replace(new RegExp(" iehover\\b"), "");
   }
}
}
if (window.attachEvent) window.attachEvent("onload", stuHover);

