
function search()
{
 if (document.f1.search_str.value=="")
  {alert("没有填写搜索内容！");
  return;}
 else
  {document.f1.action="results.asp";
  document.f1.submit();}
}

  function search2()
{
 if (document.f2.word.value=="")
  {alert("没有填写搜索内容！");
  return false;}
 else
{ 
if (document.f2.way.value==1)
  {document.f2.action='search.asp';
   document.f2.submit();}
if (document.f2.way.value==2)
  {document.f2.action='results.asp?search_str='+document.f2.word.value+'&type=1';
    document.f2.submit();}
if (document.f2.way.value==3)
  {document.f2.action='results.asp?search_str='+document.f2.word.value+'&type=2';
    document.f2.submit();}	
if (document.f2.way.value==4)
  {document.f2.action='results.asp?search_str='+document.f2.word.value+'&type=3';
   document.f2.submit();}
if (document.f2.way.value==5)
  {document.f2.action='results.asp?search_str='+document.f2.word.value+'&type=4';
    document.f2.submit();}
if (document.f2.way.value==6)
  {document.f2.action='read_ill.asp?search_str='+document.f2.word.value;
    document.f2.submit();}

} 
}

function f_login1(){
if ((document.f_login.username.value=="")||(document.f_login.username.value=="")){
alert("你没有输入用户名和密码！");
return false;}
else{
document.f_login.action="check.asp";
document.f_login.submit();
}
}

function f_login(){
if ((document.f_login.username.value=="")||(document.f_login.username.value=="")){
alert("你没有输入用户名和密码！");
return ;}
else{
document.f_login.action="check.asp";
document.f_login.submit();
}
}


function formaction(id) {
abc = ''
msgWin = window.open(abc, 'formwin', 'menubar=no,toolbar=yes,resizable=yes,scrollbars=yes,width=520,height=400');
msgWin.focus();
msgWin.location='news'+id+'.htm'
}

function newswin(id) {
abc = ''
msgWin = window.open(abc, 'formwin');
msgWin.focus();
msgWin.moveTo(0,0)
msgWin.resizeTo(screen.availWidth,screen.availHeight)
msgWin.location='news/readnews.asp?id='+id
}

function goill(url1) {
if (url1!='')
{abc = ''
msgWin = window.open(abc, 'formwin', 'menubar=no,toolbar=yes,resizable=no,scrollbars=yes,width=600,height=400');
msgWin.focus();
msgWin.location=url1
}
}

function welcome(){
abc=''
welwin= window.open(abc,'welcwin','menubar=no,toolbar=no,resizable=no,scrollbars=no,width=500,height=400');
welwin.focus();
welwin.location='nw.html'}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) 
{ // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function loadpopup(){
if (get_cookie('popped')==''){
welcome();
document.cookie="popped=yes"
}
}


function newwin1(id,sub,top,tt) {
abc1 = ''
msgWin1 = window.open(abc1, 'formwin1', 'menubar=no,toolbar=yes,resizable=yes,scrollbars=yes,width=600,height=400');
msgWin1.focus();
if(sub!='')
msgWin1.location='read_health.asp?id='+id+'&subject='+sub+'&topic='+top+'&tt='+tt
if(sub=='all')
msgWin1.location='read_health.asp?id='+id+'&subject='+'&topic='+top+'&tt='+tt
}

function newwin2(id,sub,top,tt) {
abc1 = ''
msgWin1 = window.open(abc1, 'formwin1', 'menubar=no,toolbar=yes,resizable=yes,scrollbars=yes,width=600,height=400');
msgWin1.focus();
if(sub!='')
msgWin1.location='read_life.asp?id='+id+'&subject='+sub+'&topic='+top+'&tt='+tt;
if(sub=='all')
msgWin1.location='read_life.asp?id='+id+'&subject='+'&topic='+top+'&tt='+tt;
}


