// JavaScript Document IE 閃圖 1.3
// Ver 1.1 原始來源: DOB 
// Ver 1.2 修改可以在ff執行 by ASK
// Ver 1.3 ff不執行(因為會影響FF校能) by ASK

var globopObject;
var opIndex=0;
var cleared=true;
var direction=10;
function isIE(){
	if (navigator.appName!="Microsoft Internet Explorer") {
		return false
		}
	return true
}

function chcolor(classna){
	classna.style.backgroundColor= classna.style.backgroundColor == 'red' ? '':'red';
}
function chcolor2(idValue){
	var classna=document.getElementById(idValue);
	classna.style.backgroundColor= classna.style.backgroundColor == 'red' ? '':'red';
}
function chcolor3(idValue){
	var classna=document.getElementById(idValue);
	classna.style.backgroundColor= classna.style.backgroundColor == '#333333' ? '':'#333333';
}
function dynOpacity(opObject,stop){
	if (stop) {
		clearInterval(window.tm);
		cleared=true;
		opIndex=160;return;
	}
		globopObject=opObject;
	if (opIndex>160){
		if(isIE()){
		direction=-3;
		}else{
		direction=-30;
		}
	}
	if (opIndex<0){
		direction=4;
		}
		
		if(isIE()){
		opIndex+=direction;
		globopObject.style.filter='alpha(opacity:' + opIndex + ')';
		}else{
		opIndex+=direction;
		var opIndex2=opIndex/50;
		globopObject.style.opacity='' + opIndex2 + '';
		}
	if (cleared){
		if(isIE()){
		window.tm=setInterval("dynOpacity(globopObject,false);",1);
		}else{
		window.tm=setInterval("dynOpacity(globopObject,false);",10);	
		}
		cleared=false;
		}
}
function handleevt(evt){
		evt = evt ? evt : (window.event ? window.event : null);
		var obj = (evt.target) ? evt.target : evt.srcElement

		if(evt.type=="mouseover"){
			if(obj.tagName=="DIV"){
			
			}else if(obj.tagName=="IMG"){
				if(obj.parentNode.tagName=="A"){
					dynOpacity(obj,false);
					}
			}else if(obj.tagName=="INPUT"){
				if(obj.type=="text"){
					
				}else if(obj.type=="password"){
					
				}else{
					dynOpacity(obj,false);
				}
			}
		}
		if(evt.type=="mouseout" ){
			if(obj.tagName=="IMG"){
				if(isIE()){
				obj.style.filter="";
				}else{
				obj.style.opacity="";
				}
				dynOpacity(evt.srcElement,true);
			}else if(obj.tagName=="INPUT"){
				if(isIE()){
				obj.style.filter="";
				}else{
				obj.style.opacity="";
				}
				dynOpacity(obj,true);
				
			}
		}
	
}
function surfto1(list){
	var myindex1  = document.Fmjmp1.selectedIndex;
		if (myindex1 != 0){
			var URL = "" + document.Fmjmp1.jumpto1.options[document.Fmjmp1.jumpto1.selectedIndex].value;
			this.location.href = URL;
			target = "_self";
		}
}
function surfto2(list){
	var myindex2  = document.Fmjmp2.selectedIndex;
		if (myindex2 != 0){
			var URL = "" + document.Fmjmp2.jumpto2.options[document.Fmjmp2.jumpto2.selectedIndex].value;
			this.location.href = URL;
			target = "_self";
		}
}
document.onmouseover=handleevt;
document.onmouseout=handleevt;