function isblank( space ){
	if( space == '' ){ return true; }

    for( var num=0; num < space.length;  num++){
	var ch = space.charAt(num);
	if((ch!= ' ' ) && (ch!= '\n' ) && (ch!= '\r' ) && (ch!= '\t')) {
	    return false;
	} // end if
    } // end for
    return true ;
} // end isblank

function encode_text( str ){ // get rid of nasty chars that will fuck up the database!
	//see ali G
	str.multiline=true;
	str = str.replace(/"/g, "&quot;");
	str = str.replace(/\'/g, "&#039;");
	return str;
}// encode text

function in_array( thearray, thevar ){
	
	for( var i =0; i < thearray.length; i++ ){
		if( thearray[i] == thevar){
			return true;
		}
	}
	return false;
} // in array