download css.js
Language: JavaScript
Copyright: (C) 1999 Dan Steinman
LOC: 21
Project Info
Association .DLL(assoc-dll)
Server: SourceForge
Type: cvs
...dll\assoc‑dll\assoc‑dll\js\
   audio.js
   browsercheck.js
   buttonimage-mini.js
   buttonimage.js
   calendar.js
   checkbox.js
   circle.js
   clock.js
   collapsemenu.js
   cookies.js
   createdestroy.js
   css.js
   drag.js
   dynlayer-clip.js
   dynlayer-common.js
   dynlayer-glide.js
   dynlayer-min.js
   dynlayer-slide.js
   dynlayer-test.js
   dynlayer-wipe.js
   dynlayer-write.js
   dynlayer.js
   dynwindow.js
   ellipse.js
   gifanim.js
   hover.js
   images.js
   liquid.js
   list.js
   menubar.js
   menulist.js
   miniscroll.js
   mouseevents.js
   newsticker.js
   parabola.js
   passargs.js
   path.js
   progressbar.js
   pushpanel.js
   radio.js
   resizefix.js
   scroll-resize.js
   scroll.js
   scroll2-ext.js
   scroll2.js
   scrollbar.js
   scrolllist.js
   scrollwindow.js
   selectlist.js
   simpleapi.js
   sinewave.js
   tabs.js

// CSS Function
// returns CSS syntax for generated layers
// 19990326

// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/

function css(id,left,top,width,height,color,vis,z,other) {
	if (id=="START") return '<STYLE TYPE="text/css">\n'
	else if (id=="END") return '</STYLE>'
	var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;'
	if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;'
	if (arguments.length>=5 && height!=null) {
		str += ' height:'+height+'px;'
		if (arguments.length<9 || other.indexOf('clip')==-1) str += ' clip:rect(0px '+width+'px '+height+'px 0px);'
	}
	if (arguments.length>=6 && color!=null) str += (document.layers)? ' layer-background-color:'+color+';' : ' background-color:'+color+';'
	if (arguments.length>=7 && vis!=null) str += ' visibility:'+vis+';'
	if (arguments.length>=8 && z!=null) str += ' z-index:'+z+';'
	if (arguments.length==9 && other!=null) str += ' '+other
	str += '}\n'
	return str
}
function writeCSS(str,showAlert) {
	str = css('START')+str+css('END')
	document.write(str)
	if (showAlert) alert(str)
}

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us