/*---------------------common script in every page-------------------------- */

if(document.referrer==null || document.referrer.indexOf('index_en.aspx')==-1)
{
    var type=navigator.appName 
	if (type=="Netscape") 
	var lang = navigator.language 
	else 
	var lang = navigator.userLanguage 
	var lang = lang.substr(0,2)
	if (lang == "en") 
	{
	    window.location.replace('index_en.aspx');
	}
	else if (lang == "zh-tw") 
	{
	    window.location.replace('index_en.aspx') 
	}
	else if (lang == "de") 
	{
	    window.location.replace('index_en.aspx')
	}
}								
					
function fixPng(obj)
	{
		obj.style.width='30px';
		obj.style.height='30px';
	}
function sidebar_tab(id)
{
	if(id==1)
	{
		document.getElementById('reservation').style.display='';
		document.getElementById('reservation_eve').style.display='none';
		document.getElementById('cb_rate').className='cb_rate';
		document.getElementById('reservation_ol').className='reservation_ol';
	}
	else if(id==2)
	{
		document.getElementById('reservation').style.display='none';
		document.getElementById('reservation_eve').style.display='';
		document.getElementById('cb_rate').className='cb_rate2';
		document.getElementById('reservation_ol').className='reservation_ol2';
	}

}
function ChangeLanCN()
{
    if(document.location.href!=null)
    {
        var url=document.location.href;
        url=url.replace('index_en.aspx','index.aspx/');
        document.location=url;
    }
}
function ChangeLanEN()
{
    var url=document.location.href;
    if(url!=null && url.indexOf('index.aspx')!=-1)
    {
        url=url.replace('index.aspx','index_en.aspx');
    }
    else
    {
        url=document.location.hostname;
        url=url+'/index_en.aspx';
    }
    
    document.location=url;
}



$(function(){

$(".hpic1_img").hover(function(){
	$(this).find(".lan_select").show();
},function(){
	$(this).find(".lan_select").hide();

});


});





$(function(){

$("#hpic4").hover(function(){
	$(this).find(".reservation_select").show();
},function(){
	$(this).find(".reservation_select").hide();

});


});
