var bodyFontSize = 0.8;
function fontSize(how) {
	switch(how) {
		case -1:
			if (bodyFontSize > 0.6)
				bodyFontSize = bodyFontSize - 0.05;
			break;
		case 0:
			bodyFontSize = 0.75;
			break;
		case 1:
			if (bodyFontSize < 1.5)
				bodyFontSize = bodyFontSize + 0.05;
			break;
	}
	document.body.style.fontSize = bodyFontSize + 'em';
	document.cookie = 'fontSize='+bodyFontSize;//+';expires='+(60*60*24);
	return false;
}
function setFontSize() {
	var dc = document.cookie;
	if(dc.indexOf('fontSize=')>-1) {
		var fs = dc.substr(dc.indexOf('fontSize=')+9);
		bodyFontSize = parseFloat(fs);
		document.write('<style>body{font-size:' + bodyFontSize + 'em}</style>');
	}
}
setFontSize();

csf=this;

/**
 * String
 */
csf.String.prototype._class=csf.String;
csf.String.prototype._className="String";
csf.String.prototype.clone=function String_clone(instanceArea){
		if(instanceArea)return instanceArea.eval("new String(\""+this.replace(/"/,"\\\"")+"\").toString()");
		else return(new String(this).toString());
	};
csf.String.prototype.compareTo=function String_compareTo(compString){
		if(this.toString()>compString.toString())return 1;
		else if(this.toString()<compString.toString())return-1;
		else return 0;
	};
csf.String.prototype.trimLeading=function String_trimLeading(charCode){
		if(this.charCodeAt(0)==charCode){
			var sLength=this.length;
			for(var i=1;i<sLength;i++)
				if(this.charCodeAt(i)!=charCode)break;
			return this.substring(i,sLength);
		}
		else return this.toString();
	};
csf.String.prototype.trimTrailing=function String_trimTrailing(charCode){
		if(this.charCodeAt(this.length-1)==charCode){
			for(var i=this.length-2;i>=0;i--)
				if(this.charCodeAt(i)!=charCode)break;
			return this.substring(0,i+1);
		}
		else return this.toString();
	};
csf.String.prototype.trim=function String_trim(charCode){
		return this.trimLeading(charCode).trimTrailing(charCode);
	};


/**
 * Number
 */
csf.Number.prototype._class=csf.Number;
csf.Number.prototype._className="Number";
csf.Number.prototype.clone=function Number_clone(instanceArea){
		if(instanceArea)return instanceArea.eval("new Number(\""+this+"\")");else return(new Number(this));
	};
csf.Number.prototype.compareTo=function Number_compareTo(compNumber){
		if(this>compNumber)return 1;
		else if(this<compNumber)return-1;
		else return 0;
	};


/**
 * Boolean
 */
csf.Boolean.prototype._class=csf.Boolean;
csf.Boolean.prototype._className="Boolean";
csf.Boolean.prototype.clone=function Boolean_clone(instanceArea){
		if(instanceArea)return instanceArea.eval("new Boolean(\""+this+"\")");
		else return(new Boolean(this));
	};


/**
 * Array
 */
csf.Array.prototype._class=csf.Array;
csf.Array.prototype._className="Array";
csf.Array.prototype.toString=function Array_toString(){
		var out="",keys=_getKeys(this);
		for(var i=0;i<keys.length;i++)out+="["+keys[i]+"] "+this[keys[i]]+"\n";
		return out;
	};
		
if(!csf.Array.prototype.push){
	csf.Array.prototype.push=function Array_push(obj){
			this[this.length]=obj;
		};
}
if(!csf.Array.prototype.pop){
	csf.Array.prototype.pop=function Array_pop(){
		if(this.length>0){
			var obj=this[this.length-1];
			delete this[this.length-1];
			return obj;
		}
		else{return null;}
	};
}

