//CSS writer routine V1.11
//26th January 2001
//karl.bunyan@oyster.co.uk

// CSS Function
function css(id,left,top,width,height,color,vis,z,other, relLeft,relTop) {
	var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;'
	if ((left==null || top==null) && relLeft!=null && relTop!=null) str += 'left:'+relLeft+'px; top:'+relTop+'px;'

	if (width!=null) str += ' width:'+width+'px;'
	if (height!=null) {
		str += ' height:'+height+'px;'
		if (arguments.length<9 || other.indexOf('clip')==-1) str += ' clip:rect(0px '+width+'px '+height+'px 0px);'
	}
	if (color) str += (ns ? ' layer-background-color:' : ' background-color:')+color+';'
	if (vis) str += ' visibility:'+vis+';'
	if (z!=null) str += ' z-index:'+z+';'
	if (other) str += ' '+other
	str += '}\n'
	return str
}

function writeCSS(str) {
	document.write('<STYLE TYPE="text/css">\n'+str+'</STYLE>')
}
