﻿var url = "http://search.tts8.com/down.aspx";

function switchdown(id)
{
	for (var i = 1; i <= 8;  i++ )
	{	
		$("down"+i).style.display='none';
		$("navdown"+i).className='black';
	}
	$("down"+id).style.display='block';
	$("navdown"+id).className='red';
}

function switchnews(id)
{
	for (var i = 1; i <= 4;  i++ )
	{	
		$("text"+i).style.display='none';
		$("news"+i).className='black';
	}
	$("text"+id).style.display='block';
	$("news"+id).className='span1';		

}

function copySend(){
	var _title=document.title;
	var _url=document.location.href;
	if( document.all ) {
		var _text='我推荐给你的“'+_title+'”\r\n'+ _url;
		clipboardData.setData('Text',_text);
		document.getElementById("copySendBtn").innerHTML="<span style='color:red'>请用 <strong>Ctrl+V</strong> 粘贴</span>";
}}


function searchurl(type)
{
if(type==-1)
	type = 0;
if(type==0)
    url = "http://search.tts8.com/down.aspx";

if(type==1)
    url = "http://search.tts8.com/raiders.aspx";
	

if(type==2)
    url = "http://search.tts8.com/news.aspx";
	
if(type==3)
    url = "http://search.tts8.com/flash.aspx";
	
	
if(type==4)
    url = "http://search.tts8.com/wg.aspx";
	
}

function searchenter()
{
	var keyword = document.form1.keyword.value;
	var urlto=url + "?keyword=" + escape(keyword);
	window.open(urlto);
}

function KeyDown()
{
　　if (event.keyCode == 13)
　　{
　　　　event.returnValue=false;
　　　　event.cancel = true;
		    searchenter();

　　}
}

