12 lines
426 B
JavaScript
12 lines
426 B
JavaScript
|
// xClip, Copyright 2001-2005 Michael Foster (Cross-Browser.com)
|
||
|
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL
|
||
|
|
||
|
function xClip(e,t,r,b,l)
|
||
|
{
|
||
|
if(!(e=xGetElementById(e))) return;
|
||
|
if(e.style) {
|
||
|
if (xNum(l)) e.style.clip='rect('+t+'px '+r+'px '+b+'px '+l+'px)';
|
||
|
else e.style.clip='rect(0 '+parseInt(e.style.width)+'px '+parseInt(e.style.height)+'px 0)';
|
||
|
}
|
||
|
}
|