﻿// 頁籤切換效果
function switchTab(tab_title, pst, tab_cnt)
{
	
	for(var i=0 ; i<tab_cnt ; i++)
	{
		if (i == pst)
		{
			document.getElementById(tab_title+'_tab_'+i).className = 'current';
		}
		else
		{
			document.getElementById(tab_title+'_tab_'+i).className = '';
		}
		
		if (i == pst)
		{
			document.getElementById(tab_title+'_'+i).className = 'disyshow';
		}
		else
		{
			document.getElementById(tab_title+'_'+i).className = 'disyhidn';
	    }
	}
}


function CheckData()
{
   
   var myForm = document.frmEdit.choice;
   var tmp = false;
   if (myForm){  
       for(var i=0; i<myForm.length; i++)
       {
         if(myForm[i].checked)
         {
         
            tmp = true;
            break;
         
         }
       }                     
       if (tmp == false) 
       {
           alert("您尚未作答!");           
           return false;
       }
       document.frmEdit.submit();   
   }      
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_openBrWindowU(theURL,winName,features,namestr) { //v2.0
  window.open(theURL + escape(namestr),winName,features);
}
function goSearch(key)
{
        q = "http://so.cnyes.com/Default.aspx?q=" + encodeURI( key ) + "&l=LB3&p=1&k=0"
 	MM_openBrWindow(q,'','width=992,height=710,scrollbars=yes,status=yes,menubar=yes,toolbar=yes,directories=1,location=1,');
}
