Code
/*====================================== JS shield layer ================ ============*/
VaRTarget;
Showshade = Function (){
VaR Objtarget = $ ( " # " + Target );
VaR Zindex = 10 ;
VaR Alpha = 50 ;
VaR Bgcolor = " Gray " ;
VaR Winw = Document. Body. offsetwidth - 15 ;
VaR Winh = Window. Screen. height;
VaR H = Window. Screen. height;
VaR Y = Window. screentop;
Winh = H - Y;
VaR Shadediv = " <Div id = 'shade 'style = 'width: " + Winw + " Px; height: " + Winh + " Px; Z-index: " + Zindex +
" ; Background: " + Bgcolor + " ; Position: absolute; top:-1px; left:-1px; filter: alpha (opacity = " + Alpha + " ); '> "
+ " <Div style = 'width: 100%; Height: 20px; text-align: Right; '> "
+ " <Span style = 'cursor: pointer; padding: 5px 10px; color: White; Background: black; 'onclick = \ " Closeshade ();\ " > X </span> "
+ " </Div> "
+ " </Div> " ;
$ (Shadediv). appendto ($ (document. Body ));
Objtarget.css ( " Z-Index " , Zindex + 1 );
Objtarget.css ({position: " Absolute " , Top: " 30% " , Left: " 35% " });
Objtarget. fadein ( " Normal " );
}
Closeshade = Function (){
// $ ('# Shade'). Remove ();
$ ( " # " + Target). fadeout ( " Normal " );
$ ( ' # Shade ' ). Remove ();
}
// Adjust the window size when it is changed or rolled.
Resetshade = Function (){
If ($ ( " # Shade " ).Css ( " Display " ) = " Block " ){
$ ( " # Shade " ). Remove ();
Showshade ();
}
}
/*============================================================ ==========*/