
	function hc(e,color)
	{ 
		if(color==1)e.style.backgroundColor="#aaFFcc";
		if(color==2)e.style.backgroundColor="#ffffff";
		if(color==3)e.style.backgroundColor="#ccFFFF";
    }

function JumpNewsPage(e,i) {  //來自 新聞總覽頁下拉式清單
window.open('?ID='+e+'&JumpNPage='+i+'&html','_self','');
}


 function JumpClassPage(x)
 {
 //   wait();

      if(document.all.JumpCPage==undefined||x==0)e=0;
      else e=document.all.JumpCPage.selectedIndex;
      if(document.all.CNews.value!=0)window.open('?CNews='+document.all.CNews.value+'&JumpCPage='+e+'&.htm','_self','');
      else window.open('News.aspx?html','_self',''); //回初始 共用快取第一頁
  //  hin();


 }

 function JumpPersonagePage(x)
 {//來自下拉式清單 PList
 //PList: selectedIndex
 //Pid: PersonageID
// JumpPPage: 跳頁
   //  wait();

      if(document.all.JumpPPage==undefined||x==0)e=0;
      else e=document.all.JumpPPage.selectedIndex;
      if(document.all.PList.value!="")window.open('?PID='+document.all.PList.value+'&PList='+document.all.PList.selectedIndex+'&JumpPPage='+e+'&.htm','_self','');
      else window.open('?html','_self',''); //回初始 共用快取第一頁
    // hin();


 }
 
 
 
 function JumpPID(e)
 {//來自網頁點選
  //   wait();

     var i=0;
     var PList=0;
     while(PList==0){ i++;if(document.all.PList.options[i].value==e){ PList=i;break;}}
   //  alert(document.all.PList.options[i].value+e);

     window.open('?PID='+e+'&PList='+PList+'&JumpPPage=0&.html','_self','');
//    hin();


}

 function JumpPName()
 {//來自網頁查詢 部份老師名 PName 、個股資訊 _Stock (../DB/StockNews/Stock.cs)

     var i=0;
     var PList=0;
     var PID=0;
     var vPName="";
         vPName= document.all.PName.value;
         if(vPName=="老師"||vPName=="")return false;

       

       while(PList==0){ 
       i++;
      if(document.all.PList.options[i]==undefined){  PList=0;PID=0;break; }
      if(document.all.PList.options[i].text.indexOf(vPName)!=-1){ PList=i;PID=document.all.PList.options[i].value; if(!confirm('查詢新聞人物【'+document.all.PList.options[i].text+'】？')) {return false;}   break; } 
      }
     if(PID!=0){window.open('?PID='+PID+'&PList='+PList+'&JumpPPage=0&.htm','_self','');}
     else { alert('查無【'+vPName+'】相關新聞人物。');}
				


}

 function JumpStock()
 {//來自網頁查詢  個股資訊 _Stock (../DB/StockNews/Stock.cs)
      
     var StockID=0;
     var vStockName="";
         vStockName=document.all.StockName.value;
      if(vStockName=="個股"||vStockName==""){JumpPName();return;}
    //個股來源檔 ../DB/StockNews/Stock.cs
		for(var i=ArrS.length-1;i>0;i--)
		{
			if(ArrS[i].indexOf(vStockName)!=-1)
			{
				StockID= ArrS[i].toString().substring(0,ArrS[i].toString().indexOf('|')).replace('|','');
				 if(!confirm('查詢個股【'+ArrS[i].toString().replace('|','')+'】？')){return false;} 
				break;
			}
		}
    if(StockID!=0){window.open('?StockID='+StockID+'&.htm','_self','');}
    else  {alert('查無【'+vStockName+'】相關 個股名稱/代碼。');}

}

function wait(){setTimeout("wait()",1);document.all._wait.style.visibility='visible';}
function hin(){setTimeout("hin()",1);document.all._wait.style.visibility='hidden';}
function OpenSelf(UID) {
	window.open(UID,'_self','');
}	
function OpenNew(UID) {
	window.open(UID,'_news','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=30,top=80,width=500,height=400');
}	
function OpenPwd(e,s) {
	window.open(e,'_pwd',s);
}	
//控制圖片載入時大小
function Oimg(o){if(o.width>screen.width-477){o.width=screen.width-477;o.alt='點二下,另開圖片視窗';o.style.cursor='hand';}}
function Oimgk(o){if(o.width>500){o.width=500;o.alt='點二下,另開圖片視窗';o.style.cursor='hand';}}

//滑鼠滾輪改變圖片大小
//function Cimg(o){var zoom=parseInt(o.style.zoom,10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';return false;}	
function Cimg(o){}//點二下,另開圖片視窗
function Nimg(o) {var newObject=window.open('../Function/ViewImg.asp?SRC='+o.src,'_Img','');newObject.focus();}