<! --
/* ===========================================/
* Behavior file bound to the style textbox
*
* Function:
* When the user's cursor is positioned in an input box,
* The input box displays the dynamic effects of different colors.
========================================== */
-->
< Public: attach event = " Onfocus " Onevent = " Dofocus () "/ >
< Public: attach event = " Onblur " Onevent = " Doblur () "/ >
< Script Language = " JScript " >
Function Dofocus ()
{
If (Element. tagname ! = ' Input ' && Element. tagname ! = ' Textarea ' )
Return False ;
If (Element. tagname = ' Input ' && (Element. Type = " Submit " | Element. Type = " Button " ))
Return False ;
If(!Element. readonly)
{
Element. style. backgroundcolor= '# E0ffff';
}
}
Function Doblur ()
{
If (Element. tagname ! = ' Input ' && Element. tagname ! = ' Textarea ' )
Return False ;
If (Element. tagname = ' Input ' && (Element. Type = " Submit " | Element. Type = " Button " ))
Return False ;
Element. style. backgroundcolor= '# Ffffff';
}
// Cookie content
Function Getcookieval (offset)
{
VaR Endstr = Document. Cookie. indexof ( " ; " , Offset );
If (Endstr = - 1 )
Endstr = Document. Cookie. length;
Return Unescape (document. Cookie. substring (offset, endstr ));
}
// Obtains the value of a specified cookie.
Function Getcookie (name)
{
VaR ARG = Name + " = " ;
VaR Alen = Arg. length;
VaR Clen = Document. Cookie. length;
VaR I = 0 ;
While (I < Clen)
{
VaR J = I + Alen;
If (Document. Cookie. substring (I, j) = Arg)
Return Getcookieval (j );
I = Document. Cookie. indexof ( " " , I) + 1 ;
If (I = 0 ) Break ;
}
Return Null ;
}
</SCRIPT>