<HTML>
<HEAD>
<TITLE>Ajax RssReader With Skj Scripting</TITLE>
<META http-equiv=Content-Type content="text/html; charset=shift_jis">
<style type="text/css">
#DivPopUp{
position: absolute;
top : 300;
left : 250;
width : 300px;
height : 100px;
border : 1px solid black;
overflow-x: : hidden;
background-color: #ccccff;
}
#DivPopUpHeader{
border:1px solid black;
background-color:#aaaaaa;
text-align:right;
margin: 1px;
padding: 1px;
}
#DivPopUpClose{
border:1px solid black;
width:1;
font-weight: bold;
cursor: default
}
</style>
</HEAD>
<Body onload="init()">
<Div Id="DivPopUp" >
<Div Id="DivPopUpHeader">
<Span Id="DivPopUpClose" >×</Span>
</Div>
<Div Id="DivPopUpMsg" >PopUp Window</Div>
</Div>
<Script>
function DoId(id){
return document.getElementById(id);
}
function init(){
var op = new skj.lib.ui.OpDragDrop();
op.SetDragDrop( 'DivPopUp', 'DivPopUpHeader', 'DivPopUpClose' );
}
(function(){
function OpDragDrop(){
function SetDragDrop( IdDivAll, IdDivHeader, IdDivClose ){
var divAll = DoId( IdDivAll );
var divHeader = DoId( IdDivHeader ) || divAll;
var divClose = DoId( IdDivClose );
var ClickData = {};
var sAll = divAll.style;
var doc = document;
sAll.position = 'absolute';
sAll.left = divAll.offsetLeft;
sAll.top = divAll.offsetTop;
divHeader.onmousedown = function(){
var e = new DmEvent( arguments[0] || window.event );
ClickData.Dx = e.X - sAll.left.split('px').join('');
ClickData.Dy = e.Y - sAll.top .split('px').join('');
doc.onmousemove = function(){
var e = new DmEvent( arguments[0] || window.event );
sAll.left = ( e.X - ClickData.Dx )+'px';//
sAll.top = ( e.Y - ClickData.Dy )+'px';//
}
status = '(ClickData.Dx, ClickData.Dy) = ('+ClickData.Dx+', '+ClickData.Dy+')';
}
doc.onmouseup = function(){
doc.onmousemove = function(){};
}
if( divClose ){
divClose.onclick = function(){
sAll.display = 'none';
return false;
}
}
}
OpDragDrop.prototype.SetDragDrop = SetDragDrop;
}
function DmEvent(e){
this.e = e;
this.X = e.clientX || e.pageX
this.Y = e.clientY || e.pageY;
}
skj = {};
skj.lib = {};
skj.lib.ui = {};
skj.lib.ui.OpDragDrop = OpDragDrop;
})();
</Script>
</Body>
</HTML>
<HEAD>
<TITLE>Ajax RssReader With Skj Scripting</TITLE>
<META http-equiv=Content-Type content="text/html; charset=shift_jis">
<style type="text/css">
#DivPopUp{
position: absolute;
top : 300;
left : 250;
width : 300px;
height : 100px;
border : 1px solid black;
overflow-x: : hidden;
background-color: #ccccff;
}
#DivPopUpHeader{
border:1px solid black;
background-color:#aaaaaa;
text-align:right;
margin: 1px;
padding: 1px;
}
#DivPopUpClose{
border:1px solid black;
width:1;
font-weight: bold;
cursor: default
}
</style>
</HEAD>
<Body onload="init()">
<Div Id="DivPopUp" >
<Div Id="DivPopUpHeader">
<Span Id="DivPopUpClose" >×</Span>
</Div>
<Div Id="DivPopUpMsg" >PopUp Window</Div>
</Div>
<Script>
function DoId(id){
return document.getElementById(id);
}
function init(){
var op = new skj.lib.ui.OpDragDrop();
op.SetDragDrop( 'DivPopUp', 'DivPopUpHeader', 'DivPopUpClose' );
}
(function(){
function OpDragDrop(){
function SetDragDrop( IdDivAll, IdDivHeader, IdDivClose ){
var divAll = DoId( IdDivAll );
var divHeader = DoId( IdDivHeader ) || divAll;
var divClose = DoId( IdDivClose );
var ClickData = {};
var sAll = divAll.style;
var doc = document;
sAll.position = 'absolute';
sAll.left = divAll.offsetLeft;
sAll.top = divAll.offsetTop;
divHeader.onmousedown = function(){
var e = new DmEvent( arguments[0] || window.event );
ClickData.Dx = e.X - sAll.left.split('px').join('');
ClickData.Dy = e.Y - sAll.top .split('px').join('');
doc.onmousemove = function(){
var e = new DmEvent( arguments[0] || window.event );
sAll.left = ( e.X - ClickData.Dx )+'px';//
sAll.top = ( e.Y - ClickData.Dy )+'px';//
}
status = '(ClickData.Dx, ClickData.Dy) = ('+ClickData.Dx+', '+ClickData.Dy+')';
}
doc.onmouseup = function(){
doc.onmousemove = function(){};
}
if( divClose ){
divClose.onclick = function(){
sAll.display = 'none';
return false;
}
}
}
OpDragDrop.prototype.SetDragDrop = SetDragDrop;
}
function DmEvent(e){
this.e = e;
this.X = e.clientX || e.pageX
this.Y = e.clientY || e.pageY;
}
skj = {};
skj.lib = {};
skj.lib.ui = {};
skj.lib.ui.OpDragDrop = OpDragDrop;
})();
</Script>
</Body>
</HTML>