퀵배너 스크립트
<!--오른쪽 퀵배너 시작-->
<div id=DivMovingLayer style='position:absolute;left:0px;top:0px; z-index:1;display:none;'>
<table>
<tr><td align='center' height=50 bgcolor=cccccc>
내용
</td></tr>
<!-- <tr>
<td align='center'><a href='javascript-x:NoneRemocon();' title='움직이는 레이어를 닫습니다.'>[CLOSE]
</a>
</td>
</tr>
<tr>
<td align='center'><a href='javascript-x:history.go(-1);' title='뒤로가기'>[BACK]</a></td>
</tr> -->
</table>
</div>
<script language='javascript'>
//움직이는 레이어
//사용함수
function ResetRemocon(){
var DivMovingLayerYFrom, DivMovingLayerYTo, OffsetY, ResetTime;
ResetTime = 100;
if (DivMovingLayerRule == 'center'){
//해상도 기준, 가운데 에서 x만큼 떨어진 곳에 위치
if (navigator.userAgent.toLowerCase().indexOf("gecko") > -1) {
if (document.body.clientWidth < ContentsWidth + 10) {
DivMovingLayer.style.left = parseInt (ContentsWidth / 2, 10) + DivMovingLayerX + 10 + "px";
}
else {
DivMovingLayer.style.left = (DivMovingLayerX + (document.body.clientWidth / 2)) + "px";
}
}
else{
if (document.body.clientWidth < ContentsWidth) {
DivMovingLayer.style.left = parseInt (ContentsWidth / 2, 10) + DivMovingLayerX + "px";
}
else {
DivMovingLayer.style.left = (DivMovingLayerX + (document.body.clientWidth / 2)) + "px";
}
}
}
else if (DivMovingLayerRule == 'left'){
//해상도와 무관, 왼쪽 에서 x만큼 떨어진 곳에 위치
DivMovingLayer.style.left = (DivMovingLayerX) + "px";
}
DivMovingLayerYFrom = parseInt (DivMovingLayer.style.top, 10);
DivMovingLayerYTo = DivMovingLayerY + document.body.scrollTop + 1;
if ( DivMovingLayerYFrom != DivMovingLayerYTo ) {
OffsetY = Math.ceil( Math.abs( DivMovingLayerYTo - DivMovingLayerYFrom ) / 20 );
if ( DivMovingLayerYTo < DivMovingLayerYFrom )
OffsetY = -OffsetY;
DivMovingLayer.style.top = (DivMovingLayerYFrom + OffsetY) + "px";
ResetTime = 10;
}
setTimeout ("ResetRemocon()", ResetTime);
}
function SetRemocon() {
DivMovingLayer.style.display = "block";
DivMovingLayer.style.top = (DivMovingLayerY + document.body.scrollTop + 1) + "px";
ResetRemocon();
return true;
}
function NoneRemocon() {
DivMovingLayer.style.display = "none";
}
if (typeof document.body == "undefined")
document.body = document.getElementsByTagName("BODY")[0];
var DivMovingLayer = document.getElementById("DivMovingLayer");
//환경설정
var ContentsWidth = 800;//움직이는 레이어를 제외한 콘텐츠 너비, 가운데 정렬에만 해당, 전체 테이블중 제일큰 너비
var DivMovingLayerX = 900;//레이어가 위치할 레프트 값
var DivMovingLayerY = 350;//레어가 위치할 탑 값
var DivMovingLayerRule = 'left';//center -->가운데 정렬을 기준으로 x만큼, left --> 레프트 정렬을 기준으로 x만큼
//레이어 보이기
SetRemocon();
</script>
<!--오른쪽 퀵배너 끝-->