function WP_getMouseX( evt ){return (ns4||ns5)? evt.pageX: window.event.clientX+document.body.scrollLeft;}
function WP_getMouseY( evt ){return (ns4||ns5)? evt.pageY: window.event.clientY+document.body.scrollTop;}
function WP_getObjWidth( obj ){var tmp_param=(ns4)? obj.width: (ie4||ie5)? obj.clientWidth: obj.offsetWidth;return tmp_param ? tmp_param : parseInt( obj.style.width );}
function WP_getObjHeight( obj ){var tmp_param=(ns4)? obj.height: (ie4||ie5)? obj.clientHeight: obj.offsetHeight;return tmp_param ? tmp_param : parseInt( obj.style.height );}
function WP_positioning( obj, pointX, pointY, offX, offY, objWidth, objHeight ){var tpWd=objWidth ? objWidth : WP_getObjWidth( obj );var tpHt=objHeight ? objHeight : WP_getObjHeight( obj );var winWd=WP_getWindowWidth();var winHt=WP_getWindowHeight();var tmp_left=0;var tmp_top=0;if ( ( pointX+offX+tpWd ) > winWd ){tmp_left=pointX - ( tpWd+offX );}
else{tmp_left=pointX+offX;}
if ( ( pointY+offY+tpHt ) > winHt ){tmp_top=winHt - ( tpHt+offY );}
else{tmp_top=pointY+offY;}
tmp_left=tmp_left > 0 ? tmp_left : 0;tmp_top=tmp_top > 0 ? tmp_top : 0;if( obj.moveTo ){obj.moveTo( tmp_left, tmp_top );}
else{if( ns4 ){obj.style.left=tmp_left;obj.style.top=tmp_top;}
else{obj.style.left=tmp_left+"px";obj.style.top=tmp_top+"px";}
}}
function WP_positioningCenter( obj, leftCornerX, leftCornerY, rightCorderX, rightCornerY ){leftCornerX=leftCornerX ? parseInt( leftCornerX ) : 0;leftCornerY=leftCornerY ? parseInt( leftCornerY ) : 0;rightCorderX=rightCorderX ? parseInt( rightCorderX ) : 0;rightCornerY=rightCornerY ? parseInt( rightCornerY ) : 0;var tpWd=WP_getObjWidth( obj );tpWd=tpWd ? tpWd : 0;var tpHt=WP_getObjHeight( obj );tpHt=tpHt ? tpHt : 0;var winWd=WP_getWindowWidth() - leftCornerX - rightCorderX;var winHt=WP_getWindowHeight() - leftCornerY - rightCornerY;var scrollChangeTop=document.body.scrollTop ? parseInt( document.body.scrollTop / 2 ) : 0;var tmpTop=leftCornerY+( winHt - tpHt ) / 2;obj.style.top=(ns4) ? tmpTop+scrollChangeTop : tmpTop+scrollChangeTop+"px";var tmpLEft=leftCornerX+( winWd - tpWd ) / 2;obj.style.left=(ns4) ? tmpLEft : tmpLEft+"px";}
