function jobj(){}
jobj.$c = function(tag){return document.createelement(tag)};
jobj.$ = function(id){return document.getelementbyid(id)};
jobj.israte = function(pratestring){
if(!isnan(pratestring)) return false;
if(pratestring.substr(pratestring.length-1,1) != %)
return false;
if(isnan(pratestring.substring(0,pratestring.length - 1)))
return false;
return true;
}
function jpos(){}
jpos.getabspos = function(ptarget){
var x_ = y_ = 0;
while(ptarget.offsetparent){
x_ += ptarget.offsetleft;
y_ += ptarget.offsettop;
ptarget = ptarget.offsetparent;
}
x_ += ptarget.offsetleft;
y_ += ptarget.offsettop;
return {x:x_,y:y_};
}
jpos.getmousepos = function(evt){
var x_ = y_ = 0;
evt = evt || window.event;
if(evt.pagex || evt.pagey){
x_ = evt.pagex;
y_ = evt.pagey;
}else{
x_ = evt.clientx + document.body.scrollleft - document.body.clientleft;
y_ = evt.clienty + document.body.scrolltop - document.body.clienttop;
}
return {x:x_,y:y_};
}
