﻿
Dim odiv
Function showtxt(a)
	On Error Resume Next
	Set ndiv = document.getelementbyid(a)
	If ndiv.id <> odiv.id Then
		ndiv.style.display = ""
		odiv.style.display = "none"
		Set odiv = ndiv
	End If
End Function

Function showimg(a,b)

	If b=1 Then
		a.style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)" 
	Else
		a.style.filter = "" 
	End If
End Function

Function showFonts(a)
	
	Set oENFonts = document.getelementbyid("ENFonts")
	Set oCHFonts = document.getelementbyid("CHFonts")
	Set oBIGFonts = document.getelementbyid("BIGFonts")
	
	If a = 0 Then
		oENFonts.style.display = ""
		oCHFonts.style.display = "none"
		oBIGFonts.style.display = "none"
	ElseIf a = 1 Then
		oENFonts.style.display = "none"
		oCHFonts.style.display = "" 
		oBIGFonts.style.display = "none"
	ElseIf a = 2 Then
		oENFonts.style.display = "none"
		oCHFonts.style.display = "none" 
		oBIGFonts.style.display = ""
	End If
End Function

Dim msgheight,msgmaxheight
msgheight = 0  
msgmaxheight = 50

Function Setmsg()	'对象，高度
	document.getelementbyid("topmsg").style.display = ""
	If CInt(msgheight) = CInt(msgmaxheight) then
	Else
		document.getelementbyid("topmsg").style.height = msgheight&"px"
		msgheight = msgheight + 1
		Call settimeout("Setmsg()",1000)
	End If
	
End Function

Function setAF(a,b)
	Call window.external.addFavorite("http://www.herlike.com"&b,"个性首饰定制(和丽首饰)"&a)
End Function

Function Search01()
	
	searchcodestr = document.getelementbyid("searchcode").value 
	'alert(searchcodestr)
	if searchcodestr  = "" then
		alert("提示：请输入商品编码后再进行查询！")
		exit function 
	else
		window.open "/code/"&Trim(searchcodestr)
	end if
End Function

Function Search02()
	
	searchcodestr = document.getelementbyid("searchcode2").value 
	'alert(searchcodestr)
	if searchcodestr  = "" then
		alert("提示：输入您订购时留下的邮箱地址或者订单号后再进行查询！")
		exit function 
	else
		window.open "/xMyOrderList.html?searchEmail="&Trim(searchcodestr)
	end if
End Function