<!--


//除了Array定義的物件以外將所有物件皆設為唯讀
function Reset_Form_Disabled(cObj_Array,cStart_Obj,cDisabled_Flag)
{
	if (cDisabled_Flag==null || typeof(cDisabled_Flag)=="undefined")
		cDisabled_Flag=true;
	while (cStart_Obj!=null)
	{
		var cCheck_Obj_Flag=0;
		//alert(cStart_Obj.nodeName.toUpperCase());
		switch(cStart_Obj.nodeName.toUpperCase())
		{
			case "INPUT":
				cCheck_Obj_Flag=1;
				break;
			case "SELECT":
				cCheck_Obj_Flag=1;
				break;
			case "TEXTAREA":
				cCheck_Obj_Flag=1;
				break;
			case "BUTTON":
				cCheck_Obj_Flag=1;
				break;
			default:
				cCheck_Obj_Flag=0;
				break;
		}
		if (cCheck_Obj_Flag==1)
		{
			for (var cfi=0;cfi<cObj_Array.length;cfi++)
			{
				if (cStart_Obj.id.toUpperCase()==cObj_Array[cfi].toUpperCase())
				{
					cCheck_Obj_Flag=0;
					break;
				}	
			}
		}
		if (cCheck_Obj_Flag==1)
			cStart_Obj.disabled=cDisabled_Flag;
		if (cStart_Obj.firstChild!=null)
			Reset_Form_Disabled(cObj_Array,cStart_Obj.firstChild,cDisabled_Flag);
		cStart_Obj=cStart_Obj.nextSibling;
	}
}


var loaded=false

		/***************************************************************
			 PreLoader MENU Icons Script = [ for Main Menu ]
		***************************************************************/
			PreLoader('Cf_HomeOn','images/buttonHomeOn.gif');
			PreLoader('Cf_HomeOff','images/buttonHomeOff.gif');
			PreLoader('Cf_SearchOn','images/buttonSearchOn.gif');
			PreLoader('Cf_SearchOff','images/buttonSearchOff.gif');
			PreLoader('Cf_FaqOn','images/buttonFaqOn.gif');
			PreLoader('Cf_FaqOff','images/buttonFaqOff.gif');
			PreLoader('Cf_ShoppingCartOn','images/buttonShoppingCartOn.gif');
			PreLoader('Cf_ShoppingCartOff','images/buttonShoppingCartOff.gif');
			PreLoader('Cf_OrderOn','images/buttonOrderOn.gif');
			PreLoader('Cf_OrderOff','images/buttonOrderOff.gif');			
			PreLoader('Cf_PaperOn','images/buttonPaperOn.gif');
			PreLoader('Cf_MedicineOn','images/buttonMedicineOn.gif');
			PreLoader('Cf_MedicineOff','images/buttonMedicineOff.gif');
			PreLoader('Cf_PaperOff','images/buttonPaperOff.gif');			
			PreLoader('Cf_FavoritesOn','images/buttonFavoritesOn.gif');
			PreLoader('Cf_FavoritesOff','images/buttonFavoritesOff.gif');			
			PreLoader('Cf_ContactUsOn','images/buttonContactUsOn.gif');
			PreLoader('Cf_ContactUsOff','images/buttonContactUsOff.gif');			
			
			
function jumpTo(s) {
	if (s.selectedIndex != 0) top.location.href = s.options[s.selectedIndex].value;return 1;
}

function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = "ie";

	this.v = parseInt(navigator.appVersion)
	this.ns = (this.b=="ns" && this.v==4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ie = ((this.b=="ie" && this.v>=4)||(this.b=="ns" && this.v>=5))
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
	this.moz = (this.b=="ns" && this.v>=5)

	if (this.ie5) this.v = 5
	this.min = (this.ns||this.ie)

	if(!this.ns) this.ie=true;
}

is = new BrowserCheck()

// Show/Hide script
function show_Object(id) { 
 if (loaded)
 {
    if (is.ns) document.layers[id].visibility = "show"
        else if (is.ie4) document.all[id].style.visibility = "visible"
		else if (is.ie)	document.getElementById(id).style.visibility = 'visible'
 }
}


function PreLoader(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}

function changeImage(layer,imgName,imgObj) {
	if (document.images) {
		if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src')
		else document.images[imgName].src = eval(imgObj+".src")
	}
}

 // Description.. javascript:openWindow('Url.asp',560,360,1,0,0,0);
function openWindow(ContentUrl,theWidth,theHeight,theScroll,theStatus,theMenubar,theResizable) {
	var CoordX = (screen.width / 2) - (theWidth / 2);
	var CoordY = (screen.height / 2) - (theHeight / 2);
	var openNewWindow = window.open(ContentUrl, 'PMD', 'Left='+CoordX+',Top='+CoordY+',Width='+theWidth+',Height='+theHeight+',ScrollBars='+theScroll+',Status='+theStatus+',Menubar='+theMenubar+',Resizable='+theResizable+'');
}
// Description.. javascript:PopupModalDialog('Url.asp',700,520,1);
function PopupModalDialog(ContentUrl,theWidth,theHeight) {
	var showWindow = window.showModalDialog (ContentUrl,'PMD','dialogWidth='+theWidth+'px;dialogHeight='+theHeight+'px;Scrollbars=Yes;Center=1;Status=No;Help=No');
}

function favority(favName,favUrl) {

	var myWebName;
	var myAddress;
	myWebName = favName;
	myAddress = favUrl;

	if (navigator.appName!="Netscape"){
	window.external.AddFavorite(myAddress, myWebName);
	}else{
	window.location = myAddress;
	}
}

function getMmColor(theMmID,theMmColor) {
	document.getElementById(theMmID).style.backgroundColor=theMmColor;
}



function doButtonStyle(ButtonId,changeStyle,ButtonTableId,ButtonCss) {

	if(ButtonCss!=null&&ButtonCss!='')
	{document.getElementById(ButtonTableId).className=ButtonCss;}
		
	if (changeStyle == 'Over') 
		{
		document.images[ButtonId].src = Button_On.src;
		}
	else	if (changeStyle == 'Down') 
		{
		document.images[ButtonId].src = Button_On.src;
		}	
	else	// Out
		{
		document.images[ButtonId].src = Button_Off.src;
		}

}


function AreYouDel(ItemNAMEs) {
	return(confirm('\n請確認指令 !\n確定進行刪除工作 ?\n'));
}

function get_support(strName,strdoname) {
	top.location.href='mailto:' + strName + '@' + strdoname
}

function high(fadewhich) {
	theobject=fadewhich
	highlighting=setInterval("highlightit(theobject)",50)
}

function low(fadewhich) {
	clearInterval(highlighting)
	fadewhich.filters.alpha.opacity=60
}

function highlightit(fadeCur) {
	if (fadeCur.filters.alpha.opacity<100)
	fadeCur.filters.alpha.opacity+=5
	else if (window.highlighting)
	clearInterval(highlighting)
}
//-->