//<!--
/********************************************
* Code      :   onsite.util.css.js
* Copyright :   OnSite Solutions AS
* Author    :   Nils Chr. Hofgaard Dahl
* Date      :   24.01.2003
* Comments  :   Provide dynaloading of css to misc browser
* Require   :   onsite.base.js
* Change    :   
********************************************/
var CSSDEBUG=0;
function loadCss(theseCss) {
	var css=null;
	var debug='';
	for(var i=0; i < theseCss.length;i+=2) {
	    if(theseCss[i] != 'DEFAULT' && theseCss[i]!='' && eval(theseCss[i])) {
		  css = theseCss[i+1];
		  debug=theseCss[i]+' css : '+theseCss[i+1];
	    }
		   //		myCss[theseCss[i]]=theseCss[i+1];
	}
	if(css==null) {	
		css=theseCss[theseCss.length-1]; 
		debug+=theseCss[theseCss.length-2]+' css : '+theseCss[theseCss.length-1];
	}	
	if(MAC_IE5) {
		document.writeln('<style type="text/css">');
		document.writeln('@import("'+css+'");');
		document.writeln('</style>');
		debug='MAC_IE5 css : @import("'+css+'");';
	}
	else {
		document.write('<link rel=stylesheet type="text/css" href="'+css+'">');  
	}

	if(CSSDEBUG) {
		alert("CSSDEBUG:\n"+debug);
	}
}
//-->
