
function scripted( obj ){

	objWidth = obj.width != null ? obj.width : obj.clientWidth;
	objHeight = obj.height != null ? obj.height : obj.clientHeight;
	
	if( objWidth > 100 && objHeight > 100 ) {

		obj.scripted = 'scripted';
		obj.style.margin = '16px 0';
		obj.style.border = 'none';
	
		obj.parentElement.insertAdjacentHTML('BeforeBegin', 
			'<div style="position:absolute; width:'+objWidth+'; height:'+objHeight+'; ">\
				<img src="/img/win_lt.gif" style="position:absolute; top:0px; left:-16px;">\
				<img src="/img/win_rt.gif" style="position:absolute; top:0px; left:'+objWidth+'px;">\
				<img src="/img/win_lb.gif" style="position:absolute; top:'+(objHeight+16)+'px; left:-16px;">\
				<img src="/img/win_rb.gif" style="position:absolute; top:'+(objHeight+16)+'px; left:'+objWidth+'px;">\
				<div style="position:absolute; width:16px; height:'+objHeight+'px; top:16px; left:-16px; background:url(/img/win_l.gif);">\
					<img src="/img/win_8.gif" class="top">\
					<img src="/img/win_7.gif" class="bottom">\
				</div>\
				<div style="position:absolute; width:20px; height:'+objHeight+'px; top:16px; left:'+objWidth+'px; background:url(/img/win_r.gif);">\
					<img src="/img/win_3.gif" class="top">\
					<img src="/img/win_4.gif" class="bottom">\
				</div>\
				<div style="position:absolute; width:'+objWidth+'px; height:16px; top:0; left:0; background:url(/img/win_t.gif);">\
					<img src="/img/win_1.gif" class="left">\
					<img src="/img/win_2.gif" class="right">\
				</div>\
				<div style="position:absolute; width:'+objWidth+'px; height:20px; top:'+(objHeight+16)+'px; left:0; background:url(/img/win_b.gif);">\
					<img src="/img/win_5.gif" class="right">\
					<img src="/img/win_6.gif" class="left">\
				</div>\
			</div>' 
		
		); 
	
		obj.scripted = 'scripted';
		
	}
	
}