


function ShowDate(num)
{
	
	var today,week,date,TPhase;
	
	today=new Date();
		
	if(today.getDay()==0) week='星期日';
	if(today.getDay()==1) week='星期一';
	if(today.getDay()==2) week='星期二';
	if(today.getDay()==3) week='星期三';
	if(today.getDay()==4) week='星期四';
	if(today.getDay()==5) week='星期五';
	if(today.getDay()==6) week='星期六';
	date=(today.getYear())+'年'+(today.getMonth()+1)+'月'+today.getDate()+'日'+' ';
	if(num==1)
	{
		document.write(date+week);
	}
	else if(num==2)
	{
		TPhase = today.getHours();
		if(TPhase < 6)
		{
			document.write('凌晨好：')
		}
		else if(TPhase < 12)
		{
			document.write('早上好：')
		}
		else if(TPhase < 18)
		{
			document.write('下午好：')
		}
		else if(TPhase < 24)
		{
			document.write('晚上好：')
		}	
	}
}



function Chk(Frm)
{
	
	if(Frm.Str.value.replace(/\n|\s|<.+?>|&nbsp;/gi,'')=='')
	{
		alert('请输入要查找的内容');
		return false;
	}
	
	if(Frm.Str.value.length<2)
	{
		alert('查找内容不能少于2个字符');
		return false;
	}
	
	if(Frm.SearchType.value==0)	{Frm.action="/View/ViewSearchResult.asp";}
	else if(Frm.SearchType.value==1) {Frm.action="/Video/VideoSearchResult.asp";}
	else if(Frm.SearchType.value==2) {Frm.action='/wineshop/Search.asp?CompanyName='+Frm.Str.value;}
	else if(Frm.SearchType.value==3) {Frm.action="/Market/ChangeTarget.asp";}
	else if(Frm.SearchType.value==4) 
	{
		Frm.target="_blank";
		Frm.action="http://food.isheen.com/search_k/4/10_"+Frm.Str.value;
	}
	else if(Frm.SearchType.value==5) {Frm.action="/BbsHere/BbsSearchResult.asp";}
	else if(Frm.SearchType.value==6) {Frm.action="/Myspace/BlogSearchResult.asp";}
	
	return true;
}

function AutoSearchType()
{
	var GoUrl=this.location.href;
	GoUrl=GoUrl.toLowerCase();
	
	if(GoUrl.indexOf('/view')!=-1)
	{
		InsertHotSearch(0);
		document.SearchForm.SearchType.selectedIndex=0;
	}
	else if(GoUrl.indexOf('/video')!=-1)
	{
		InsertHotSearch(1);
		document.SearchForm.SearchType.selectedIndex=1;
	}
	else if(GoUrl.indexOf('/wineshop')!=-1)
	{
		InsertHotSearch(2);
		document.SearchForm.SearchType.selectedIndex=2;
	}
	else if(GoUrl.indexOf('/market')!=-1)
	{
		InsertHotSearch(3);
		document.SearchForm.SearchType.selectedIndex=3;
	}
	else if(GoUrl.indexOf('/cate')!=-1)
	{
		InsertHotSearch(4);
		document.SearchForm.SearchType.selectedIndex=4;
	}
	else if(GoUrl.indexOf('/bbshere')!=-1)
	{
		InsertHotSearch(5);
		document.SearchForm.SearchType.selectedIndex=5;
	}
	else if(GoUrl.indexOf('/myspace')!=-1)
	{
		InsertHotSearch(6);
		document.SearchForm.SearchType.selectedIndex=6;
	}
	else
	{
		InsertHotSearch(0);
		document.SearchForm.SearchType.selectedIndex=0;
	}
}

function AutoBg()
{
	var GoUrl=this.location.href;
	GoUrl=GoUrl.toLowerCase();
	
	if(GoUrl.indexOf('/photo')!=-1)
	{
		Index5.background='/pic/nav_02b.gif';
		Index5.innerHTML='<a href="/Photo" class="white" title="记录我们的快乐旅程">旅游相册</a>';
	}
	else if(GoUrl.indexOf('/view')!=-1)
	{
		Index2.background='/pic/nav_02b.gif';
		Index2.innerHTML='<a href="/View" class="white" title="带你游遍世界">景区指南</a>';
	}
	else if(GoUrl.indexOf('/video')!=-1)
	{
		Index3.background='/pic/nav_02b.gif';
		Index3.innerHTML='<a href="/Video" class="white" title="感受旅游的魅力">旅游视频</a>';
	}
/*	else if(GoUrl.indexOf('/market')!=-1)
	{
		Index11.background='/pic/nav_02b.gif';
		Index11.innerHTML='<a href="/Market" class="white" title="轻松选择旅游">度假线路</a>';
	}
	*/
/*	else if(GoUrl.indexOf('/wineshop')!=-1)
	{
		Index7.background='/pic/nav_02b.gif';
		Index7.innerHTML='<a href="/wineshop" class="white" title="为您提供最实惠的酒店">酒店直销</a>';
	}*/
	else if(GoUrl.indexOf('/news')!=-1)
	{
		Index4.background='/pic/nav_02b.gif';
		Index4.innerHTML='<a href="/News" class="white" title="关注旅游">旅游资讯</a>';
	}
	else if(GoUrl.indexOf('/myspace')!=-1)
	{
		Index8.background='/pic/nav_02b.gif';
		Index8.innerHTML='<a href="/MySpace" class="white" title="分享你我的快乐">行者博客</a>';
	}
/*	else if(GoUrl.indexOf('/mag')!=-1)
	{
		Index6.background='/pic/nav_02b.gif';
		Index6.innerHTML='<a href="/Mag" class="white" title="旅游电子杂志">电子杂志</a>';
	}*/

	else
	{
		Index1.background='/pic/nav_01b.gif';
		Index1.innerHTML='<a href="/" class="white" title="玩的精彩">首页</a>';
	}
	
}

function ShowDiv2(ShowObj,Td1,Bg1,Class1,HiddenObj,Td2,Bg2,Class2) 
{
	ShowObj.style.display='block';
	Td1.background=Bg1;
	Td1.className=Class1;
	
	HiddenObj.style.display='none';
	Td2.background=Bg2;
	Td2.className=Class2;
}

function ShowDiv3(ShowObj,Td1,Bg1,Class1,HiddenObj,Td2,Bg2,Class2,HiddenObj2,Td3,Bg3,Class3) 
{
	ShowObj.style.display='block';
	Td1.style.backgroundColor=Bg1;
	Td1.className=Class1;
	
	HiddenObj.style.display='none';
	Td2.style.backgroundColor=Bg2;
	Td2.className=Class2;
	
	HiddenObj2.style.display='none';
	Td3.style.backgroundColor=Bg3;
	Td3.className=Class3;
}

function ShowDiv33(ShowObj,Td1,Bg1,Class1,HiddenObj,Td2,Bg2,Class2,HiddenObj2,Td3,Bg3,Class3) 
{
	ShowObj.style.display='block';
	Td1.background=Bg1;
	Td1.className=Class1;
	
	HiddenObj.style.display='none';
	Td2.background=Bg2;
	Td2.className=Class2;
	
	HiddenObj2.style.display='none';
	Td3.background=Bg3;
	Td3.className=Class3;
}



function ShowDivNews(ShowObj,Td1,Bg1,HiddenObj,Td2,Bg2) 
{
	ShowObj.style.display='block';
    Td1.style.backgroundColor=Bg1;
	
	HiddenObj.style.display='none';
	Td2.style.backgroundColor=Bg2;

}

